mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-11 21:27:31 +00:00
ipn/ipnlocal, wgengine/netstack: start handling ports for future serving
Updates tailscale/corp#7515 Change-Id: I966e936e72a2ee99be8d0f5f16872b48cc150258 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:

committed by
Brad Fitzpatrick

parent
acf5839dd2
commit
2daf0f146c
@@ -554,9 +554,8 @@ func (ns *Impl) shouldProcessInbound(p *packet.Parsed, t *tstun.Wrapper) bool {
|
||||
if dport == peerAPIPort {
|
||||
return true
|
||||
}
|
||||
|
||||
// Also handle SSH connections, if enabled.
|
||||
if dport == 22 && ns.lb.ShouldRunSSH() {
|
||||
// Also handle SSH connections, webserver, etc, if enabled:
|
||||
if ns.lb.ShouldInterceptTCPPort(dport) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
@@ -894,6 +893,14 @@ func (ns *Impl) acceptTCP(r *tcp.ForwarderRequest) {
|
||||
ns.lb.HandleQuad100Port80Conn(c)
|
||||
return
|
||||
}
|
||||
if ns.lb.ShouldInterceptTCPPort(reqDetails.LocalPort) && ns.isLocalIP(dialIP) {
|
||||
c := createConn()
|
||||
if c == nil {
|
||||
return
|
||||
}
|
||||
ns.lb.HandleInterceptedTCPConn(c)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
if ns.ForwardTCPIn != nil {
|
||||
|
Reference in New Issue
Block a user