excludeHostsForProxy setting doesn't work in the last version

See original GitHub issue

Hi and thank you for you great job on this extension!

I found a potential issue in the last version (0.20.2) related to the excludeHostsForProxy setting, it seems to be ignored.

I tried to uninstall the new version in favour of an old one (0.19.0) and with the old version the setting works properly.

Has anything changed in the settings’ definition in the last release?

Steps to reproduce the error:

  1. Being behind a proxy
  2. Set proxy in VS Code
  3. Run a webservice locally
  4. Update excludeHostsForProxy setting like this: "rest-client.excludeHostsForProxy": ["localhost"]
  5. Make a request to your webservice (i.e. GET http://localhost:8080) -> Receive: Proxy Error response

Thank you, Federico

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:13 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
Huachaocommented, Oct 23, 2018

@Fed29 Thanks for your feedback, I have fixed the inconsistent behavior and will publish this fix in next release.

1reaction
Fed29commented, Oct 22, 2018

Yes @Huachao , exactly but only in the case you use the “rest-client.excludeHostsForProxy” setting.

Please, try the test I posted earlier:

VSCode Settings:

{
    "http.proxy": "http://not-exists-2:8080",
    "http.proxyStrictSSL": false,
    "rest-client.excludeHostsForProxy": ["127.0.0.1"]
}

Env Variables (restart VSCode after the edit)

HTTP_PROXY = "http://not-exists-1:8080"
NO_PROXY = localhost

At this point the VSCode proxy should be “http://not-exists-2:8080”, do you agree?

Send the request to GET http://127.0.0.1:50201 and it shouldn’t use proxy, right?

But you will receive an error like “ERROR: getaddrinfo ENOTFOUND not-exists1 not-exists1:8080” this means the extension try to use the proxy in the env variable, that should be “overrided” by the VSCode proxy setting and excluded by the “rest-client.excludeHostsForProxy” setting.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configure device proxy and Internet connection settings
Configure the Microsoft Defender for Endpoint proxy and internet settings to enable communication with the cloud service.
Read more >
Change proxy settings on Mac - Apple Support
On your Mac, use proxy settings to manage internet proxy services. ... Exclude simple hostnames ... Bypass proxy settings for these hosts &...
Read more >
Maven proxy settings not working - Stack Overflow
I'm not able to do this with MVN 3.0.4 but I do with 3.0.3. It seems to be a bug in the 3.0.4...
Read more >
How to set network proxy to ignore “localhost” on Windows 10?
Click File > Open and browse to the file at C:\Windows\System32\drivers\etc\hosts (you can copy and paste this into the address bar at the ......
Read more >
Add an Exception to Your Proxy Settings - City of St. Louis
Adding an Exception in Internet Explorer · Go to Tools >> Internet Options · Click on the Connections tab · Click on LAN...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found