mirror of
https://github.com/v2rayA/v2rayA.git
synced 2026-11-20 23:02:25 +03:00
fix: simple-obfs didn't work in some cases
This commit is contained in:
1 parent
1e75bc34ef
commit
ea4e505c79
1 file changed
+3
-6
@@ -89,14 +89,11 @@ func (s *SimpleObfs) dial(network, addr string) (c net.Conn, err error) {
|
||||
}
|
||||
switch s.obfstype {
|
||||
case HTTP:
|
||||
rs := strings.Split(s.addr, ":")
|
||||
var port string
|
||||
if len(rs) == 1 {
|
||||
_, port, _ := net.SplitHostPort(s.addr)
|
||||
if port == "" {
|
||||
port = "80"
|
||||
} else {
|
||||
port = rs[1]
|
||||
}
|
||||
c = NewHTTPObfs(rc, rs[0], port, s.path)
|
||||
c = NewHTTPObfs(rc, s.host, port, s.path)
|
||||
case TLS:
|
||||
c = NewTLSObfs(rc, s.host)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user