From e4a6a9c22fe381f267c99cc6a02fd9f550456d87 Mon Sep 17 00:00:00 2001 From: Bel LaPointe Date: Wed, 19 Feb 2020 14:43:44 -0700 Subject: [PATCH] Add proxy flag for alternative proxy configuration --- config/new.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config/new.go b/config/new.go index b9b44d0..54c4004 100755 --- a/config/new.go +++ b/config/new.go @@ -15,9 +15,13 @@ func New() error { as.Append(args.STRING, "port", "port to listen on", "33419") as.Append(args.STRING, "db", "database type code", storage.MAP.String()) as.Append(args.STRING, "ns", "namespace", storage.DefaultNamespace) + as.Append(args.STRING, "proxy", "http proxy", "") if err := as.Parse(); err != nil { return err } + if proxy := as.Get("proxy").GetString(); len(proxy) > 0 { + os.Setenv("http_proxy", proxy) + } ctx, can := context.WithCancel(context.Background()) config = Config{ db: as.Get("db").GetString(),