Add ramdisk script, add commented proxying log
This commit is contained in:
3
main.go
3
main.go
@@ -15,7 +15,6 @@ import (
|
||||
)
|
||||
|
||||
type Server struct {
|
||||
addr string
|
||||
transport *http.Transport
|
||||
}
|
||||
|
||||
@@ -31,7 +30,6 @@ func NewServer(addr, clientcrt, clientkey, servercrt string) (*Server, error) {
|
||||
return nil, err
|
||||
}
|
||||
return &Server{
|
||||
addr: addr,
|
||||
transport: &http.Transport{
|
||||
Proxy: func(*http.Request) (*url.URL, error) {
|
||||
return url.Parse(addr)
|
||||
@@ -53,6 +51,7 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
// proxy via stuncaddsies
|
||||
//logger.Log("Proxying", r.URL.String())
|
||||
proxy := httputil.NewSingleHostReverseProxy(pathlessURL(r.URL))
|
||||
proxy.Transport = s.transport
|
||||
proxy.ServeHTTP(w, r)
|
||||
|
||||
Reference in New Issue
Block a user