Created
July 3, 2019 00:54
-
-
Save Sean-Der/a1720422dfe233d3daf6623afb6bf9ae to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/candidate_base.go b/candidate_base.go | |
index b5cb216..6628711 100644 | |
--- a/candidate_base.go | |
+++ b/candidate_base.go | |
@@ -95,6 +95,7 @@ func (c *candidateBase) recvLoop() { | |
return | |
} | |
+ fmt.Printf("Read %s -> %s", srcAddr, c.addr()) | |
handleInboundCandidateMsg(c, buffer[:n], srcAddr, log) | |
} | |
} | |
@@ -159,6 +160,7 @@ func (c *candidateBase) close() error { | |
} | |
func (c *candidateBase) writeTo(raw []byte, dst Candidate) (int, error) { | |
+ fmt.Printf("Send %s -> %s \n", c.addr(), dst.addr()) | |
n, err := c.conn.WriteTo(raw, dst.addr()) | |
if err != nil { | |
return n, fmt.Errorf("failed to send packet: %v", err) | |
diff --git a/connectivity_vnet_test.go b/connectivity_vnet_test.go | |
index 12da114..7515af2 100644 | |
--- a/connectivity_vnet_test.go | |
+++ b/connectivity_vnet_test.go | |
@@ -180,6 +180,7 @@ func pipeWithVNet(v *virtualNet, urls0, urls1 []*URL) (*Conn, *Conn) { | |
Trickle: true, | |
NetworkTypes: supportedNetworkTypes, | |
MulticastDNSMode: MulticastDNSModeDisabled, | |
+ CandidateTypes: []CandidateType{CandidateTypeServerReflexive, CandidateTypePeerReflexive}, | |
Net: v.net0, | |
} | |
@@ -264,15 +265,6 @@ func TestConnectivityVNet(t *testing.T) { | |
Proto: ProtoTypeUDP, | |
} | |
- turnServerURL := &URL{ | |
- Scheme: SchemeTypeTURN, | |
- Host: "1.2.3.4", | |
- Port: 3478, | |
- Username: "user", | |
- Password: "pass", | |
- Proto: ProtoTypeUDP, | |
- } | |
- | |
t.Run("Full-cone NATs", func(t *testing.T) { | |
loggerFactory := logging.NewDefaultLoggerFactory() | |
log := loggerFactory.NewLogger("test") | |
@@ -324,7 +316,7 @@ func TestConnectivityVNet(t *testing.T) { | |
log.Debug("Connecting...") | |
urls0 := []*URL{ | |
stunServerURL, | |
- turnServerURL, | |
+ // turnServerURL, | |
} | |
urls1 := []*URL{ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment