Documentation ¶
Overview ¶
Implements a sample proxy server in Go. Adapted from httputil.ReverseProxy's implementation
Sample usage: run this program, then elsewhere run
$ HTTP_PROXY=127.0.0.1:9999 go run http-client-get-url.go <some url>
Then the client will request <some url> through this proxy. Note: if <some url> is on localhost, Go clients will ignore HTTP_PROXY; to force them to use the proxy, either set up a proxy explicitly in the Transport, or set up an alias in /etc/hosts and use that instead of localhost.
Basic forward proxy set up using httputil.ReverseProxy ¶
A reverse proxy that load-balances between two backends in a round-robin fashion.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.