Enable IPv6 address discovery (#578)

Agents will use IPv6 when available for ICE negotiation
This commit is contained in:
Genteure
2022-11-23 18:03:29 +08:00
committed by GitHub
parent f604956246
commit 4bd5029e7b
4 changed files with 52 additions and 34 deletions

View File

@@ -33,13 +33,14 @@ func init() {
// Config Configuration type
type Config struct {
// Wireguard private key of local peer
PrivateKey string
PreSharedKey string
ManagementURL *url.URL
AdminURL *url.URL
WgIface string
WgPort int
IFaceBlackList []string
PrivateKey string
PreSharedKey string
ManagementURL *url.URL
AdminURL *url.URL
WgIface string
WgPort int
IFaceBlackList []string
DisableIPv6Discovery bool
// SSHKey is a private SSH key in a PEM format
SSHKey string
@@ -69,11 +70,12 @@ func createNewConfig(managementURL, adminURL, configPath, preSharedKey string) (
return nil, err
}
config := &Config{
SSHKey: string(pem),
PrivateKey: wgKey,
WgIface: iface.WgInterfaceDefault,
WgPort: iface.DefaultWgPort,
IFaceBlackList: []string{},
SSHKey: string(pem),
PrivateKey: wgKey,
WgIface: iface.WgInterfaceDefault,
WgPort: iface.DefaultWgPort,
IFaceBlackList: []string{},
DisableIPv6Discovery: false,
}
if managementURL != "" {
URL, err := ParseURL("Management URL", managementURL)