mirror of
https://github.com/xjasonlyu/tun2socks.git
synced 2025-10-08 18:20:41 +08:00
debug
This commit is contained in:
@@ -29,7 +29,6 @@ func (s *Server) ServeDNS(w D.ResponseWriter, r *D.Msg) {
|
|||||||
D.HandleFailed(w, r)
|
D.HandleFailed(w, r)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
s.h(w, r)
|
s.h(w, r)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -3,6 +3,7 @@ package proxy
|
|||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"github.com/xjasonlyu/tun2socks/common/log"
|
||||||
"io"
|
"io"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"net"
|
"net"
|
||||||
@@ -28,6 +29,7 @@ func lookupHost(fakeDNS dns.FakeDNS, target net.Addr) (targetHost string, err er
|
|||||||
targetHost = targetIP.String()
|
targetHost = targetIP.String()
|
||||||
// Replace with a domain name if target address IP is a fake IP
|
// Replace with a domain name if target address IP is a fake IP
|
||||||
if fakeDNS != nil {
|
if fakeDNS != nil {
|
||||||
|
log.Warnf("lookup dns: %v", targetHost)
|
||||||
if host, exist := fakeDNS.IPToHost(targetIP); exist {
|
if host, exist := fakeDNS.IPToHost(targetIP); exist {
|
||||||
targetHost = host
|
targetHost = host
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user