mirror of
https://github.com/e1732a364fed/v2ray_simple.git
synced 2025-12-24 13:27:56 +08:00
修订代码;e1732a364fed/ui -> v0.0.1-alpha.13
This commit is contained in:
2
go.mod
2
go.mod
@@ -7,7 +7,7 @@ require (
|
||||
github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d
|
||||
github.com/biter777/countries v1.5.6
|
||||
github.com/dustin/go-humanize v1.0.0
|
||||
github.com/e1732a364fed/ui v0.0.1-alpha.12
|
||||
github.com/e1732a364fed/ui v0.0.1-alpha.13
|
||||
github.com/gobwas/ws v1.1.0
|
||||
github.com/lucas-clemente/quic-go v0.0.0-00010101000000-000000000000
|
||||
github.com/manifoldco/promptui v0.9.0
|
||||
|
||||
4
go.sum
4
go.sum
@@ -20,8 +20,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo=
|
||||
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
|
||||
github.com/e1732a364fed/ui v0.0.1-alpha.12 h1:XAVcgQlF8l1VCxlMexX0UJkShFBzSI1m1bFDuX9nfOA=
|
||||
github.com/e1732a364fed/ui v0.0.1-alpha.12/go.mod h1:uK9ryjwA0+3KdICbeXm5IjhKZ+1ZooMVDdTuLaQHpwM=
|
||||
github.com/e1732a364fed/ui v0.0.1-alpha.13 h1:S0f1KDwZjQatrKr6vy35jf9iL1OvHuj4KYWnrO+hqZQ=
|
||||
github.com/e1732a364fed/ui v0.0.1-alpha.13/go.mod h1:uK9ryjwA0+3KdICbeXm5IjhKZ+1ZooMVDdTuLaQHpwM=
|
||||
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 h1:p104kn46Q8WdvHunIJ9dAyjPVtrBPhSr3KT2yUst43I=
|
||||
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
|
||||
github.com/gobwas/httphead v0.1.0 h1:exrUm0f4YX0L7EBwZHuCF4GDp8aJfVeBrlLQrs6NqWU=
|
||||
|
||||
@@ -27,7 +27,7 @@ func getShadowTlsPasswordFromExtra(extra map[string]any) string {
|
||||
return ""
|
||||
}
|
||||
|
||||
// 转发并判断tls1握手结束后直接返回
|
||||
// 转发并判断tls1.2握手结束后直接返回
|
||||
func shadowTls1(servername string, clientConn net.Conn) (err error) {
|
||||
var fakeConn net.Conn
|
||||
fakeConn, err = net.Dial("tcp", servername+":443")
|
||||
@@ -66,10 +66,13 @@ func shadowTls1(servername string, clientConn net.Conn) (err error) {
|
||||
<-finish1
|
||||
|
||||
if e1 != nil || e2 != nil {
|
||||
e := utils.Errs{List: []utils.ErrsItem{
|
||||
{Index: 1, E: e1},
|
||||
{Index: 2, E: e2},
|
||||
}}
|
||||
e := utils.Errs{}
|
||||
if e1 != nil {
|
||||
e.Add(utils.ErrsItem{Index: 1, E: e1})
|
||||
}
|
||||
if e2 != nil {
|
||||
e.Add(utils.ErrsItem{Index: 2, E: e2})
|
||||
}
|
||||
|
||||
return e
|
||||
}
|
||||
@@ -81,8 +84,7 @@ func shadowTls1(servername string, clientConn net.Conn) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
// 握手成功后返回 *FakeAppDataConn
|
||||
func shadowTls2(servername string, clientConn net.Conn, password string) (result net.Conn, err error) {
|
||||
func shadowTls2(servername string, clientConn net.Conn, password string) (result *FakeAppDataConn, err error) {
|
||||
var fakeConn net.Conn
|
||||
fakeConn, err = net.Dial("tcp", servername+":443")
|
||||
if err != nil {
|
||||
|
||||
@@ -292,13 +292,7 @@ func (cd *ComSniff) sniff_hello(pAfter []byte, isclienthello bool, onlyForSni bo
|
||||
|
||||
b := uint64(extensionsBs[cursor])
|
||||
switch b {
|
||||
case 2 << 9:
|
||||
fallthrough
|
||||
case 2 << 10:
|
||||
fallthrough
|
||||
case 2 << 11:
|
||||
fallthrough
|
||||
case 2 << 12:
|
||||
case 2 << 9, 2 << 10, 2 << 11, 2 << 12:
|
||||
|
||||
default:
|
||||
cd.DefinitelyNotTLS = true
|
||||
|
||||
Reference in New Issue
Block a user