Per-platform TUN defaults

This commit is contained in:
Neil Alexander 2018-03-03 12:30:54 +00:00
parent bec898a326
commit 4917ea3dd2
8 changed files with 56 additions and 26 deletions

View file

@ -117,13 +117,9 @@ func generateConfig() *nodeConfig {
cfg.Peers = []string{}
cfg.Multicast = true
cfg.LinkLocal = ""
cfg.IfName = "auto"
cfg.IfMTU = 1280
if runtime.GOOS == "windows" {
cfg.IfTAPMode = true
} else {
cfg.IfTAPMode = false
}
cfg.IfName = core.DEBUG_GetTUNDefaultIfName()
cfg.IfMTU = core.DEBUG_GetTUNDefaultIfMTU()
cfg.IfTAPMode = core.DEBUG_GetTUNDefaultIfTAPMode()
return &cfg
}