Просмотр исходного кода

Fix identifiers from psiphon-tls and quic-go dependencies

Amir Khan 1 год назад
Родитель
Сommit
5feddf3c90

+ 1 - 1
psiphon/common/inproxy/webrtc.go

@@ -2361,7 +2361,7 @@ func (conn *webRTCConn) addRTPReliabilityLayer(ctx context.Context) error {
 			HandshakeIdleTimeout:          handshakeIdleTimeout,
 			MaxIdleTimeout:                maxDuration,
 			KeepAlivePeriod:               maxDuration,
-			Versions:                      []quic_go.VersionNumber{0x1},
+			Versions:                      []quic_go.Version{0x1},
 			ClientHelloSeed:               &obfuscationSeed,
 			ClientMaxPacketSizeAdjustment: maxPacketSizeAdjustment,
 			DisablePathMTUDiscovery:       true,

+ 3 - 3
psiphon/common/protocol/customTLSProfiles_test.go

@@ -175,15 +175,15 @@ func TestCustomTLSProfiles(t *testing.T) {
 		t.Fatalf("BuildHandshakeState failed: %s", err)
 	}
 
-	if len(conn1.HandshakeState.Hello.Raw) == 0 {
+	if len(conn1.HandshakeState.Hello.Original) == 0 {
 		t.Fatalf("Missing raw ClientHello")
 	}
 
-	if len(conn2.HandshakeState.Hello.Raw) == 0 {
+	if len(conn2.HandshakeState.Hello.Original) == 0 {
 		t.Fatalf("Missing raw ClientHello")
 	}
 
-	if !bytes.Equal(conn1.HandshakeState.Hello.Raw, conn2.HandshakeState.Hello.Raw) {
+	if !bytes.Equal(conn1.HandshakeState.Hello.Original, conn2.HandshakeState.Hello.Original) {
 		t.Fatalf("Unidentical raw ClientHellos")
 	}
 }

+ 2 - 2
psiphon/common/quic/quic.go

@@ -1184,8 +1184,8 @@ func dialQUIC(
 			MaxIdleTimeout:       CLIENT_IDLE_TIMEOUT,
 			// TODO: add jitter to keep alive period
 			KeepAlivePeriod: CLIENT_IDLE_TIMEOUT / 2,
-			Versions: []ietf_quic.VersionNumber{
-				ietf_quic.VersionNumber(versionNumber)},
+			Versions: []ietf_quic.Version{
+				ietf_quic.Version(versionNumber)},
 			ClientHelloSeed:               clientHelloSeed,
 			GetClientHelloRandom:          getClientHelloRandom,
 			ClientMaxPacketSizeAdjustment: maxPacketSizeAdjustment,