http-proxy

command
v0.0.0-...-6a372e0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 18, 2024 License: MIT Imports: 8 Imported by: 0

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL