Signed-off-by: KevinLiang10 <37811973+KevinLiang10@users.noreply.github.com>
This commit is contained in:
KevinLiang10 2025-09-08 13:53:42 -04:00
parent eed3e5dc61
commit cf8cafecc8
3 changed files with 9 additions and 5 deletions

View File

@ -887,12 +887,15 @@ func (b *LocalBackend) serveWebHandler(w http.ResponseWriter, r *http.Request) {
b.serveFileOrDirectory(w, r, v, mountPoint) b.serveFileOrDirectory(w, r, v, mountPoint)
return return
} }
fmt.Println("Kevin: I was here in serveWebHandler")
if v := h.Proxy(); v != "" { if v := h.Proxy(); v != "" {
fmt.Println("Kevin: I was here in serveWebHandler and about to load proxy handler")
p, ok := b.serveProxyHandlers.Load(v) p, ok := b.serveProxyHandlers.Load(v)
if !ok { if !ok {
http.Error(w, "unknown proxy destination", http.StatusInternalServerError) http.Error(w, "unknown proxy destination", http.StatusInternalServerError)
return return
} }
fmt.Println("Kevin: Service handler loaded, about to serve")
h := p.(http.Handler) h := p.(http.Handler)
// Trim the mount point from the URL path before proxying. (#6571) // Trim the mount point from the URL path before proxying. (#6571)
if r.URL.Path != "/" { if r.URL.Path != "/" {

View File

@ -684,11 +684,11 @@ func ExpandProxyTargetValue(target string, supportedSchemes []string, defaultSch
} }
// validate the host. // validate the host.
switch u.Hostname() { // switch u.Hostname() {
case "localhost", "127.0.0.1": // case "localhost", "127.0.0.1":
default: // default:
return "", errors.New("only localhost or 127.0.0.1 proxies are currently supported") // return "", errors.New("only localhost or 127.0.0.1 proxies are currently supported")
} // }
// validate the port // validate the port
port, err := strconv.ParseUint(u.Port(), 10, 16) port, err := strconv.ParseUint(u.Port(), 10, 16)

View File

@ -1151,6 +1151,7 @@ func (t *Wrapper) filterPacketInboundFromWireGuard(p *packet.Parsed, captHook pa
if filt == nil { if filt == nil {
return filter.Drop, gro return filter.Drop, gro
} }
fmt.Println("Kevin: I was here at filterPacketInboundFromWireGuard")
outcome := filt.RunIn(p, t.filterFlags) outcome := filt.RunIn(p, t.filterFlags)
// Let peerapi through the filter; its ACLs are handled at L7, // Let peerapi through the filter; its ACLs are handled at L7,