(u *url.URL)
| 152 | } |
| 153 | |
| 154 | func addressFromURL(u *url.URL) string { |
| 155 | host := u.Hostname() |
| 156 | port := u.Port() |
| 157 | if port == "" { |
| 158 | switch strings.ToLower(u.Scheme) { |
| 159 | case "http": |
| 160 | port = "80" |
| 161 | case "https": |
| 162 | port = "443" |
| 163 | } |
| 164 | } |
| 165 | return net.JoinHostPort(host, port) |
| 166 | } |
| 167 | |
| 168 | func (s *ProxyHandler) HandleRequest(wr http.ResponseWriter, req *http.Request, username string) { |
| 169 | req.RequestURI = "" |