mxc icon indicating copy to clipboard operation
mxc copied to clipboard

runtimeConfig.networkProxy rejects explicit default ports (:80, :443)

Open theelliotm opened this issue 1 week ago • 0 comments

Relevant area(s)

Linux, macOS, Windows

Brief description of your issue

runtimeConfig.networkProxy rejects URLs that explicitly use the scheme's default port (http://proxy:80, https://proxy:443) with "must include a port". All backends that accept a proxy (Bubblewrap, Seatbelt, ProcessContainer, NVX, WSLC) are affected because they share convert_wire_proxy_at in src/mxc-sdk/src/core/mxc_common/network_parser.rs.

url::Url::port() returns None when the port equals the scheme default, so an explicit :80/:443 looks the same as an omitted port.

Steps to reproduce

Run any request with:

"runtimeConfig": { "networkProxy": "http://proxy.example:80" }

Expected behavior

Accepted: the port is explicit. URLs with no port (http://proxy.example) should stay rejected, since clients such as curl assume port 1080 for a portless proxy.

Actual behavior

Rejected: runtimeConfig.networkProxy must include a port (e.g., http://localhost:8080), got: http://proxy.example:80. Proxies on ports 80 or 443 can't be configured on any backend.

Note: port_or_known_default() is not the fix, since it would also accept portless URLs.

theelliotm avatar Nov 18 '26 23:11 theelliotm