mirror of https://github.com/cbeuw/Cloak
Print UID in base64 and delete a session properly
This commit is contained in:
parent
ea5bb44b0a
commit
af0a356000
|
|
@ -56,7 +56,7 @@ func dispatchConnection(conn net.Conn, sta *server.State) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.WithFields(log.Fields{
|
log.WithFields(log.Fields{
|
||||||
"remoteAddr": remoteAddr,
|
"remoteAddr": remoteAddr,
|
||||||
"UID": UID,
|
"UID": b64(UID),
|
||||||
"sessionId": sessionID,
|
"sessionId": sessionID,
|
||||||
"proxyMethod": proxyMethod,
|
"proxyMethod": proxyMethod,
|
||||||
"encryptionMethod": encryptionMethod,
|
"encryptionMethod": encryptionMethod,
|
||||||
|
|
@ -160,7 +160,7 @@ func dispatchConnection(conn net.Conn, sta *server.State) {
|
||||||
localConn, err := net.Dial("tcp", sta.ProxyBook[proxyMethod])
|
localConn, err := net.Dial("tcp", sta.ProxyBook[proxyMethod])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Errorf("Failed to connect to %v: %v", proxyMethod, err)
|
log.Errorf("Failed to connect to %v: %v", proxyMethod, err)
|
||||||
sesh.Close()
|
user.DeleteSession(sessionID, "Failed to connect to proxy server")
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
go util.Pipe(localConn, newStream)
|
go util.Pipe(localConn, newStream)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue