install mode and improve relay

This commit is contained in:
TenderIronh
2021-12-09 18:54:46 +08:00
parent a2387fed68
commit f12059d889
16 changed files with 309 additions and 89 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ func (t *P2PTunnel) init() {
localPort := int(rand.Uint32()%10000 + 50000)
if t.pn.config.natType == NATCone {
// prepare one random cone hole
_, _, port1, _ := natTest(t.pn.config.ServerHost, t.pn.config.UDPPort1, localPort)
_, _, port1, _ := natTest(t.pn.config.ServerHost, t.pn.config.UDPPort1, localPort, 0)
t.coneLocalPort = localPort
t.coneNatPort = port1
t.la = &net.UDPAddr{IP: net.ParseIP(t.pn.config.localIP), Port: t.coneLocalPort}