mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-28 22:25: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
|
@ -13,17 +13,6 @@ import (
|
|||
water "github.com/yggdrasil-network/water"
|
||||
)
|
||||
|
||||
// Sane defaults for the Darwin/macOS platform. The "default" options may be
|
||||
// may be replaced by the running configuration.
|
||||
func getDefaults() tunDefaultParameters {
|
||||
return tunDefaultParameters{
|
||||
maximumIfMTU: 65535,
|
||||
defaultIfMTU: 65535,
|
||||
defaultIfName: "auto",
|
||||
defaultIfTAPMode: false,
|
||||
}
|
||||
}
|
||||
|
||||
// Configures the "utun" adapter with the correct IPv6 address and MTU.
|
||||
func (tun *tunDevice) setup(ifname string, iftapmode bool, addr string, mtu int) error {
|
||||
if iftapmode {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue