Skip to content

A demo golang reverse proxy to inject an HTTP header

Notifications You must be signed in to change notification settings

marcc-orange/pproxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

A demo golang proxy

Install

$ go get github.com/marcc-orange/pproxy

Run

$ pproxy -target https://http2.golang.org/ -header-key test -header-value go

Test

$ curl -v http://localhost:8080/reqinfo

You should see test: go in the headers of the HTTP request.

Help

$ pproxy -h
Usage of ./pproxy:
  -header-key string
        The key of the injected header
  -header-value string
        The value of the injected header
  -listen int
        The port to listen locally (default 8080)
  -target string
        The URL to proxy (default "https://http2.golang.org/")

License

Public domain

About

A demo golang reverse proxy to inject an HTTP header

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages