|
|
@ -835,6 +835,12 @@ var ( |
|
|
|
Usage: "Sets DNS discovery entry points (use \"\" to disable DNS)", |
|
|
|
Usage: "Sets DNS discovery entry points (use \"\" to disable DNS)", |
|
|
|
Category: flags.NetworkingCategory, |
|
|
|
Category: flags.NetworkingCategory, |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
DiscoveryPortFlag = &cli.IntFlag{ |
|
|
|
|
|
|
|
Name: "discovery.port", |
|
|
|
|
|
|
|
Usage: "Use a custom UDP port for P2P discovery", |
|
|
|
|
|
|
|
Value: 30303, |
|
|
|
|
|
|
|
Category: flags.NetworkingCategory, |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Console
|
|
|
|
// Console
|
|
|
|
JSpathFlag = &flags.DirectoryFlag{ |
|
|
|
JSpathFlag = &flags.DirectoryFlag{ |
|
|
@ -1116,12 +1122,15 @@ func setBootstrapNodesV5(ctx *cli.Context, cfg *p2p.Config) { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// setListenAddress creates a TCP listening address string from set command
|
|
|
|
// setListenAddress creates TCP/UDP listening address strings from set command
|
|
|
|
// line flags.
|
|
|
|
// line flags
|
|
|
|
func setListenAddress(ctx *cli.Context, cfg *p2p.Config) { |
|
|
|
func setListenAddress(ctx *cli.Context, cfg *p2p.Config) { |
|
|
|
if ctx.IsSet(ListenPortFlag.Name) { |
|
|
|
if ctx.IsSet(ListenPortFlag.Name) { |
|
|
|
cfg.ListenAddr = fmt.Sprintf(":%d", ctx.Int(ListenPortFlag.Name)) |
|
|
|
cfg.ListenAddr = fmt.Sprintf(":%d", ctx.Int(ListenPortFlag.Name)) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if ctx.IsSet(DiscoveryPortFlag.Name) { |
|
|
|
|
|
|
|
cfg.DiscAddr = fmt.Sprintf(":%d", ctx.Int(DiscoveryPortFlag.Name)) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// setNAT creates a port mapper from command line flags.
|
|
|
|
// setNAT creates a port mapper from command line flags.
|
|
|
|