Fix explicit HTTPS port handling for reverse proxies - #77
Open
BlackRockCity wants to merge 1 commit into
Open
Conversation
This change makes sure the script keeps using port 443 when that is the port you specified, instead of accidentally switching to port 555. This is important when a reverse proxy receives the connection on port 443 and then forwards it to the local server on port 555. Technically, the change keeps two forms of the local API address: one that preserves the explicitly configured port for the mitmproxy addon, and a second, normalized HTTPS address used only for the preflight check. This prevents normalization of the preflight URL from altering the port information later used to route intercepted traffic. Tested successfully with HAProxy on pfSense listening on port 443 and forwarding to the local Roborock server on port 555.
Author
|
This is analogous to the reverse-proxy port handling addressed for MQTT in PR #73, but applies to the HTTPS/local API path used by the mitmproxy addon and preflight check. |
1 task
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.
This change makes sure the script keeps using port 443 when it is explicitly specified, instead of accidentally switching to port 555. This is important when a reverse proxy receives the connection on port 443 and then forwards it to the local server on port 555.
Technically, the change keeps two forms of the local API address: one that preserves the explicitly configured :443 for the mitmproxy addon, and a second, normalized HTTPS address used only for the preflight check. This prevents normalization of the preflight URL from altering the port information later used to route intercepted traffic.
Tested successfully with HAProxy on pfSense listening on port 443 and forwarding to the local Roborock server on port 555.