Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add NO_PROXY env var to the lab nodes by default #2350

Closed
hellt opened this issue Dec 16, 2024 · 1 comment · Fixed by #2351
Closed

Add NO_PROXY env var to the lab nodes by default #2350

hellt opened this issue Dec 16, 2024 · 1 comment · Fixed by #2351
Labels
enhancement New feature or request

Comments

@hellt
Copy link
Member

hellt commented Dec 16, 2024

When http proxy is in place to access internet resources containerlab users typically have to set the http_proxy/https_proxy env vars in their topologies to make the applications running in the containers use the proxy:

name: anysec-macsec

mgmt:
  network: anysec
  ipv4-subnet: 172.50.50.0/24

topology:
  kinds:
    linux:
      image: ghcr.io/srl-labs/network-multitool
      env:
        http_proxy: ${http_proxy}
        https_proxy: ${https_proxy}
        no_proxy: pe1,pe2,p3,p4,ce5,ce6,client7,client8,gnmic,prometheus,grafana,localhost,172.50.50.0/24

Note, how every lab node, lab mgmt network and localhost has to be called out in the no_proxy env var to ensure that the nodes when communicating with each other will not try to reach the proxy.

Containerlab should set these values automatically as a default env var set:

  • all node names as provided in the topology
  • mgmt network
  • localhost
  • 127.0.0.1
  • *.local addresses
@hellt hellt added the enhancement New feature or request label Dec 16, 2024
@toweber
Copy link
Contributor

toweber commented Dec 16, 2024

Would really love to see this feature implemented!
Subnet ranges do not work with the no_proxy variable for some OS. Hostname wildcards can be used, but IP addresses should also be added individually not only via CIDR.

Edit: Might deliver a PR myself in the coming days 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants