Skip to content

Commit

Permalink
Add proxy config to command line
Browse files Browse the repository at this point in the history
  • Loading branch information
mcamou committed Nov 29, 2024
1 parent 7ee5b11 commit c454cb9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/config/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
1 change: 1 addition & 0 deletions pkg/config/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,6 @@ const (
TelegramScraper = "TELEGRAM_SCRAPER"
WebScraper = "WEB_SCRAPER"
APIEnabled = "API_ENABLED"
ProxyEnabled = "PROXY_ENABLED"
DefaultPrivKeyFile = "masa_oracle_key"
)

0 comments on commit c454cb9

Please sign in to comment.