Skip to content

Commit

Permalink
feat: add HTTP proxy support to worker environments
Browse files Browse the repository at this point in the history
Pass the parent environment values of http_proxy, HTTP_PROXY,
HTTPS_PROXY, ALL_PROXY, and NO_PROXY down to workers.

Signed-off-by: Link Dupont <[email protected]>
  • Loading branch information
subpop committed Dec 10, 2021
1 parent 4060bff commit 250de49
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmd/yggd/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ func startWorker(config workerConfig, started func(pid int), stopped func(pid in

env := []string{
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"http_proxy=" + os.Getenv("http_proxy"),
"HTTP_PROXY=" + os.Getenv("HTTP_PROXY"),
"HTTPS_PROXY=" + os.Getenv("HTTPS_PROXY"),
"ALL_PROXY=" + os.Getenv("ALL_PROXY"),
"NO_PROXY=" + os.Getenv("NO_PROXY"),
}

switch config.Protocol {
Expand Down

0 comments on commit 250de49

Please sign in to comment.