From 821ab4d3b761d1e4814cfa727f502832cf095f92 Mon Sep 17 00:00:00 2001 From: "rui.zheng" Date: Fri, 4 Aug 2017 17:59:26 +0800 Subject: [PATCH] fix https server crash --- node.go | 5 ----- tls.go | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/node.go b/node.go index 82b7a3a..722f7f9 100644 --- a/node.go +++ b/node.go @@ -5,8 +5,6 @@ import ( "net/url" "strconv" "strings" - - "github.com/go-log/log" ) // Node is a proxy node, mainly used to construct a proxy chain. @@ -89,8 +87,5 @@ func Can(action string, addr string, whitelist, blacklist *Permissions) bool { return false } - if Debug { - log.Logf("Can action: %s, host: %s, port %d", action, host, port) - } return whitelist.Can(action, host, port) && !blacklist.Can(action, host, port) } diff --git a/tls.go b/tls.go index d01c281..fa162c8 100644 --- a/tls.go +++ b/tls.go @@ -41,7 +41,7 @@ func TLSListener(addr string, config *tls.Config) (Listener, error) { if err != nil { return nil, err } - return &tlsListener{tcpKeepAliveListener{ln.(*net.TCPListener)}}, nil + return &tlsListener{ln}, nil } // Wrap a net.Conn into a client tls connection, performing any