gophergala / dnsp

A DNS Proxy

Home Page:http://godoc.org/github.com/gophergala/dnsp

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Simple Blocklist

attilaolah opened this issue · comments

Support a simple blocklist based on the current hosts file reader.

  • read the hosts file line by line
  • chop off the comments from the end of the line
  • if there's stuff left before the comment, see if the IP is 127.0.0.1 or ::1.
  • if yes, add the host to the blocklist (s.Block(host)).

This is now done and merged.