mirror of
https://github.com/nadoo/glider.git
synced 2026-11-19 07:09:42 +08:00
tls: fixed a bug in tls which may lose proxy addr
This commit is contained in:
1 parent
4cb9ea2bdc
commit
6604bfe8a7
2 files changed
+3
-1
No files matched your search
@@ -43,6 +43,7 @@ func NewTLS(s string, d proxy.Dialer, p proxy.Proxy) (*TLS, error) {
|
||||
}
|
||||
|
||||
addr := u.Host
|
||||
|
||||
colonPos := strings.LastIndex(addr, ":")
|
||||
if colonPos == -1 {
|
||||
colonPos = len(addr)
|
||||
@@ -57,6 +58,7 @@ func NewTLS(s string, d proxy.Dialer, p proxy.Proxy) (*TLS, error) {
|
||||
t := &TLS{
|
||||
dialer: d,
|
||||
proxy: p,
|
||||
addr: addr,
|
||||
serverName: serverName,
|
||||
skipVerify: false,
|
||||
certFile: certFile,
|
||||
|
||||
Reference in new issue
Block a user