notwaldorf / cat-dns

:computer::cat: A DNS server that resolves everything to cats.
http://meowni.ca/posts/go-cat-dns-go/
MIT License
202 stars 23 forks source link

Creates option to bind server to custom host #10

Closed brycemcd closed 9 years ago

brycemcd commented 9 years ago

Was trolling around today for great April Fools' day software. Found it. Thank you @notwaldorf for such a great contribution to basic internet infrastructure.

This PR simply adds a host to bind the DNS server to.

This is important because I intend to re-route the office's DNS traffic to my host on our NAT.

To test, issue this at the command line:

sudo node cat-dns.js --host 10.10.1.20

or

sudo node cat-dns.js -h 10.10.1.20
notwaldorf commented 9 years ago

This is awesome!!! ✨

brycemcd commented 9 years ago

Thanks! I made the update and editorialized a little for the sake of clarity and caution.

colmmacc commented 9 years ago

This is a cool patch! but peanut gallery comment: '-h' usually means "help".

brycemcd commented 9 years ago

oh jeeze, you're totally right. I don't know how I missed that :/

Looking around at the dgram source, I think switching it to -a , --address makes the most sense here.

notwaldorf commented 9 years ago

Yay, teamwork! :shipit: