Skip to content

Proxy Bypass (NO_PROXY) does not work #3548

Closed

Description

@bsteinemann

Description

In our company we have to use a proxy server when restoring the nuget packages from nuget.org.
To restore our own nuget packages from our internal nuget server we tried to use NO_PROXY Environment variable to bypass the proxy server

Unfortunatly the package restore fails when we set the HTTP(S)_PROXY and the NO_PROXY variables.

Note:
The problem only occurs if there is no system proxy configured. Which is the case on our build server.

Repro steps

The roxy server is not configured as system proxy.
Paket version: 5.198.0
To reproduce the problem i created a .bat file with the following content:

SET HTTPS_PROXY=http://proxy.company.com:8080
SET HTTP_PROXY=http://proxy.company.com:8080
SET NO_PROXY=nuget.internal.company.com

.paket/paket.exe

I tried the following values for the NO_PROXY variable but non of them worked.
*.internal.company.com
.internal.company.com

Expected behavior

The package restore should work.

Actual behavior

The package restore fails with an HTTP 404.

Known workarounds

Since our nuget server does not use https we were able to remove the HTTP_PROXY variable and bypass the proxy for all http urls.

Activity

  1. added a commit that references this issue on Aug 29, 2026
    6aeb173
  2. github-actions commented on Aug 29, 2026

    @github-actions
    Contributor

    🤖 This is an automated response from Repo Assist.

    Thanks for the report! I found the root cause: envProxies() in NetUtils.fs calls Regex.Escape on the whole NO_PROXY string before trying to convert * into .*, but Regex.Escape already turns * into the literal \*, so the wildcard replacement never actually happens. Wildcard entries like *.internal.company.com were silently compiled into a useless literal pattern that never matches any host, so the proxy bypass was effectively ignored for those entries.

    I've opened a draft fix with a regression test: the PR is linked to this issue and will close it automatically once merged. Please take a look when you have a chance!

    Generated by 🌈 Repo Assist, see workflow run. Learn more.
    Comment /repo-assist to run again

    Add this agentic workflow to your repo

    To install this agentic workflow, run

    gh aw add githubnext/agentics/workflows/repo-assist.md@ae8d551f07c7ed7619f8c58c7bb4c3ac89395d38
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions