@@ -57,7 +57,7 @@ const (
57
57
estimatedNonPollingEthereumRPCRequestsPer24Hrs = 50000
58
58
// logStatsInterval is how often to log stats for this node.
59
59
logStatsInterval = 5 * time .Minute
60
- version = "11.0.2 "
60
+ version = "11.0.3 "
61
61
// ordersyncMinPeers is the minimum amount of peers to receive orders from
62
62
// before considering the ordersync process finished.
63
63
ordersyncMinPeers = 5
@@ -194,6 +194,13 @@ type Config struct {
194
194
// MaxBytesPerSecond is the maximum number of bytes per second that a peer is
195
195
// allowed to send before failing the bandwidth check. Defaults to 5 MiB.
196
196
MaxBytesPerSecond float64 `envvar:"MAX_BYTES_PER_SECOND" default:"5242880"`
197
+ // AdditionalPublicIPSources is a list of external public IP source like
198
+ // https://whatismyip.api.0x.org/ which return the IP address in a
199
+ // text/plain format. This list is prepended to the default sources list.
200
+ //
201
+ // It expects a comma delimited list of external sources for example:
202
+ // ADDITIONAL_PUBLIC_IP_SOURCES="https://ifconfig.me/ip,http://192.168.5.10:1337/ip"
203
+ AdditionalPublicIPSources string `envvar:"ADDITIONAL_PUBLIC_IP_SOURCES" default:""`
197
204
}
198
205
199
206
type App struct {
@@ -614,19 +621,20 @@ func (app *App) Start() error {
614
621
return err
615
622
}
616
623
nodeConfig := p2p.Config {
617
- SubscribeTopic : app .orderFilter .Topic (),
618
- PublishTopics : publishTopics ,
619
- TCPPort : app .config .P2PTCPPort ,
620
- WebSocketsPort : app .config .P2PWebSocketsPort ,
621
- Insecure : false ,
622
- PrivateKey : app .privKey ,
623
- MessageHandler : app ,
624
- RendezvousPoints : rendezvousPoints ,
625
- UseBootstrapList : app .config .UseBootstrapList ,
626
- BootstrapList : bootstrapList ,
627
- DB : app .db ,
628
- CustomMessageValidator : app .orderFilter .ValidatePubSubMessage ,
629
- MaxBytesPerSecond : app .config .MaxBytesPerSecond ,
624
+ SubscribeTopic : app .orderFilter .Topic (),
625
+ PublishTopics : publishTopics ,
626
+ TCPPort : app .config .P2PTCPPort ,
627
+ WebSocketsPort : app .config .P2PWebSocketsPort ,
628
+ Insecure : false ,
629
+ PrivateKey : app .privKey ,
630
+ MessageHandler : app ,
631
+ RendezvousPoints : rendezvousPoints ,
632
+ UseBootstrapList : app .config .UseBootstrapList ,
633
+ BootstrapList : bootstrapList ,
634
+ DB : app .db ,
635
+ CustomMessageValidator : app .orderFilter .ValidatePubSubMessage ,
636
+ MaxBytesPerSecond : app .config .MaxBytesPerSecond ,
637
+ AdditionalPublicIPSources : strings .Split (app .config .AdditionalPublicIPSources , "," ),
630
638
}
631
639
app .node , err = p2p .New (innerCtx , nodeConfig )
632
640
if err != nil {
0 commit comments