Skip to content

proxy: honor Windows proxy bypass macros and loopback defaults#280

Open
chitao1234 wants to merge 2 commits intohyperium:masterfrom
chitao1234:improve-windows-proxy-bypass
Open

proxy: honor Windows proxy bypass macros and loopback defaults#280
chitao1234 wants to merge 2 commits intohyperium:masterfrom
chitao1234:improve-windows-proxy-bypass

Conversation

@chitao1234
Copy link
Copy Markdown

Parse Windows ProxyOverride entries into explicit no-proxy rules while supporting the special <local> and <-loopback> semantics.

By default, preserve the system loopback bypass behavior for localhost, loopback, 127.0.0.1, and ::1, and add tests covering local-name and loopback matching.

Source:
https://learn.microsoft.com/en-us/windows/win32/wininet/enabling-internet-functionality
https://learn.microsoft.com/en-us/windows/win32/api/wininet/nf-wininet-internetopena

Parse Windows `ProxyOverride` entries into explicit no-proxy rules while
supporting the special `<local>` and `<-loopback>` semantics.

By default, preserve the system loopback bypass behavior for
`localhost`, `loopback`, `127.0.0.1`, and `::1`, and add tests covering
local-name and loopback matching.
Comment thread src/client/proxy/matcher.rs Outdated
ips: IpMatcher,
domains: DomainMatcher,
local_names: bool,
loopback_hosts: bool,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious, is there a reason to store additional booleans instead of just pushing localhost and the IPs to the DomainMatcher and IpMatcher?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that the loopback flags can be folded, and I folded them into the windows proxy override parsing logic. However the local flags should be kept due to there not being an equivalent for it (it matches all domain names without a dot in the middle like http://intranet/).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants