1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-22 10:08:15 -05:00

Remove unused utls

This commit is contained in:
RPRX 2020-07-20 05:59:46 +00:00 committed by GitHub
parent e46531261b
commit 9311cb18e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 10 deletions

1
go.mod
View File

@ -7,7 +7,6 @@ require (
github.com/google/go-cmp v0.5.0 github.com/google/go-cmp v0.5.0
github.com/gorilla/websocket v1.4.2 github.com/gorilla/websocket v1.4.2
github.com/miekg/dns v1.1.30 github.com/miekg/dns v1.1.30
github.com/refraction-networking/utls v0.0.0-20190909200633-43c36d3c1f57
github.com/seiflotfy/cuckoofilter v0.0.0-20200511222245-56093a4d3841 github.com/seiflotfy/cuckoofilter v0.0.0-20200511222245-56093a4d3841
github.com/stretchr/testify v1.6.1 github.com/stretchr/testify v1.6.1
github.com/xiaokangwang/VSign v0.0.0-20200704130305-63f4b4d7a751 github.com/xiaokangwang/VSign v0.0.0-20200704130305-63f4b4d7a751

2
go.sum
View File

@ -51,8 +51,6 @@ github.com/phayes/freeport v0.0.0-20180830031419-95f893ade6f2/go.mod h1:iIss55rK
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/refraction-networking/utls v0.0.0-20190909200633-43c36d3c1f57 h1:SL1K0QAuC1b54KoY1pjPWe6kSlsFHwK9/oC960fKrTY=
github.com/refraction-networking/utls v0.0.0-20190909200633-43c36d3c1f57/go.mod h1:tz9gX959MEFfFN5whTIocCLUG57WiILqtdVxI8c6Wj0=
github.com/seiflotfy/cuckoofilter v0.0.0-20200511222245-56093a4d3841 h1:pnfutQFsV7ySmHUeX6ANGfPsBo29RctUvDn8G3rmJVw= github.com/seiflotfy/cuckoofilter v0.0.0-20200511222245-56093a4d3841 h1:pnfutQFsV7ySmHUeX6ANGfPsBo29RctUvDn8G3rmJVw=
github.com/seiflotfy/cuckoofilter v0.0.0-20200511222245-56093a4d3841/go.mod h1:ET5mVvNjwaGXRgZxO9UZr7X+8eAf87AfIYNwRSp9s4Y= github.com/seiflotfy/cuckoofilter v0.0.0-20200511222245-56093a4d3841/go.mod h1:ET5mVvNjwaGXRgZxO9UZr7X+8eAf87AfIYNwRSp9s4Y=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=

View File

@ -22,11 +22,14 @@ func Dial(ctx context.Context, dest net.Destination, streamSettings *internet.Me
if config := tls.ConfigFromStreamSettings(streamSettings); config != nil { if config := tls.ConfigFromStreamSettings(streamSettings); config != nil {
tlsConfig := config.GetTLSConfig(tls.WithDestination(dest)) tlsConfig := config.GetTLSConfig(tls.WithDestination(dest))
/*
if config.IsExperiment8357() { if config.IsExperiment8357() {
conn = tls.UClient(conn, tlsConfig) conn = tls.UClient(conn, tlsConfig)
} else { } else {
conn = tls.Client(conn, tlsConfig) conn = tls.Client(conn, tlsConfig)
} }
*/
conn = tls.Client(conn, tlsConfig)
} }
tcpSettings := streamSettings.ProtocolSettings.(*Config) tcpSettings := streamSettings.ProtocolSettings.(*Config)

View File

@ -7,8 +7,6 @@ import (
"v2ray.com/core/common/buf" "v2ray.com/core/common/buf"
"v2ray.com/core/common/net" "v2ray.com/core/common/net"
utls "github.com/refraction-networking/utls"
) )
//go:generate errorgen //go:generate errorgen
@ -45,6 +43,7 @@ func Client(c net.Conn, config *tls.Config) net.Conn {
return &Conn{Conn: tlsConn} return &Conn{Conn: tlsConn}
} }
/*
func copyConfig(c *tls.Config) *utls.Config { func copyConfig(c *tls.Config) *utls.Config {
return &utls.Config{ return &utls.Config{
NextProtos: c.NextProtos, NextProtos: c.NextProtos,
@ -59,6 +58,7 @@ func UClient(c net.Conn, config *tls.Config) net.Conn {
uConfig := copyConfig(config) uConfig := copyConfig(config)
return utls.Client(c, uConfig) return utls.Client(c, uConfig)
} }
*/
// Server initiates a TLS server handshake on the given connection. // Server initiates a TLS server handshake on the given connection.
func Server(c net.Conn, config *tls.Config) net.Conn { func Server(c net.Conn, config *tls.Config) net.Conn {