File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -621,6 +621,20 @@ func New(conf *Config) *proxyApp {
621621 if len (p .proxychain .ProxyList ) == 0 {
622622 p .logger .Fatal ().Msg ("[proxychain config] Proxy list is empty" )
623623 }
624+ seen := make (map [string ]struct {})
625+ for _ , pr := range p .proxychain .ProxyList {
626+ var addr string
627+ if strings .HasPrefix (pr .Address , ":" ) {
628+ addr = fmt .Sprintf ("127.0.0.1%s" , pr .Address )
629+ } else {
630+ addr = pr .Address
631+ }
632+ if _ , ok := seen [addr ]; ! ok {
633+ seen [addr ] = struct {}{}
634+ } else {
635+ p .logger .Fatal ().Msgf ("[proxychain config] Duplicate entry `%s`" , addr )
636+ }
637+ }
624638 chainType := p .proxychain .Chain .Type
625639 if ! slices .Contains (supportedChainTypes , chainType ) {
626640 p .logger .Fatal ().Msgf ("[proxychain config] Chain type `%s` is not supported" , chainType )
You can’t perform that action at this time.
0 commit comments