mirror of
https://github.com/nadoo/glider.git
synced 2025-02-23 09:25:41 +08:00
tls: fixed a bug in tls which may lose proxy addr
This commit is contained in:
parent
4cb9ea2bdc
commit
6604bfe8a7
2
main.go
2
main.go
@ -29,7 +29,7 @@ import (
|
||||
_ "github.com/nadoo/glider/proxy/ws"
|
||||
)
|
||||
|
||||
var version = "0.8.0"
|
||||
var version = "0.8.2"
|
||||
|
||||
func main() {
|
||||
// read configs
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user