Fix e2e unsafe inbound test

This commit is contained in:
Nate Brown
2025-11-21 15:51:02 -06:00
parent c2381e7019
commit e25016a946
2 changed files with 11 additions and 2 deletions

View File

@@ -1341,6 +1341,13 @@ func TestGoodHandshakeUnsafeDest(t *testing.T) {
"tun": m{
"unsafe_routes": []m{route},
},
"firewall": m{
"unsafe_outbound": []m{{
"port": "any",
"proto": "any",
"host": "any",
}},
},
}
myControl, myVpnIpNet, myUdpAddr, myConfig := newSimpleServer(cert.Version2, ca, caKey, "me", "10.128.0.1/24", myCfg)
t.Logf("my config %v", myConfig)

View File

@@ -85,8 +85,9 @@ func newSimpleServerWithUdpAndUnsafeNetworks(v cert.Version, caCrt cert.Certific
}}
var unsafeNetworks []netip.Prefix
var firewallUnsafeInbound []m
if sUnsafeNetworks != "" {
firewallInbound = []m{{
firewallUnsafeInbound = []m{{
"proto": "any",
"port": "any",
"host": "any",
@@ -122,7 +123,8 @@ func newSimpleServerWithUdpAndUnsafeNetworks(v cert.Version, caCrt cert.Certific
"port": "any",
"host": "any",
}},
"inbound": firewallInbound,
"inbound": firewallInbound,
"unsafe_inbound": firewallUnsafeInbound,
},
//"handshakes": m{
// "try_interval": "1s",