Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Simple reverse proxy in Go.
package main
import (
func main() {
u, err := url.Parse("")
if err != nil {
reverse_proxy := httputil.NewSingleHostReverseProxy(u)
http.Handle("/", reverse_proxy)
if err = http.ListenAndServe(":8080", nil); err != nil {
log.Println("Server started")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment