diff options
Diffstat (limited to 'ipn')
| -rw-r--r-- | ipn/ipnlocal/serve.go | 8 | ||||
| -rw-r--r-- | ipn/serve.go | 4 |
2 files changed, 9 insertions, 3 deletions
diff --git a/ipn/ipnlocal/serve.go b/ipn/ipnlocal/serve.go index de9de77ce..8778548c1 100644 --- a/ipn/ipnlocal/serve.go +++ b/ipn/ipnlocal/serve.go @@ -356,10 +356,12 @@ func setHandler(sc *ipn.ServeConfig, req ipn.ServeStreamRequest) { wsc.Handlers[req.MountPoint] = &ipn.HTTPHandler{ Proxy: req.Source, } - if sc.AllowFunnel == nil { - sc.AllowFunnel = make(map[ipn.HostPort]bool) + if req.Funnel { + if sc.AllowFunnel == nil { + sc.AllowFunnel = make(map[ipn.HostPort]bool) + } + sc.AllowFunnel[req.HostPort] = true } - sc.AllowFunnel[req.HostPort] = true } func deleteHandler(sc *ipn.ServeConfig, req ipn.ServeStreamRequest, port uint16) { diff --git a/ipn/serve.go b/ipn/serve.go index 3b6034fa9..11df99726 100644 --- a/ipn/serve.go +++ b/ipn/serve.go @@ -93,6 +93,10 @@ type ServeStreamRequest struct { // MountPoint is the path prefix for // the given HostPort. MountPoint string `json:",omitempty"` + + // Funnel indicates whether the request + // is a serve request or a funnel one. + Funnel bool `json:",omitempty"` } // FunnelRequestLog is the JSON type written out to io.Writers |
