mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-29 06:35:07 +03:00
Centralise platform defaults into the 'defaults' package
This commit is contained in:
parent
adc21baa28
commit
1692bd98fd
20 changed files with 169 additions and 105 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue