Lighthouse performance pass (#418)

This commit is contained in:
Nathan Brown
2021-03-31 17:32:02 -05:00
committed by GitHub
parent e7e55618ff
commit 75f7bda0a4
12 changed files with 2378 additions and 972 deletions

View File

@ -66,12 +66,12 @@ func TestWrongResponderHandshake(t *testing.T) {
theirControl, theirVpnIp, theirUdpAddr := newSimpleServer(ca, caKey, "them", net.IP{10, 0, 0, 2})
evilControl, evilVpnIp, evilUdpAddr := newSimpleServer(ca, caKey, "evil", net.IP{10, 0, 0, 99})
// Put the evil udp addr in for their vpn Ip, this is a case of being lied to by the lighthouse
myControl.InjectLightHouseAddr(theirVpnIp, evilUdpAddr)
// But also add their real udp addr, which should be tried after evil
// Add their real udp addr, which should be tried after evil. Doing this first because learned addresses are prepended
myControl.InjectLightHouseAddr(theirVpnIp, theirUdpAddr)
// Put the evil udp addr in for their vpn Ip, this is a case of being lied to by the lighthouse. This will now be the first attempted ip
myControl.InjectLightHouseAddr(theirVpnIp, evilUdpAddr)
// Build a router so we don't have to reason who gets which packet
r := router.NewR(myControl, theirControl, evilControl)