mirror of
https://github.com/tailscale/tailscale.git
synced 2025-09-21 05:31:36 +02:00
temp
Signed-off-by: KevinLiang10 <37811973+KevinLiang10@users.noreply.github.com>
This commit is contained in:
parent
eed3e5dc61
commit
cf8cafecc8
@ -887,12 +887,15 @@ func (b *LocalBackend) serveWebHandler(w http.ResponseWriter, r *http.Request) {
|
||||
b.serveFileOrDirectory(w, r, v, mountPoint)
|
||||
return
|
||||
}
|
||||
fmt.Println("Kevin: I was here in serveWebHandler")
|
||||
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)
|
||||
if !ok {
|
||||
http.Error(w, "unknown proxy destination", http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
fmt.Println("Kevin: Service handler loaded, about to serve")
|
||||
h := p.(http.Handler)
|
||||
// Trim the mount point from the URL path before proxying. (#6571)
|
||||
if r.URL.Path != "/" {
|
||||
|
10
ipn/serve.go
10
ipn/serve.go
@ -684,11 +684,11 @@ func ExpandProxyTargetValue(target string, supportedSchemes []string, defaultSch
|
||||
}
|
||||
|
||||
// validate the host.
|
||||
switch u.Hostname() {
|
||||
case "localhost", "127.0.0.1":
|
||||
default:
|
||||
return "", errors.New("only localhost or 127.0.0.1 proxies are currently supported")
|
||||
}
|
||||
// switch u.Hostname() {
|
||||
// case "localhost", "127.0.0.1":
|
||||
// default:
|
||||
// return "", errors.New("only localhost or 127.0.0.1 proxies are currently supported")
|
||||
// }
|
||||
|
||||
// validate the port
|
||||
port, err := strconv.ParseUint(u.Port(), 10, 16)
|
||||
|
@ -1151,6 +1151,7 @@ func (t *Wrapper) filterPacketInboundFromWireGuard(p *packet.Parsed, captHook pa
|
||||
if filt == nil {
|
||||
return filter.Drop, gro
|
||||
}
|
||||
fmt.Println("Kevin: I was here at filterPacketInboundFromWireGuard")
|
||||
outcome := filt.RunIn(p, t.filterFlags)
|
||||
|
||||
// Let peerapi through the filter; its ACLs are handled at L7,
|
||||
|
Loading…
x
Reference in New Issue
Block a user