Add option to manually specify the gateway.

This commit is contained in:
rhaidiz 2019-02-10 14:46:05 +01:00
commit e1023d4b66
3 changed files with 29 additions and 7 deletions

View file

@ -4,6 +4,7 @@ import "flag"
type Options struct {
InterfaceName *string
Gateway *string
Caplet *string
AutoStart *string
Debug *bool
@ -19,6 +20,7 @@ type Options struct {
func ParseOptions() (Options, error) {
o := Options{
InterfaceName: flag.String("iface", "", "Network interface to bind to, if empty the default interface will be auto selected."),
Gateway: flag.String("gw","","Manually specify the gateway address, if not specified or invalid, the default gateway will be used."),
AutoStart: flag.String("autostart", "events.stream, net.recon", "Comma separated list of modules to auto start."),
Caplet: flag.String("caplet", "", "Read commands from this file and execute them in the interactive session."),
Debug: flag.Bool("debug", false, "Print debug messages."),