[GH-ISSUE #5798] Support standard HTTP_PROXY and HTTPS_PROXY variables to allow clients to connect from behind a proxy #11778

Open
opened 2026-08-05 01:30:57 -04:00 by saavagebueno · 0 comments
Owner

Originally created by @alexmge on GitHub (Apr 4, 2026).
Original GitHub issue: https://github.com/netbirdio/netbird/issues/5798

Is your feature request related to a problem? Please describe.
In my environment, all clients must connect to the web via a proxy (in my case Squid). It seems like the netbird server does not fully support the standard HTTP_PROXY and HTTPS_PROXY variables. Actually it seems that part of it does, while other parts don't.

First thing first, here is my /etc/sysconfig/netbird :

# BEGIN ANSIBLE MANAGED NETBIRD PROXY
HTTP_PROXY=http://<proxy_ip>:3128/
HTTPS_PROXY=http://<proxy_ip>:3128/
# END ANSIBLE MANAGED NETBIRD PROXY

I also tried setting the environement variables in the shell context before running netbird up.

When restarting my netbird service on the client, I can see that some requests coming from it are actually reaching the proxy :

1775325587.424    259 10.77.5.254 TCP_MISS_ABORTED/000 0 GET http://169.254.169.254/v1.json - HIER_NONE/- -
1775325587.424    260 10.77.5.254 TCP_MISS_ABORTED/000 0 PUT http://169.254.169.254/latest/api/token - HIER_NONE/- -
1775325587.424    260 10.77.5.254 TCP_MISS_ABORTED/000 0 GET http://169.254.169.254/metadata/instance? - HIER_NONE/- -
1775325587.424    260 10.77.5.254 TCP_MISS_ABORTED/000 0 GET http://169.254.169.254/openstack - HIER_NONE/- -
1775325587.424    260 10.77.5.254 TCP_MISS_ABORTED/000 0 GET http://169.254.169.254/metadata/v1/ - HIER_NONE/- -
1775325587.424    260 10.77.5.254 TCP_MISS_ABORTED/000 0 GET http://100.100.100.200/latest/ - HIER_NONE/- -
1775325587.424    260 10.77.5.254 TCP_MISS_ABORTED/000 0 GET http://169.254.169.254/ - HIER_NONE/- -
1775325587.424    260 10.77.5.254 TCP_MISS_ABORTED/000 0 GET http://169.254.169.254/opc/v2/instance/ - HIER_NONE/- -
1775325587.428    264 10.77.5.254 TCP_MISS_ABORTED/000 0 GET http://169.254.169.254/opc/v1/instance/ - HIER_NONE/- -
1775325587.428    263 10.77.5.254 TCP_MISS_ABORTED/000 0 GET http://169.254.169.254/latest/ - HIER_NONE/- -

The fact they are being aborted is yet another issue, and I figured it may be linked to the fact that part of the requests don't go through the proxy, so I haven't investigated that yet.

However, while running strace on the netbird service, I can see that it is also trying to connect directly to the management API :

debian@user-routing-peer:~$ sudo strace -e trace=network -fp 17589
strace: Process 17589 attached with 6 threads
[pid 17594] socket(AF_INET, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, IPPROTO_IP) = 7
[pid 17594] setsockopt(7, SOL_SOCKET, SO_MARK, [113920], 4) = 0
[pid 17594] connect(7, {sa_family=AF_INET, sin_port=htons(443), sin_addr=inet_addr("188.114.97.3")}, 16) = -1 EINPROGRESS (Operation now in progress)

I can also see those periodic requests being block in my firewall logs. The 188.114.97.3 address it is trying to connect to is a Cloudflare address, my management URL being behind a Cloudflare proxy.

Describe the solution you'd like
It would be nice to have the netbird service supporting correctly the standard variable HTTP_PROXY, HTTPS_PROXY and also NO_PROXY while at it.

Describe alternatives you've considered
The only alternative is giving client direct access to the public network.

Additional context
Tested on Netbird client 0.67.3
Related issue : https://github.com/netbirdio/netbird/issues/3780

Originally created by @alexmge on GitHub (Apr 4, 2026). Original GitHub issue: https://github.com/netbirdio/netbird/issues/5798 **Is your feature request related to a problem? Please describe.** In my environment, all clients must connect to the web via a proxy (in my case Squid). It seems like the netbird server does not fully support the standard `HTTP_PROXY` and `HTTPS_PROXY` variables. Actually it seems that part of it does, while other parts don't. First thing first, here is my `/etc/sysconfig/netbird` : ``` # BEGIN ANSIBLE MANAGED NETBIRD PROXY HTTP_PROXY=http://<proxy_ip>:3128/ HTTPS_PROXY=http://<proxy_ip>:3128/ # END ANSIBLE MANAGED NETBIRD PROXY ``` I also tried setting the environement variables in the shell context before running `netbird up`. When restarting my netbird service on the client, I can see that some requests coming from it are actually reaching the proxy : ``` 1775325587.424 259 10.77.5.254 TCP_MISS_ABORTED/000 0 GET http://169.254.169.254/v1.json - HIER_NONE/- - 1775325587.424 260 10.77.5.254 TCP_MISS_ABORTED/000 0 PUT http://169.254.169.254/latest/api/token - HIER_NONE/- - 1775325587.424 260 10.77.5.254 TCP_MISS_ABORTED/000 0 GET http://169.254.169.254/metadata/instance? - HIER_NONE/- - 1775325587.424 260 10.77.5.254 TCP_MISS_ABORTED/000 0 GET http://169.254.169.254/openstack - HIER_NONE/- - 1775325587.424 260 10.77.5.254 TCP_MISS_ABORTED/000 0 GET http://169.254.169.254/metadata/v1/ - HIER_NONE/- - 1775325587.424 260 10.77.5.254 TCP_MISS_ABORTED/000 0 GET http://100.100.100.200/latest/ - HIER_NONE/- - 1775325587.424 260 10.77.5.254 TCP_MISS_ABORTED/000 0 GET http://169.254.169.254/ - HIER_NONE/- - 1775325587.424 260 10.77.5.254 TCP_MISS_ABORTED/000 0 GET http://169.254.169.254/opc/v2/instance/ - HIER_NONE/- - 1775325587.428 264 10.77.5.254 TCP_MISS_ABORTED/000 0 GET http://169.254.169.254/opc/v1/instance/ - HIER_NONE/- - 1775325587.428 263 10.77.5.254 TCP_MISS_ABORTED/000 0 GET http://169.254.169.254/latest/ - HIER_NONE/- - ``` > The fact they are being aborted is yet another issue, and I figured it may be linked to the fact that part of the requests don't go through the proxy, so I haven't investigated that yet. However, while running strace on the netbird service, I can see that it is also trying to connect directly to the management API : ``` debian@user-routing-peer:~$ sudo strace -e trace=network -fp 17589 strace: Process 17589 attached with 6 threads [pid 17594] socket(AF_INET, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, IPPROTO_IP) = 7 [pid 17594] setsockopt(7, SOL_SOCKET, SO_MARK, [113920], 4) = 0 [pid 17594] connect(7, {sa_family=AF_INET, sin_port=htons(443), sin_addr=inet_addr("188.114.97.3")}, 16) = -1 EINPROGRESS (Operation now in progress) ``` > I can also see those periodic requests being block in my firewall logs. The `188.114.97.3` address it is trying to connect to is a Cloudflare address, my management URL being behind a Cloudflare proxy. **Describe the solution you'd like** It would be nice to have the netbird service supporting correctly the standard variable `HTTP_PROXY`, `HTTPS_PROXY` and also `NO_PROXY` while at it. **Describe alternatives you've considered** The only alternative is giving client direct access to the public network. **Additional context** Tested on Netbird client `0.67.3` Related issue : https://github.com/netbirdio/netbird/issues/3780
saavagebueno added the feature-request label 2026-08-05 01:30:57 -04:00
Sign in to join this conversation.
No Label feature-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#11778