mirror of
https://github.com/xvzc/SpoofDPI.git
synced 2024-12-22 06:15:51 +00:00
fix log format
This commit is contained in:
parent
ed70bde7e7
commit
a93b564d60
@ -48,7 +48,7 @@ func (d *DnsResolver) Lookup(domain string) (string, error) {
|
||||
|
||||
response, _, err := c.Exchange(msg, dnsServer)
|
||||
if err != nil {
|
||||
return "", errors.New(" couldn't resolve the domain")
|
||||
return "", errors.New("couldn not resolve the domain")
|
||||
}
|
||||
|
||||
for _, answer := range response.Answer {
|
||||
@ -58,7 +58,7 @@ func (d *DnsResolver) Lookup(domain string) (string, error) {
|
||||
}
|
||||
}
|
||||
|
||||
return "", errors.New("[DNS] couldn't resolve the domain")
|
||||
return "", errors.New("couldn not resolve the domain")
|
||||
}
|
||||
|
||||
func dohLookup(domain string) (string, error) {
|
||||
@ -68,7 +68,7 @@ func dohLookup(domain string) (string, error) {
|
||||
|
||||
rsp, err := c.Query(ctx, dohDns.Domain(domain), dohDns.TypeA)
|
||||
if err != nil {
|
||||
return "", errors.New("[DOH] couldn't resolve the domain")
|
||||
return "", errors.New("could not resolve the domain")
|
||||
}
|
||||
// doh dns answer
|
||||
answer := rsp.Answer
|
||||
@ -86,5 +86,5 @@ func dohLookup(domain string) (string, error) {
|
||||
// close the client
|
||||
c.Close()
|
||||
|
||||
return "", errors.New("[DOH] couldn't resolve the domain")
|
||||
return "", errors.New("couldn not resolve the domain")
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ func (pxy *Proxy) HandleHttp(lConn *net.TCPConn, pkt *packet.HttpPacket, ip stri
|
||||
if pkt.Port() != "" {
|
||||
port, err = strconv.Atoi(pkt.Port())
|
||||
if err != nil {
|
||||
log.Debug("[HTTPS] Error while parsing port for ", pkt.Domain(), " aborting..")
|
||||
log.Debug("[HTTP] Error while parsing port for ", pkt.Domain(), " aborting..")
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -84,7 +84,7 @@ func (pxy *Proxy) Start() {
|
||||
|
||||
// Avoid recursively querying self
|
||||
if pkt.Port() == strconv.Itoa(pxy.port) && isLoopedRequest(net.ParseIP(ip)) {
|
||||
log.Error("[HTTP] Invalid request: final target has the same IP and port as our proxy")
|
||||
log.Error("[PROXY] Looped request has been detected. aborting.")
|
||||
conn.Close()
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user