From 7dc8f69d222e32614598624ed86396d2628c4baf Mon Sep 17 00:00:00 2001 From: Chee Yang Lee Date: Thu, 24 Apr 2025 15:47:03 +0800 Subject: [PATCH] allow safechroot to run behind proxy Signed-off-by: Chee Yang Lee --- toolkit/tools/internal/safechroot/safechroot.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/toolkit/tools/internal/safechroot/safechroot.go b/toolkit/tools/internal/safechroot/safechroot.go index 72c409df33..9c04871e6e 100644 --- a/toolkit/tools/internal/safechroot/safechroot.go +++ b/toolkit/tools/internal/safechroot/safechroot.go @@ -99,6 +99,8 @@ var defaultChrootEnv = []string{ "HOME=/root", fmt.Sprintf("SHELL=%s", os.Getenv("SHELL")), fmt.Sprintf("TERM=%s", os.Getenv("TERM")), + fmt.Sprintf("https_proxy=%s", os.Getenv("https_proxy")), + fmt.Sprintf("no_proxy=%s", os.Getenv("no_proxy")), "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", }