MCPcopy
hub / github.com/windtf/wireproxy / TestWireguardConfWithManyAddress

Function TestWireguardConfWithManyAddress

config_test.go:66–87  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

64}
65
66func TestWireguardConfWithManyAddress(t *testing.T) {
67 const config = `
68[Interface]
69PrivateKey = mBsVDahr1XIu9PPd17UmsDdB6E53nvmS47NbNqQCiFM=
70Address = 100.96.0.190,2606:B300:FFFF:fe8a:2ac6:c7e8:b021:6f5f/128
71DNS = 198.18.0.1,198.18.0.2
72
73[Peer]
74PublicKey = SHnh4C2aDXhp1gjIqceGhJrhOLSeNYcqWLKcYnzj00U=
75AllowedIPs = 0.0.0.0/0,::/0
76Endpoint = 192.200.144.22:51820`
77 var cfg DeviceConfig
78 iniData, err := loadIniConfig(config)
79 if err != nil {
80 t.Fatal(err)
81 }
82
83 err = ParseInterface(iniData, &cfg)
84 if err != nil {
85 t.Fatal(err)
86 }
87}

Callers

nothing calls this directly

Calls 2

loadIniConfigFunction · 0.85
ParseInterfaceFunction · 0.85

Tested by

no test coverage detected