add report file to conf

This commit is contained in:
Callan Bryant 2020-03-01 23:17:01 +00:00
parent a99449e960
commit 3f52a08392
No known key found for this signature in database
GPG Key ID: C31FA9DF3ACBFFAA
3 changed files with 4 additions and 1 deletions

1
go.sum
View File

@ -1,5 +1,6 @@
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.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4=
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-20200117123717-f846d4f6c1f4/go.mod h1:WGuG/smIU4J/54PblvSbh+xvCZmpJnFgr3ds6Z55XMQ=

View File

@ -20,6 +20,7 @@ func Init() {
Network: getRandomNetwork(),
Peers: make([]PeerConfig, 0),
Domain: "dsnet",
ReportFile: DEFAULT_REPORT_FILE,
}
//fmt.Println(conf.Network.String())
@ -37,7 +38,7 @@ func getRandomNetwork() JSONIPNet {
rand.Read(rbs)
return JSONIPNet{
net.IPNet{
IPNet: net.IPNet{
net.IP{10, rbs[0], rbs[1] << 2, 0},
net.IPMask{255, 255, 252, 0},
},

View File

@ -54,6 +54,7 @@ type DsnetConfig struct {
// resolution. Informational only.
Domain string `validate:"required,gte=1,lte=255"`
// TODO Default subnets to route via VPN
ReportFile string `validate:"required"`
}
type Dsnet struct {