add report file to conf
This commit is contained in:
parent
a99449e960
commit
3f52a08392
1
go.sum
1
go.sum
@ -1,5 +1,6 @@
|
|||||||
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
|
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
|
||||||
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
||||||
|
github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4=
|
||||||
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||||
github.com/jsimonetti/rtnetlink v0.0.0-20190606172950-9527aa82566a/go.mod h1:Oz+70psSo5OFh8DBl0Zv2ACw7Esh6pPUphlvZG9x7uw=
|
github.com/jsimonetti/rtnetlink v0.0.0-20190606172950-9527aa82566a/go.mod h1:Oz+70psSo5OFh8DBl0Zv2ACw7Esh6pPUphlvZG9x7uw=
|
||||||
github.com/jsimonetti/rtnetlink v0.0.0-20200117123717-f846d4f6c1f4/go.mod h1:WGuG/smIU4J/54PblvSbh+xvCZmpJnFgr3ds6Z55XMQ=
|
github.com/jsimonetti/rtnetlink v0.0.0-20200117123717-f846d4f6c1f4/go.mod h1:WGuG/smIU4J/54PblvSbh+xvCZmpJnFgr3ds6Z55XMQ=
|
||||||
|
3
init.go
3
init.go
@ -20,6 +20,7 @@ func Init() {
|
|||||||
Network: getRandomNetwork(),
|
Network: getRandomNetwork(),
|
||||||
Peers: make([]PeerConfig, 0),
|
Peers: make([]PeerConfig, 0),
|
||||||
Domain: "dsnet",
|
Domain: "dsnet",
|
||||||
|
ReportFile: DEFAULT_REPORT_FILE,
|
||||||
}
|
}
|
||||||
|
|
||||||
//fmt.Println(conf.Network.String())
|
//fmt.Println(conf.Network.String())
|
||||||
@ -37,7 +38,7 @@ func getRandomNetwork() JSONIPNet {
|
|||||||
rand.Read(rbs)
|
rand.Read(rbs)
|
||||||
|
|
||||||
return JSONIPNet{
|
return JSONIPNet{
|
||||||
net.IPNet{
|
IPNet: net.IPNet{
|
||||||
net.IP{10, rbs[0], rbs[1] << 2, 0},
|
net.IP{10, rbs[0], rbs[1] << 2, 0},
|
||||||
net.IPMask{255, 255, 252, 0},
|
net.IPMask{255, 255, 252, 0},
|
||||||
},
|
},
|
||||||
|
1
types.go
1
types.go
@ -54,6 +54,7 @@ type DsnetConfig struct {
|
|||||||
// resolution. Informational only.
|
// resolution. Informational only.
|
||||||
Domain string `validate:"required,gte=1,lte=255"`
|
Domain string `validate:"required,gte=1,lte=255"`
|
||||||
// TODO Default subnets to route via VPN
|
// TODO Default subnets to route via VPN
|
||||||
|
ReportFile string `validate:"required"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type Dsnet struct {
|
type Dsnet struct {
|
||||||
|
Loading…
Reference in New Issue
Block a user