Focus.py

Focus.py helps you keep focused by applying schedulable firewall rules to distracting websites. An example firewall rule looks like this:

 

def domain_reddit_com(dt):
    return dt.hour == 21 # allow from 9-10pm

 

Focus.py is, at its core, a DNS server. By making it your primary nameserver, it receives all DNS lookup requests. Based on the domain name being requested, it either responds with a "fail ip" address (blocked), or passes the request on to your other nameservers (not blocked). In both cases, Focus adjusts the TTL of each DNS response so that the service requesting the DNS lookup will do minimal caching on the IP, allowing Focus's filtering rules to be more immediate.

Via HN.

33 views and 0 responses