mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2026-05-25 07:16:29 +03:00
Centralise platform defaults into the 'defaults' package
This commit is contained in:
@@ -7,17 +7,6 @@ import water "github.com/yggdrasil-network/water"
|
||||
// This is to catch unsupported platforms
|
||||
// If your platform supports tun devices, you could try configuring it manually
|
||||
|
||||
// These are sane defaults for any platform that has not been matched by one of
|
||||
// the other tun_*.go files.
|
||||
func getDefaults() tunDefaultParameters {
|
||||
return tunDefaultParameters{
|
||||
maximumIfMTU: 65535,
|
||||
defaultIfMTU: 65535,
|
||||
defaultIfName: "none",
|
||||
defaultIfTAPMode: false,
|
||||
}
|
||||
}
|
||||
|
||||
// Creates the TUN/TAP adapter, if supported by the Water library. Note that
|
||||
// no guarantees are made at this point on an unsupported platform.
|
||||
func (tun *tunDevice) setup(ifname string, iftapmode bool, addr string, mtu int) error {
|
||||
|
||||
Reference in New Issue
Block a user