Skip to content

Latest commit

 

History

52 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

build coverage Docs

httpproxy

HTTP(S) and WebSocket forward proxy.

Supports user authentication, ContextDialer selection per proxy request and custom RoundTripper construction.

Only depends on the standard library. (Though the WebSocket tests use github.com/coder/websocket).

package main

import (
	"fmt"
	"net/http"

	"github.com/linkdata/httpproxy"
)

func main() {
	mux := http.NewServeMux()
	mux.HandleFunc("/{$}", func(w http.ResponseWriter, r *http.Request) {
		fmt.Fprintf(w, "This is a web proxy server.")
	})
	// the httpproxy.Server will handle CONNECT and absolute URL requests,
	// and all others will be forwarded to the http.Handler we set.
	go http.ListenAndServe(":8080", &httpproxy.Server{Handler: mux})
}

About

HTTP(S) forward proxy

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages