Skip to content

Conversation

@mohankumarelec
Copy link
Contributor

Testing Process

To test the http.noProxy setting in Visual Studio Code, you can follow these steps:

  1. Open Visual Studio Code: Launch Visual Studio Code on your computer.

  2. Access Settings: Navigate to the settings panel by clicking on "File" > "Preferences" > "Settings" or by using the shortcut Ctrl + , (Cmd + , on macOS).

  3. Search for http.noProxy Setting: In the search bar at the top of the settings panel, type http.noProxy. This will filter the settings to display only the http.noProxy setting.

  4. Modify http.noProxy Setting (if necessary): If you haven't already set the http.noProxy value, you can add it by clicking on the "Edit in settings.json" link below the setting. Alternatively, you can directly modify the settings.json file. Set the value of http.noProxy to a comma-separated list of domains or IP addresses that you want to exclude from the HTTP proxy routing. For example:

    "http.noProxy": "localhost, 127.0.0.1, example.com"
  5. Save Settings: After making changes, save the settings.json file.

  6. Test Connectivity: Now, you can test the changes by attempting to access resources that match the exclusions defined in http.noProxy. For example, if you've excluded localhost from the proxy routing, try accessing a local server running on your machine.

  7. Observe Network Requests: You can also use network debugging tools within Visual Studio Code or external tools like browser developer tools to observe network requests and confirm that the excluded domains or IP addresses are not being routed through the HTTP proxy.

  8. Verify Results: Verify that the excluded resources are accessible without going through the proxy server, confirming that the http.noProxy setting is functioning as expected.

By following these steps, you can effectively test the http.noProxy setting in Visual Studio Code and ensure that it meets your network configuration requirements.

@mohankumarelec
Copy link
Contributor Author

@microsoft-github-policy-service agree

Copy link
Collaborator

@chrmarti chrmarti left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! Left a comment.

@mohankumarelec mohankumarelec requested a review from chrmarti May 8, 2024 11:38
Copy link
Collaborator

@chrmarti chrmarti left a comment

Choose a reason for hiding this comment

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

Thanks for the update. To make it work for extensions (it currently only reconfigures Electron), you also need to loop the value in to: https://github.com/microsoft/vscode-proxy-agent/blob/91b81109c75632b18fa2340f296ccaff9e9bcefa/src/index.ts#L80

@mohankumarelec
Copy link
Contributor Author

Thanks for the update. To make it work for extensions (it currently only reconfigures Electron), you also need to loop the value in to: https://github.com/microsoft/vscode-proxy-agent/blob/91b81109c75632b18fa2340f296ccaff9e9bcefa/src/index.ts#L80

Hi @chrmarti ,
I have updated the code to set no_proxy variable value to process.env from configuration, so that the no_proxy env variable gets directly passed to the @vscode/proxy-agent via ProxyAgentParams and the no_proxy support is enabled for extensions too.

https://github.com/microsoft/vscode-proxy-agent/blob/91b81109c75632b18fa2340f296ccaff9e9bcefa/src/index.ts#L73-L80

@mohankumarelec mohankumarelec requested a review from chrmarti May 14, 2024 11:51
Copy link

@Brianm93 Brianm93 left a comment

Choose a reason for hiding this comment

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

H

chrmarti pushed a commit to microsoft/vscode-proxy-agent that referenced this pull request Jun 24, 2024
Copy link
Collaborator

@chrmarti chrmarti left a comment

Choose a reason for hiding this comment

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

Great, thank you!

@vscodenpa vscodenpa added this to the June 2024 milestone Jun 24, 2024
@chrmarti chrmarti enabled auto-merge (squash) June 24, 2024 17:40
@chrmarti chrmarti merged commit e3e15e1 into microsoft:main Jun 24, 2024
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Aug 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants