Created
August 21, 2018 17:00
-
-
Save jan4984/b147ad70fad8b00839e3d6129c85b336 to your computer and use it in GitHub Desktop.
simple proxy for LAN https
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"net/http" | |
"net/http/httputil" | |
"net/url" | |
) | |
func main() { | |
rpURL, err := url.Parse("http://10.0.0.125:8080") | |
if err != nil { | |
panic(err) | |
} | |
err = http.ListenAndServeTLS(":8080", "cert.pem", "key.pem", httputil.NewSingleHostReverseProxy(rpURL)) | |
if err != nil { | |
panic(err) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment