Skip to content

Support http.noProxy#1134

Open
whois-jon-peterson wants to merge 1 commit into
redhat-developer:mainfrom
whois-jon-peterson:feat/support-no_proxy-config
Open

Support http.noProxy#1134
whois-jon-peterson wants to merge 1 commit into
redhat-developer:mainfrom
whois-jon-peterson:feat/support-no_proxy-config

Conversation

@whois-jon-peterson

Copy link
Copy Markdown

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.noProxy setting.

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_PROXY environment variable were no longer failing to load. Schemas hosted at proxied URLs also continue to load.

@whois-jon-peterson

Copy link
Copy Markdown
Author

Is there anything that I can do to help get this merged?

@datho7561 datho7561 self-requested a review December 10, 2025 14:40
@datho7561 datho7561 moved this to Pending review in Java Tooling Dec 10, 2025
const noProxyEntries = noProxy.map((item) => item.trim());
const uriAuthority = Uri.parse(uri).authority;
return !noProxyEntries.some((entry) => {
if (entry.startsWith('*.')) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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: material

and it says it can't load the schema.

@StephenOTT

Copy link
Copy Markdown

Can we get this merged?

@datho7561

Copy link
Copy Markdown
Contributor

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.

@jenia90

jenia90 commented Jun 19, 2026

Copy link
Copy Markdown

There's an issue with this PR for schema urls that include a port number. For example, if I set noProxy to include 127.0.0.1 and my schema url is something like http://127.0.0.1:12345/schema.json, you'd get the same issue with it failing to get the schema.

@whois-jon-peterson

Copy link
Copy Markdown
Author

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.

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

Labels

None yet

Projects

Status: Pending review

Development

Successfully merging this pull request may close these issues.

4 participants