fix https server crash

This commit is contained in:
rui.zheng 2017-08-04 17:59:26 +08:00
parent c28e712560
commit 821ab4d3b7
2 changed files with 1 additions and 6 deletions

View File

@ -5,8 +5,6 @@ import (
"net/url" "net/url"
"strconv" "strconv"
"strings" "strings"
"github.com/go-log/log"
) )
// Node is a proxy node, mainly used to construct a proxy chain. // 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 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) return whitelist.Can(action, host, port) && !blacklist.Can(action, host, port)
} }

2
tls.go
View File

@ -41,7 +41,7 @@ func TLSListener(addr string, config *tls.Config) (Listener, error) {
if err != nil { if err != nil {
return nil, err 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 // Wrap a net.Conn into a client tls connection, performing any