From c454cb923541eedae63d20821760e3c03a66829d Mon Sep 17 00:00:00 2001 From: mcamou Date: Tue, 26 Nov 2024 17:18:02 +0100 Subject: [PATCH] Add proxy config to command line --- pkg/config/app.go | 4 ++++ pkg/config/constants.go | 1 + 2 files changed, 5 insertions(+) diff --git a/pkg/config/app.go b/pkg/config/app.go index 60c5f6d1..b0c39186 100644 --- a/pkg/config/app.go +++ b/pkg/config/app.go @@ -194,6 +194,10 @@ func (c *AppConfig) setCommandLineConfig() error { pflag.BoolVar(&c.WebScraper, "webScraper", viper.GetBool(WebScraper), "Web Scraper") pflag.BoolVar(&c.Faucet, "faucet", viper.GetBool(Faucet), "Faucet") pflag.BoolVar(&c.APIEnabled, "api-enabled", viper.GetBool(APIEnabled), "Enable API server") + pflag.BoolVar(&c.ProxyEnabled, "proxy-enabled", viper.GetBool(ProxyEnabled), "Enable CONNECT proxy") + pflag.StringVar(&c.ProxyListenAddr, "proxyListenAddr", viper.GetString("proxyListenAddr"), "Proxy listen address") + pflag.Uint16Var(&c.ProxyListenPort, "proxyListenPort", viper.GetUint16("proxyListenPort"), "Proxy listen port") + pflag.Uint16Var(&c.ProxyTargetPort, "proxyTargetPort", viper.GetUint16("proxyTargetPort"), "Proxy target port") pflag.Parse() diff --git a/pkg/config/constants.go b/pkg/config/constants.go index 90bb3f4c..7c1195c6 100644 --- a/pkg/config/constants.go +++ b/pkg/config/constants.go @@ -40,5 +40,6 @@ const ( TelegramScraper = "TELEGRAM_SCRAPER" WebScraper = "WEB_SCRAPER" APIEnabled = "API_ENABLED" + ProxyEnabled = "PROXY_ENABLED" DefaultPrivKeyFile = "masa_oracle_key" )