unet-cli: add stun server list editing support
authorFelix Fietkau <nbd@nbd.name>
Fri, 16 Sep 2022 19:21:28 +0000 (21:21 +0200)
committerFelix Fietkau <nbd@nbd.name>
Fri, 16 Sep 2022 19:21:28 +0000 (21:21 +0200)
Signed-off-by: Felix Fietkau <nbd@nbd.name>
scripts/unet-cli

index c449b0fe6a4914bd8195598861e4f3221fcdba1d..6dbf060109fdf007a836f72248b63a0f3e7532c9 100755 (executable)
@@ -52,6 +52,7 @@ Usage: ${basename(sourcepath())} [<flags>] <file> <command> [<args>] [<option>=<
        port=<val>                              set tunnel port (default: ${defaults.port})
        pex_port=<val>                          set peer-exchange port (default: ${defaults.pex_port}, 0: disabled)
        keepalive=<val>                         set keepalive interval (seconds, 0: off, default: ${defaults.keepalive})
+       stun=[+|-]<host:port>[,<host:port>...]  set/add/remove STUN servers
       - host options (add-host, add-ssh-host, set-host):
        key=<val>                               set host public key (required for add-host)
        port=<val>                              set host tunnel port number
@@ -380,6 +381,7 @@ case 'set-config':
                keepalive: "int",
        });
        set_field("int", net_data.config, "peer-exchange-port", args.pex_port);
+       set_field("array", net_data.config, "stun-servers", args.stun);
        break;
 
 case 'add-host':