I have a bunch of websites running on one server (single IP) and they all run on high ports so I don't need root to run them.
When someone visits from one web address, lets say, http://address001.com/, I want to seamlessly pipe the data from port 4444 to the person who made this request, and if someone visits http://address002.com/ I want to pipe the data from port 5555.
How would I do this in Go?
So far I have a handler function that looks like this:
func home(w http.ResponseWriter, r *http.Request) {
if strings.Contains(r.Host, "address001") {
// ???
}
}