Debian Codegraph @

examples/goproxy-no-reddit-at-worktime/README.md

raw
1 # Request Filtering
2
3 `goproxy-no-reddit-at-work` starts an HTTP proxy on :8080. It denies requests
4 to "www.reddit.com" made between 8am to 5pm inclusive, local time.
5
6 Start it in one shell:
7
8 ```sh
9 $ goproxy-no-reddit-at-work
10 ```
11
12 Fetch reddit in another:
13
14 ```sh
15 $ http_proxy=http://127.0.0.1:8080 wget -O - http://www.reddit.com
16 --2015-04-11 16:59:01-- http://www.reddit.com/
17 Connecting to 127.0.0.1:8080... connected.
18 Proxy request sent, awaiting response... 403 Forbidden
19 2015-04-11 16:59:01 ERROR 403: Forbidden.
20 ```
21