This commit is contained in:
Frank Denis 2018-01-10 00:32:16 +01:00
parent 72a6963f2e
commit 3049f43bc7
1 changed files with 3 additions and 6 deletions

View File

@ -145,14 +145,11 @@ func (proxy *Proxy) processIncomingQuery(serverInfo *ServerInfo, serverProto str
var encryptedResponse []byte
if serverProto == "udp" {
encryptedResponse, err = proxy.exchangeWithUDPServer(serverInfo, encryptedQuery, clientNonce)
if err != nil {
return
}
} else {
encryptedResponse, err = proxy.exchangeWithTCPServer(serverInfo, encryptedQuery, clientNonce)
if err != nil {
return
}
}
if err != nil {
return
}
if clientAddr != nil {
clientPc.(net.PacketConn).WriteTo(encryptedResponse, *clientAddr)