From 91c23a3a4841e746ecd9e0f2b6c7b491ffda33ef Mon Sep 17 00:00:00 2001 From: Brian Cunnie Date: Wed, 29 Nov 2023 14:59:04 -0800 Subject: [PATCH] Elaborate on why to use certain flags e.g. `-quiet` can save $30 / month. Or set `-nameservers` and `-addresses` if you're running your own sslip.io nameservers. --- src/sslip.io-dns-server/main.go | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/sslip.io-dns-server/main.go b/src/sslip.io-dns-server/main.go index cb23248..e59f0f0 100644 --- a/src/sslip.io-dns-server/main.go +++ b/src/sslip.io-dns-server/main.go @@ -14,8 +14,11 @@ import ( ) func main() { - var blocklistURL = flag.String("blocklistURL", "https://raw.githubusercontent.com/cunnie/sslip.io/main/etc/blocklist.txt", `URL containing a list of "forbidden" names/CIDRs`) - var nameservers = flag.String("nameservers", "ns-aws.sslip.io.,ns-azure.sslip.io.,ns-gce.sslip.io.", "comma-separated list of nameservers") + var blocklistURL = flag.String("blocklistURL", + "https://raw.githubusercontent.com/cunnie/sslip.io/main/etc/blocklist.txt", + `URL containing a list of non-resolvable IPs/names/CIDRs, usually phishing or scamming sites. Example "file://../../etc/blocklist.txt"`) + var nameservers = flag.String("nameservers", "ns-aws.sslip.io.,ns-azure.sslip.io.,ns-gce.sslip.io.", + "comma-separated list of FQDNs of nameservers. If you're running your own sslip.io nameservers, set them here") var addresses = flag.String("addresses", "sslip.io=78.46.204.247,"+ "sslip.io=2a01:4f8:c17:b8f::2,"+ @@ -26,9 +29,10 @@ func main() { "ns-aws.sslip.io=52.0.56.137,"+ "ns-aws.sslip.io=2600:1f18:aaf:6900::a,"+ "ns-azure.sslip.io=52.187.42.158,"+ - "ns-gce.sslip.io=104.155.144.4", "comma-separated list of hosts and corresponding IPv4 and/or IPv6 address(es). If unsure, add to the list rather than replace") + "ns-gce.sslip.io=104.155.144.4", + "comma-separated list of hosts and corresponding IPv4 and/or IPv6 address(es). If you're running your own sslip.io nameservers, add their hostnames and addresses here. If unsure, add to the list rather than replace") var bindPort = flag.Int("port", 53, "port the DNS server should bind to") - var quiet = flag.Bool("quiet", false, "suppresses logging of each DNS response") + var quiet = flag.Bool("quiet", false, "suppresses logging of each DNS response. Use this to avoid Google Cloud charging you $30/month to retain the logs of your GKE-based sslip.io server") flag.Parse() log.Printf("%s version %s starting", os.Args[0], xip.VersionSemantic) log.Printf("blocklist URL: %s, name servers: %s, bind port: %d, quiet: %t",