Support http.noProxy#1134
Conversation
|
Is there anything that I can do to help get this merged? |
| const noProxyEntries = noProxy.map((item) => item.trim()); | ||
| const uriAuthority = Uri.parse(uri).authority; | ||
| return !noProxyEntries.some((entry) => { | ||
| if (entry.startsWith('*.')) { |
There was a problem hiding this comment.
The *. feature doesn't seem to be working for me unfortunately.
I have (note that there isn't actually a proxy):
{
"http.proxy": "http://localhost:5736",
"http.noProxy": [
"*.github.io"
],
}And I have:
# yaml-language-server: $schema=https://squidfunk.github.io/mkdocs-material/schema.json
site_name: My Docs
site_url: https://example.com
theme:
name: materialand it says it can't load the schema.
|
Can we get this merged? |
|
I was hoping to have the asterisk feature fixed before merging. I did a bit of digging and it seems curl at least prefers ".google.com" over "*.google.com" to mean "google.com" or ""maps.google.com", etc. |
|
There's an issue with this PR for schema urls that include a port number. For example, if I set noProxy to include |
|
In the intervening time between submission and renewed interest, my contract with the employer whose networking setup necessitated these changes has come to an end. I no longer possess the environment (nor the desire to figure out how to mock one in my home) to appropriately test these changes. If any interested party would like to adopt this and bring it over the finish line, I'd welcome their efforts. |
What does this PR do?
Adds a check before proxying a request to fetch JSONSchema content, to ensure the request URI does not match the domains specified in the
http.noProxysetting.What issues does this PR fix or reference?
Related to the error described in #694, but not necessarily a complete fix for all circumstances reported by participants.
Is it tested? How?
Added unit tests for the new helper method.
Tested e2e by building and installing from source on a machine behind a ZScaler proxy, then confirming schemas hosted at URLs matching my
NO_PROXYenvironment variable were no longer failing to load. Schemas hosted at proxied URLs also continue to load.