Bravo! I wish something like this existed on Linux: preferably implemented in the kernel so that it cannot be overridden with ifconfig or another command. Also: cute name for such a service: Go DOS Yourself.
It would be easy for the service to reject port 80 but allow the port used by the version-control system.
More difficult would be allowing access to programming documentation on the web while rejecting time-wasting web sites. One idea is to reject any web page that has changed in the last 24 hours on the theory that the time-wasting sites are constantly changing (are topical) whereas the sites you need to do your work are not. (I do not know if it possible programatically to determine when a page last changed.)
Honestly, I just removed reddit from my bookmarks toolbar, and make a conscious effort to not go there. That has made me much more productive even during "downtime". The side effect is that I post here more, but at least there is the lock out feature if I notice I'm wasting too much time here ;)