[vnet] fix: forward proxy-port traffic to support web apps invisible to VNet#63992
Open
[vnet] fix: forward proxy-port traffic to support web apps invisible to VNet#63992
Conversation
Contributor
Author
|
cc @ravicious if you want to see this one, it solves a very similar problem as my previous vnet web app access fix, except this one solves it in cases where VNet cannot query the web app at all |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #63980
What this fixes
Fixes a VNet regression where web app access could break when a user assumes an access request in Web UI only (not in Connect), while VNet is already running. In that state, an FQDN may resolve to a cluster-backed "undecided" handler, and proxy-port traffic could be rejected instead of being forwarded to the proxy.
Root cause
For cluster-matched FQDNs handled by
undecidedHandler, connection-time routing rejected non-SSH traffic unless the resolver returned a concrete web app match. When Connect-side app visibility didn't match apps that should be reachable from Web UI due to access requests, proxy-port traffic hit the reject path.Change
In
undecidedHandler::22webAppHandlersoftWebHandlerwith TTL)This avoids per-connection resolver calls during normal browser traffic, while still allowing periodic refresh in case the FQDN does not match a real web app and there is a matching TCP app that becomes visible later.
Why this is safe
:22RFD alignment
This more closely matches RFD 0207’s connection-forwarding intent:
:22The TTL soft fallback is an implementation detail to reduce resolver churn, while preserving the same routing intent.
Tests
Added/updated
TestPrioritycoverage inlib/vnet/vnet_test.go:Manual Test Plan
Changelog: Fixed a VNet regression where web app access could fail when access was assumed in the Web UI only while VNet was already running