mirror of
https://github.com/yusing/godoxy.git
synced 2026-03-22 00:59:11 +01:00
refactor: remove net.URL and net.CIDR types, improved unmarshal handling
This commit is contained in:
@@ -12,7 +12,6 @@ import (
|
||||
"github.com/yusing/go-proxy/internal/logging"
|
||||
"github.com/yusing/go-proxy/internal/net/gphttp"
|
||||
"github.com/yusing/go-proxy/internal/net/gphttp/reverseproxy"
|
||||
"github.com/yusing/go-proxy/internal/net/types"
|
||||
"github.com/yusing/go-proxy/internal/utils/strutils"
|
||||
)
|
||||
|
||||
@@ -55,9 +54,9 @@ func ProxyHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
logging.Debug().Msgf("proxy http request: %s %s", r.Method, r.URL.String())
|
||||
|
||||
rp := reverseproxy.NewReverseProxy("agent", types.NewURL(&url.URL{
|
||||
rp := reverseproxy.NewReverseProxy("agent", &url.URL{
|
||||
Scheme: scheme,
|
||||
Host: host,
|
||||
}), transport)
|
||||
}, transport)
|
||||
rp.ServeHTTP(w, r)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user