diff --git a/README.md b/README.md index 06faf33fc5148b625d6da8760419e94c95a64359..217fede33e0d5910a2125d03cb1835e0be4c24da 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,5 @@ -WIP - <p align="center"> - <img width="285" height="285" src="https://0xacab.org/warlordsam/assets/-/raw/no-masters/vpn-hole-mascot.png"> + <img width="285" height="285" src="https://0xacab.org/warlordsam/assets/-/raw/no-masters/vpn-hole_mascot.png"> </p> # **VPN-Hole** diff --git a/blacklist/subscription.go b/blacklist/subscription.go index b8fc076a4080625e31733cff5e703b8447e379f5..7641478b0647e8e83419cf0757d5e6b18a4c5679 100644 --- a/blacklist/subscription.go +++ b/blacklist/subscription.go @@ -40,7 +40,7 @@ func (b *Blacklist) updateList(ctx context.Context, blacklistURL, sum string) ([ b.subscriptions[blacklistURL] = newSum b.subscriptionsMu.Unlock() - log.Println("blacklist subscription updated", blacklistURL, newSum) + log.Println("\033[32m[+] blacklist subscription updated\033[0m", blacklistURL, newSum) - return hosts, nil + return hosts, nil } diff --git a/vpnhole/handler.go b/vpnhole/handler.go index 6fcd486c8d666373b5a00eeb7ffd4c125f29974b..f1d734af2b1545b24b847ac889d87002160bc8e4 100644 --- a/vpnhole/handler.go +++ b/vpnhole/handler.go @@ -42,10 +42,21 @@ func Handler(rw dns.ResponseWriter, req *dns.Msg) { return } + // To debug what is causing the i/o timeout error + // pretty.Println(resp) + if err = rw.WriteMsg(resp); err != nil { log.Println(fmt.Errorf("failed to reply: %w", err)) } + // To prevent the i/o timeout error from causing a panic that crashes vpnhole + // validate that the response is not nil before trying to access it + if resp.Answer == nil { + fmt.Println("\033[31m", "[-] Issue resolving DNS Name.", "\033[0m") + } else { + fmt.Println(resp.Answer) + } + } func Block(rw dns.ResponseWriter, req *dns.Msg) error {