meta: release v1.5.3-beta.1

pull/186/head v1.5.3-beta.1
Jake McGinty 2022-01-11 14:18:19 -06:00
parent 1b260823f9
commit b15b541669
21 changed files with 534 additions and 1008 deletions

10
Cargo.lock generated
View File

@ -152,7 +152,7 @@ dependencies = [
[[package]]
name = "client"
version = "1.5.2"
version = "1.5.3-beta.1"
dependencies = [
"anyhow",
"clap 3.0.6",
@ -667,7 +667,7 @@ dependencies = [
[[package]]
name = "netlink-request"
version = "1.5.2"
version = "1.5.3-beta.1"
dependencies = [
"netlink-packet-core",
"netlink-packet-generic",
@ -955,7 +955,7 @@ dependencies = [
[[package]]
name = "server"
version = "1.5.2"
version = "1.5.3-beta.1"
dependencies = [
"anyhow",
"bytes",
@ -990,7 +990,7 @@ dependencies = [
[[package]]
name = "shared"
version = "1.5.2"
version = "1.5.3-beta.1"
dependencies = [
"anyhow",
"atty",
@ -1373,7 +1373,7 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
[[package]]
name = "wireguard-control"
version = "1.5.2"
version = "1.5.3-beta.1"
dependencies = [
"base64",
"curve25519-dalek",

View File

@ -214,10 +214,10 @@ brew install tonarino/innernet/innernet
```sh
# to install innernet:
cargo install --git https://github.com/tonarino/innernet --tag v1.5.2 client
cargo install --git https://github.com/tonarino/innernet --tag v1.5.3-beta.1 client
# to install innernet-server:
cargo install --git https://github.com/tonarino/innernet --tag v1.5.2 server
cargo install --git https://github.com/tonarino/innernet --tag v1.5.3-beta.1 server
```
Note that you'll be responsible for updating manually.

View File

@ -7,7 +7,7 @@ license = "MIT"
name = "client"
publish = false
repository = "https://github.com/tonarino/innernet"
version = "1.5.2"
version = "1.5.3-beta.1"
[[bin]]
name = "innernet"

View File

@ -1,38 +1,40 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.48.5.
.TH INNERNET-SERVER "8" "December 2021" "innernet-server 1.5.2" "System Administration Utilities"
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.13.
.TH INNERNET-SERVER "8" "January 2022" "innernet-server 1.5.3-beta.1" "System Administration Utilities"
.SH NAME
innernet-server \- manual page for innernet-server 1.5.2
innernet-server \- manual page for innernet-server 1.5.3-beta.1
.SH DESCRIPTION
innernet\-server 1.5.2
innernet\-server 1.5.3\-beta.1
Jake McGinty <me@jake.su>
A server to coordinate innernet networks.
.SS "USAGE:"
.IP
innernet\-server [OPTIONS] <SUBCOMMAND>
.SS "OPTIONS:"
.TP
\fB\-c\fR, \fB\-\-config\-dir\fR <config\-dir>
\fB\-c\fR, \fB\-\-config\-dir\fR <CONFIG_DIR>
[default: /etc/innernet\-server]
.TP
\fB\-d\fR, \fB\-\-data\-dir\fR <data\-dir>
\fB\-d\fR, \fB\-\-data\-dir\fR <DATA_DIR>
[default: /var/lib/innernet\-server]
.TP
\fB\-\-no\-routing\fR
Whether the routing should be done by innernet or is done by an external tool like
e.g. babeld
Whether the routing should be done by innernet or is done by an
external tool like e.g. babeld
.TP
\fB\-\-backend\fR <backend>
Specify a WireGuard backend to use. If not set, innernet will auto\-select based on
availability [default: kernel] [possible values: kernel, userspace]
\fB\-\-backend\fR <BACKEND>
Specify a WireGuard backend to use. If not set, innernet will
auto\-select based on availability [default: kernel] [possible
values: kernel, userspace]
.TP
\fB\-\-mtu\fR <mtu>
Specify the desired MTU for your interface (default: 1420 for IPv4 and 1400 for
IPv6)
\fB\-\-mtu\fR <MTU>
Specify the desired MTU for your interface (default: 1420 for
IPv4 and 1400 for IPv6)
.TP
\fB\-h\fR, \fB\-\-help\fR
Prints help information
Print help information
.TP
\fB\-V\fR, \fB\-\-version\fR
Prints version information
Print version information
.SS "SUBCOMMANDS:"
.TP
new
@ -60,4 +62,4 @@ completions
Generate shell completion scripts
.TP
help
Prints this message or the help of the given subcommand(s)
Print this message or the help of the given subcommand(s)

Binary file not shown.

View File

@ -9,10 +9,9 @@ _innernet-server() {
for i in ${COMP_WORDS[@]}
do
case "${i}" in
innernet-server)
cmd="innernet-server"
"$1")
cmd="innernet__server"
;;
add-cidr)
cmd+="__add__cidr"
;;
@ -28,9 +27,6 @@ _innernet-server() {
help)
cmd+="__help"
;;
init)
cmd+="__init"
;;
new)
cmd+="__new"
;;
@ -49,19 +45,18 @@ _innernet-server() {
done
case "${cmd}" in
innernet-server)
opts=" -h -V -c -d --no-routing --help --version --config-dir --data-dir --backend --mtu new uninstall serve add-peer rename-peer add-cidr delete-cidr completions help init"
innernet__server)
opts="-h -V -c -d --help --version --config-dir --data-dir --no-routing --backend --mtu new uninstall serve add-peer rename-peer add-cidr delete-cidr completions help"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
--config-dir)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
-c)
-c)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
@ -69,7 +64,7 @@ _innernet-server() {
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
-d)
-d)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
@ -88,15 +83,13 @@ _innernet-server() {
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
innernet__server__add__cidr)
opts=" -h -V --yes --help --version --name --cidr --parent <interface> "
opts="-h --name --cidr --parent --yes --help <INTERFACE>"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
--name)
COMPREPLY=($(compgen -f "${cur}"))
return 0
@ -117,13 +110,12 @@ _innernet-server() {
return 0
;;
innernet__server__add__peer)
opts=" -h -V --auto-ip --yes --help --version --name --ip --cidr --admin --save-config --invite-expires <interface> "
opts="-h --name --ip --auto-ip --cidr --admin --yes --save-config --invite-expires --help <INTERFACE>"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
--name)
COMPREPLY=($(compgen -f "${cur}"))
return 0
@ -156,13 +148,12 @@ _innernet-server() {
return 0
;;
innernet__server__completions)
opts=" -h -V --help --version <shell> "
opts="-h --help bash elvish fish powershell zsh"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
@ -171,13 +162,12 @@ _innernet-server() {
return 0
;;
innernet__server__delete__cidr)
opts=" -h -V --yes --help --version --name <interface> "
opts="-h --name --yes --help <INTERFACE>"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
--name)
COMPREPLY=($(compgen -f "${cur}"))
return 0
@ -190,44 +180,12 @@ _innernet-server() {
return 0
;;
innernet__server__help)
opts=" -h -V --help --version "
opts=""
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
innernet__server__init)
opts=" -h -V --auto-external-endpoint --help --version --network-name --network-cidr --external-endpoint --listen-port "
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
--network-name)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--network-cidr)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--external-endpoint)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--listen-port)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
*)
COMPREPLY=()
;;
@ -236,13 +194,12 @@ _innernet-server() {
return 0
;;
innernet__server__new)
opts=" -h -V --auto-external-endpoint --help --version --network-name --network-cidr --external-endpoint --listen-port "
opts="-h --network-name --network-cidr --external-endpoint --auto-external-endpoint --listen-port --help"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
--network-name)
COMPREPLY=($(compgen -f "${cur}"))
return 0
@ -267,13 +224,12 @@ _innernet-server() {
return 0
;;
innernet__server__rename__peer)
opts=" -h -V --yes --help --version --name --new-name <interface> "
opts="-h --name --new-name --yes --help <INTERFACE>"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
--name)
COMPREPLY=($(compgen -f "${cur}"))
return 0
@ -290,13 +246,12 @@ _innernet-server() {
return 0
;;
innernet__server__serve)
opts=" -h -V --no-routing --help --version --backend --mtu <interface> "
opts="-h --no-routing --backend --mtu --help <INTERFACE>"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
--backend)
COMPREPLY=($(compgen -W "kernel userspace" -- "${cur}"))
return 0
@ -313,13 +268,12 @@ _innernet-server() {
return 0
;;
innernet__server__uninstall)
opts=" -h -V --help --version <interface> "
opts="-h --help <INTERFACE>"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;

View File

@ -1,19 +1,22 @@
edit:completion:arg-completer[innernet-server] = [@words]{
use builtin;
use str;
set edit:completion:arg-completer[innernet-server] = [@words]{
fn spaces [n]{
repeat $n ' ' | joins ''
builtin:repeat $n ' ' | str:join ''
}
fn cand [text desc]{
edit:complex-candidate $text &display-suffix=' '(spaces (- 14 (wcswidth $text)))$desc
edit:complex-candidate $text &display=$text' '(spaces (- 14 (wcswidth $text)))$desc
}
command = 'innernet-server'
for word $words[1:-1] {
if (has-prefix $word '-') {
var command = 'innernet-server'
for word $words[1..-1] {
if (str:has-prefix $word '-') {
break
}
command = $command';'$word
set command = $command';'$word
}
completions = [
var completions = [
&'innernet-server'= {
cand -c 'c'
cand --config-dir 'config-dir'
@ -21,11 +24,11 @@ edit:completion:arg-completer[innernet-server] = [@words]{
cand --data-dir 'data-dir'
cand --backend 'Specify a WireGuard backend to use. If not set, innernet will auto-select based on availability'
cand --mtu 'Specify the desired MTU for your interface (default: 1420 for IPv4 and 1400 for IPv6)'
cand -h 'Print help information'
cand --help 'Print help information'
cand -V 'Print version information'
cand --version 'Print version information'
cand --no-routing 'Whether the routing should be done by innernet or is done by an external tool like e.g. babeld'
cand -h 'Prints help information'
cand --help 'Prints help information'
cand -V 'Prints version information'
cand --version 'Prints version information'
cand new 'Create a new network'
cand uninstall 'Permanently uninstall a created network, rendering it unusable. Use with care'
cand serve 'Serve the coordinating server for an existing network'
@ -34,7 +37,7 @@ edit:completion:arg-completer[innernet-server] = [@words]{
cand add-cidr 'Add a new CIDR to an existing network'
cand delete-cidr 'Delete a CIDR'
cand completions 'Generate shell completion scripts'
cand help 'Prints this message or the help of the given subcommand(s)'
cand help 'Print this message or the help of the given subcommand(s)'
}
&'innernet-server;new'= {
cand --network-name 'The network name (ex: evilcorp)'
@ -42,25 +45,19 @@ edit:completion:arg-completer[innernet-server] = [@words]{
cand --external-endpoint 'This server''s external endpoint (ex: 100.100.100.100:51820)'
cand --listen-port 'Port to listen on (for the WireGuard interface)'
cand --auto-external-endpoint 'Auto-resolve external endpoint'
cand -h 'Prints help information'
cand --help 'Prints help information'
cand -V 'Prints version information'
cand --version 'Prints version information'
cand -h 'Print help information'
cand --help 'Print help information'
}
&'innernet-server;uninstall'= {
cand -h 'Prints help information'
cand --help 'Prints help information'
cand -V 'Prints version information'
cand --version 'Prints version information'
cand -h 'Print help information'
cand --help 'Print help information'
}
&'innernet-server;serve'= {
cand --backend 'Specify a WireGuard backend to use. If not set, innernet will auto-select based on availability'
cand --mtu 'Specify the desired MTU for your interface (default: 1420 for IPv4 and 1400 for IPv6)'
cand --no-routing 'Whether the routing should be done by innernet or is done by an external tool like e.g. babeld'
cand -h 'Prints help information'
cand --help 'Prints help information'
cand -V 'Prints version information'
cand --version 'Prints version information'
cand -h 'Print help information'
cand --help 'Print help information'
}
&'innernet-server;add-peer'= {
cand --name 'Name of new peer'
@ -71,49 +68,35 @@ edit:completion:arg-completer[innernet-server] = [@words]{
cand --invite-expires 'Invite expiration period (eg. ''30d'', ''7w'', ''2h'', ''60m'', ''1000s'')'
cand --auto-ip 'Auto-assign the peer the first available IP within the CIDR'
cand --yes 'Bypass confirmation'
cand -h 'Prints help information'
cand --help 'Prints help information'
cand -V 'Prints version information'
cand --version 'Prints version information'
cand -h 'Print help information'
cand --help 'Print help information'
}
&'innernet-server;rename-peer'= {
cand --name 'Name of peer to rename'
cand --new-name 'The new name of the peer'
cand --yes 'Bypass confirmation'
cand -h 'Prints help information'
cand --help 'Prints help information'
cand -V 'Prints version information'
cand --version 'Prints version information'
cand -h 'Print help information'
cand --help 'Print help information'
}
&'innernet-server;add-cidr'= {
cand --name 'The CIDR name (eg. ''engineers'')'
cand --cidr 'The CIDR network (eg. ''10.42.5.0/24'')'
cand --parent 'The CIDR parent name'
cand --yes 'Bypass confirmation'
cand -h 'Prints help information'
cand --help 'Prints help information'
cand -V 'Prints version information'
cand --version 'Prints version information'
cand -h 'Print help information'
cand --help 'Print help information'
}
&'innernet-server;delete-cidr'= {
cand --name 'The CIDR name (eg. ''engineers'')'
cand --yes 'Bypass confirmation'
cand -h 'Prints help information'
cand --help 'Prints help information'
cand -V 'Prints version information'
cand --version 'Prints version information'
cand -h 'Print help information'
cand --help 'Print help information'
}
&'innernet-server;completions'= {
cand -h 'Prints help information'
cand --help 'Prints help information'
cand -V 'Prints version information'
cand --version 'Prints version information'
cand -h 'Print help information'
cand --help 'Print help information'
}
&'innernet-server;help'= {
cand -h 'Prints help information'
cand --help 'Prints help information'
cand -V 'Prints version information'
cand --version 'Prints version information'
}
]
$completions[$command]

View File

@ -1,10 +1,10 @@
complete -c innernet-server -n "__fish_use_subcommand" -s c -l config-dir
complete -c innernet-server -n "__fish_use_subcommand" -s d -l data-dir
complete -c innernet-server -n "__fish_use_subcommand" -l backend -d 'Specify a WireGuard backend to use. If not set, innernet will auto-select based on availability' -r -f -a "kernel userspace"
complete -c innernet-server -n "__fish_use_subcommand" -l mtu -d 'Specify the desired MTU for your interface (default: 1420 for IPv4 and 1400 for IPv6)'
complete -c innernet-server -n "__fish_use_subcommand" -s c -l config-dir -r
complete -c innernet-server -n "__fish_use_subcommand" -s d -l data-dir -r
complete -c innernet-server -n "__fish_use_subcommand" -l backend -d 'Specify a WireGuard backend to use. If not set, innernet will auto-select based on availability' -r -f -a "{kernel ,userspace }"
complete -c innernet-server -n "__fish_use_subcommand" -l mtu -d 'Specify the desired MTU for your interface (default: 1420 for IPv4 and 1400 for IPv6)' -r
complete -c innernet-server -n "__fish_use_subcommand" -s h -l help -d 'Print help information'
complete -c innernet-server -n "__fish_use_subcommand" -s V -l version -d 'Print version information'
complete -c innernet-server -n "__fish_use_subcommand" -l no-routing -d 'Whether the routing should be done by innernet or is done by an external tool like e.g. babeld'
complete -c innernet-server -n "__fish_use_subcommand" -s h -l help -d 'Prints help information'
complete -c innernet-server -n "__fish_use_subcommand" -s V -l version -d 'Prints version information'
complete -c innernet-server -n "__fish_use_subcommand" -f -a "new" -d 'Create a new network'
complete -c innernet-server -n "__fish_use_subcommand" -f -a "uninstall" -d 'Permanently uninstall a created network, rendering it unusable. Use with care'
complete -c innernet-server -n "__fish_use_subcommand" -f -a "serve" -d 'Serve the coordinating server for an existing network'
@ -13,47 +13,37 @@ complete -c innernet-server -n "__fish_use_subcommand" -f -a "rename-peer" -d 'R
complete -c innernet-server -n "__fish_use_subcommand" -f -a "add-cidr" -d 'Add a new CIDR to an existing network'
complete -c innernet-server -n "__fish_use_subcommand" -f -a "delete-cidr" -d 'Delete a CIDR'
complete -c innernet-server -n "__fish_use_subcommand" -f -a "completions" -d 'Generate shell completion scripts'
complete -c innernet-server -n "__fish_use_subcommand" -f -a "help" -d 'Prints this message or the help of the given subcommand(s)'
complete -c innernet-server -n "__fish_seen_subcommand_from new" -l network-name -d 'The network name (ex: evilcorp)'
complete -c innernet-server -n "__fish_seen_subcommand_from new" -l network-cidr -d 'The network CIDR (ex: 10.42.0.0/16)'
complete -c innernet-server -n "__fish_seen_subcommand_from new" -l external-endpoint -d 'This server\'s external endpoint (ex: 100.100.100.100:51820)'
complete -c innernet-server -n "__fish_seen_subcommand_from new" -l listen-port -d 'Port to listen on (for the WireGuard interface)'
complete -c innernet-server -n "__fish_use_subcommand" -f -a "help" -d 'Print this message or the help of the given subcommand(s)'
complete -c innernet-server -n "__fish_seen_subcommand_from new" -l network-name -d 'The network name (ex: evilcorp)' -r
complete -c innernet-server -n "__fish_seen_subcommand_from new" -l network-cidr -d 'The network CIDR (ex: 10.42.0.0/16)' -r
complete -c innernet-server -n "__fish_seen_subcommand_from new" -l external-endpoint -d 'This server\'s external endpoint (ex: 100.100.100.100:51820)' -r
complete -c innernet-server -n "__fish_seen_subcommand_from new" -l listen-port -d 'Port to listen on (for the WireGuard interface)' -r
complete -c innernet-server -n "__fish_seen_subcommand_from new" -l auto-external-endpoint -d 'Auto-resolve external endpoint'
complete -c innernet-server -n "__fish_seen_subcommand_from new" -s h -l help -d 'Prints help information'
complete -c innernet-server -n "__fish_seen_subcommand_from new" -s V -l version -d 'Prints version information'
complete -c innernet-server -n "__fish_seen_subcommand_from uninstall" -s h -l help -d 'Prints help information'
complete -c innernet-server -n "__fish_seen_subcommand_from uninstall" -s V -l version -d 'Prints version information'
complete -c innernet-server -n "__fish_seen_subcommand_from serve" -l backend -d 'Specify a WireGuard backend to use. If not set, innernet will auto-select based on availability' -r -f -a "kernel userspace"
complete -c innernet-server -n "__fish_seen_subcommand_from serve" -l mtu -d 'Specify the desired MTU for your interface (default: 1420 for IPv4 and 1400 for IPv6)'
complete -c innernet-server -n "__fish_seen_subcommand_from new" -s h -l help -d 'Print help information'
complete -c innernet-server -n "__fish_seen_subcommand_from uninstall" -s h -l help -d 'Print help information'
complete -c innernet-server -n "__fish_seen_subcommand_from serve" -l backend -d 'Specify a WireGuard backend to use. If not set, innernet will auto-select based on availability' -r -f -a "{kernel ,userspace }"
complete -c innernet-server -n "__fish_seen_subcommand_from serve" -l mtu -d 'Specify the desired MTU for your interface (default: 1420 for IPv4 and 1400 for IPv6)' -r
complete -c innernet-server -n "__fish_seen_subcommand_from serve" -l no-routing -d 'Whether the routing should be done by innernet or is done by an external tool like e.g. babeld'
complete -c innernet-server -n "__fish_seen_subcommand_from serve" -s h -l help -d 'Prints help information'
complete -c innernet-server -n "__fish_seen_subcommand_from serve" -s V -l version -d 'Prints version information'
complete -c innernet-server -n "__fish_seen_subcommand_from add-peer" -l name -d 'Name of new peer'
complete -c innernet-server -n "__fish_seen_subcommand_from add-peer" -l ip -d 'Specify desired IP of new peer (within parent CIDR)'
complete -c innernet-server -n "__fish_seen_subcommand_from add-peer" -l cidr -d 'Name of CIDR to add new peer under'
complete -c innernet-server -n "__fish_seen_subcommand_from add-peer" -l admin -d 'Make new peer an admin?'
complete -c innernet-server -n "__fish_seen_subcommand_from add-peer" -l save-config -d 'Save the config to the given location'
complete -c innernet-server -n "__fish_seen_subcommand_from add-peer" -l invite-expires -d 'Invite expiration period (eg. \'30d\', \'7w\', \'2h\', \'60m\', \'1000s\')'
complete -c innernet-server -n "__fish_seen_subcommand_from serve" -s h -l help -d 'Print help information'
complete -c innernet-server -n "__fish_seen_subcommand_from add-peer" -l name -d 'Name of new peer' -r
complete -c innernet-server -n "__fish_seen_subcommand_from add-peer" -l ip -d 'Specify desired IP of new peer (within parent CIDR)' -r
complete -c innernet-server -n "__fish_seen_subcommand_from add-peer" -l cidr -d 'Name of CIDR to add new peer under' -r
complete -c innernet-server -n "__fish_seen_subcommand_from add-peer" -l admin -d 'Make new peer an admin?' -r
complete -c innernet-server -n "__fish_seen_subcommand_from add-peer" -l save-config -d 'Save the config to the given location' -r
complete -c innernet-server -n "__fish_seen_subcommand_from add-peer" -l invite-expires -d 'Invite expiration period (eg. \'30d\', \'7w\', \'2h\', \'60m\', \'1000s\')' -r
complete -c innernet-server -n "__fish_seen_subcommand_from add-peer" -l auto-ip -d 'Auto-assign the peer the first available IP within the CIDR'
complete -c innernet-server -n "__fish_seen_subcommand_from add-peer" -l yes -d 'Bypass confirmation'
complete -c innernet-server -n "__fish_seen_subcommand_from add-peer" -s h -l help -d 'Prints help information'
complete -c innernet-server -n "__fish_seen_subcommand_from add-peer" -s V -l version -d 'Prints version information'
complete -c innernet-server -n "__fish_seen_subcommand_from rename-peer" -l name -d 'Name of peer to rename'
complete -c innernet-server -n "__fish_seen_subcommand_from rename-peer" -l new-name -d 'The new name of the peer'
complete -c innernet-server -n "__fish_seen_subcommand_from add-peer" -s h -l help -d 'Print help information'
complete -c innernet-server -n "__fish_seen_subcommand_from rename-peer" -l name -d 'Name of peer to rename' -r
complete -c innernet-server -n "__fish_seen_subcommand_from rename-peer" -l new-name -d 'The new name of the peer' -r
complete -c innernet-server -n "__fish_seen_subcommand_from rename-peer" -l yes -d 'Bypass confirmation'
complete -c innernet-server -n "__fish_seen_subcommand_from rename-peer" -s h -l help -d 'Prints help information'
complete -c innernet-server -n "__fish_seen_subcommand_from rename-peer" -s V -l version -d 'Prints version information'
complete -c innernet-server -n "__fish_seen_subcommand_from add-cidr" -l name -d 'The CIDR name (eg. \'engineers\')'
complete -c innernet-server -n "__fish_seen_subcommand_from add-cidr" -l cidr -d 'The CIDR network (eg. \'10.42.5.0/24\')'
complete -c innernet-server -n "__fish_seen_subcommand_from add-cidr" -l parent -d 'The CIDR parent name'
complete -c innernet-server -n "__fish_seen_subcommand_from rename-peer" -s h -l help -d 'Print help information'
complete -c innernet-server -n "__fish_seen_subcommand_from add-cidr" -l name -d 'The CIDR name (eg. \'engineers\')' -r
complete -c innernet-server -n "__fish_seen_subcommand_from add-cidr" -l cidr -d 'The CIDR network (eg. \'10.42.5.0/24\')' -r
complete -c innernet-server -n "__fish_seen_subcommand_from add-cidr" -l parent -d 'The CIDR parent name' -r
complete -c innernet-server -n "__fish_seen_subcommand_from add-cidr" -l yes -d 'Bypass confirmation'
complete -c innernet-server -n "__fish_seen_subcommand_from add-cidr" -s h -l help -d 'Prints help information'
complete -c innernet-server -n "__fish_seen_subcommand_from add-cidr" -s V -l version -d 'Prints version information'
complete -c innernet-server -n "__fish_seen_subcommand_from delete-cidr" -l name -d 'The CIDR name (eg. \'engineers\')'
complete -c innernet-server -n "__fish_seen_subcommand_from add-cidr" -s h -l help -d 'Print help information'
complete -c innernet-server -n "__fish_seen_subcommand_from delete-cidr" -l name -d 'The CIDR name (eg. \'engineers\')' -r
complete -c innernet-server -n "__fish_seen_subcommand_from delete-cidr" -l yes -d 'Bypass confirmation'
complete -c innernet-server -n "__fish_seen_subcommand_from delete-cidr" -s h -l help -d 'Prints help information'
complete -c innernet-server -n "__fish_seen_subcommand_from delete-cidr" -s V -l version -d 'Prints version information'
complete -c innernet-server -n "__fish_seen_subcommand_from completions" -s h -l help -d 'Prints help information'
complete -c innernet-server -n "__fish_seen_subcommand_from completions" -s V -l version -d 'Prints version information'
complete -c innernet-server -n "__fish_seen_subcommand_from help" -s h -l help -d 'Prints help information'
complete -c innernet-server -n "__fish_seen_subcommand_from help" -s V -l version -d 'Prints version information'
complete -c innernet-server -n "__fish_seen_subcommand_from delete-cidr" -s h -l help -d 'Print help information'
complete -c innernet-server -n "__fish_seen_subcommand_from completions" -s h -l help -d 'Print help information'

View File

@ -26,11 +26,11 @@ Register-ArgumentCompleter -Native -CommandName 'innernet-server' -ScriptBlock {
[CompletionResult]::new('--data-dir', 'data-dir', [CompletionResultType]::ParameterName, 'data-dir')
[CompletionResult]::new('--backend', 'backend', [CompletionResultType]::ParameterName, 'Specify a WireGuard backend to use. If not set, innernet will auto-select based on availability')
[CompletionResult]::new('--mtu', 'mtu', [CompletionResultType]::ParameterName, 'Specify the desired MTU for your interface (default: 1420 for IPv4 and 1400 for IPv6)')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information')
[CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Print version information')
[CompletionResult]::new('--version', 'version', [CompletionResultType]::ParameterName, 'Print version information')
[CompletionResult]::new('--no-routing', 'no-routing', [CompletionResultType]::ParameterName, 'Whether the routing should be done by innernet or is done by an external tool like e.g. babeld')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Prints help information')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Prints help information')
[CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Prints version information')
[CompletionResult]::new('--version', 'version', [CompletionResultType]::ParameterName, 'Prints version information')
[CompletionResult]::new('new', 'new', [CompletionResultType]::ParameterValue, 'Create a new network')
[CompletionResult]::new('uninstall', 'uninstall', [CompletionResultType]::ParameterValue, 'Permanently uninstall a created network, rendering it unusable. Use with care')
[CompletionResult]::new('serve', 'serve', [CompletionResultType]::ParameterValue, 'Serve the coordinating server for an existing network')
@ -39,7 +39,7 @@ Register-ArgumentCompleter -Native -CommandName 'innernet-server' -ScriptBlock {
[CompletionResult]::new('add-cidr', 'add-cidr', [CompletionResultType]::ParameterValue, 'Add a new CIDR to an existing network')
[CompletionResult]::new('delete-cidr', 'delete-cidr', [CompletionResultType]::ParameterValue, 'Delete a CIDR')
[CompletionResult]::new('completions', 'completions', [CompletionResultType]::ParameterValue, 'Generate shell completion scripts')
[CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Prints this message or the help of the given subcommand(s)')
[CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Print this message or the help of the given subcommand(s)')
break
}
'innernet-server;new' {
@ -48,27 +48,21 @@ Register-ArgumentCompleter -Native -CommandName 'innernet-server' -ScriptBlock {
[CompletionResult]::new('--external-endpoint', 'external-endpoint', [CompletionResultType]::ParameterName, 'This server''s external endpoint (ex: 100.100.100.100:51820)')
[CompletionResult]::new('--listen-port', 'listen-port', [CompletionResultType]::ParameterName, 'Port to listen on (for the WireGuard interface)')
[CompletionResult]::new('--auto-external-endpoint', 'auto-external-endpoint', [CompletionResultType]::ParameterName, 'Auto-resolve external endpoint')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Prints help information')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Prints help information')
[CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Prints version information')
[CompletionResult]::new('--version', 'version', [CompletionResultType]::ParameterName, 'Prints version information')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information')
break
}
'innernet-server;uninstall' {
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Prints help information')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Prints help information')
[CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Prints version information')
[CompletionResult]::new('--version', 'version', [CompletionResultType]::ParameterName, 'Prints version information')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information')
break
}
'innernet-server;serve' {
[CompletionResult]::new('--backend', 'backend', [CompletionResultType]::ParameterName, 'Specify a WireGuard backend to use. If not set, innernet will auto-select based on availability')
[CompletionResult]::new('--mtu', 'mtu', [CompletionResultType]::ParameterName, 'Specify the desired MTU for your interface (default: 1420 for IPv4 and 1400 for IPv6)')
[CompletionResult]::new('--no-routing', 'no-routing', [CompletionResultType]::ParameterName, 'Whether the routing should be done by innernet or is done by an external tool like e.g. babeld')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Prints help information')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Prints help information')
[CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Prints version information')
[CompletionResult]::new('--version', 'version', [CompletionResultType]::ParameterName, 'Prints version information')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information')
break
}
'innernet-server;add-peer' {
@ -80,20 +74,16 @@ Register-ArgumentCompleter -Native -CommandName 'innernet-server' -ScriptBlock {
[CompletionResult]::new('--invite-expires', 'invite-expires', [CompletionResultType]::ParameterName, 'Invite expiration period (eg. ''30d'', ''7w'', ''2h'', ''60m'', ''1000s'')')
[CompletionResult]::new('--auto-ip', 'auto-ip', [CompletionResultType]::ParameterName, 'Auto-assign the peer the first available IP within the CIDR')
[CompletionResult]::new('--yes', 'yes', [CompletionResultType]::ParameterName, 'Bypass confirmation')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Prints help information')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Prints help information')
[CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Prints version information')
[CompletionResult]::new('--version', 'version', [CompletionResultType]::ParameterName, 'Prints version information')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information')
break
}
'innernet-server;rename-peer' {
[CompletionResult]::new('--name', 'name', [CompletionResultType]::ParameterName, 'Name of peer to rename')
[CompletionResult]::new('--new-name', 'new-name', [CompletionResultType]::ParameterName, 'The new name of the peer')
[CompletionResult]::new('--yes', 'yes', [CompletionResultType]::ParameterName, 'Bypass confirmation')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Prints help information')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Prints help information')
[CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Prints version information')
[CompletionResult]::new('--version', 'version', [CompletionResultType]::ParameterName, 'Prints version information')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information')
break
}
'innernet-server;add-cidr' {
@ -101,33 +91,23 @@ Register-ArgumentCompleter -Native -CommandName 'innernet-server' -ScriptBlock {
[CompletionResult]::new('--cidr', 'cidr', [CompletionResultType]::ParameterName, 'The CIDR network (eg. ''10.42.5.0/24'')')
[CompletionResult]::new('--parent', 'parent', [CompletionResultType]::ParameterName, 'The CIDR parent name')
[CompletionResult]::new('--yes', 'yes', [CompletionResultType]::ParameterName, 'Bypass confirmation')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Prints help information')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Prints help information')
[CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Prints version information')
[CompletionResult]::new('--version', 'version', [CompletionResultType]::ParameterName, 'Prints version information')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information')
break
}
'innernet-server;delete-cidr' {
[CompletionResult]::new('--name', 'name', [CompletionResultType]::ParameterName, 'The CIDR name (eg. ''engineers'')')
[CompletionResult]::new('--yes', 'yes', [CompletionResultType]::ParameterName, 'Bypass confirmation')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Prints help information')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Prints help information')
[CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Prints version information')
[CompletionResult]::new('--version', 'version', [CompletionResultType]::ParameterName, 'Prints version information')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information')
break
}
'innernet-server;completions' {
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Prints help information')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Prints help information')
[CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Prints version information')
[CompletionResult]::new('--version', 'version', [CompletionResultType]::ParameterName, 'Prints version information')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information')
break
}
'innernet-server;help' {
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Prints help information')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Prints help information')
[CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Prints version information')
[CompletionResult]::new('--version', 'version', [CompletionResultType]::ParameterName, 'Prints version information')
break
}
})

View File

@ -15,17 +15,17 @@ _innernet-server() {
local context curcontext="$curcontext" state line
_arguments "${_arguments_options[@]}" \
'-c+[]' \
'--config-dir=[]' \
'-d+[]' \
'--data-dir=[]' \
'--backend=[Specify a WireGuard backend to use. If not set, innernet will auto-select based on availability]: :(kernel userspace)' \
'--mtu=[Specify the desired MTU for your interface (default: 1420 for IPv4 and 1400 for IPv6)]' \
'-c+[]:CONFIG_DIR: ' \
'--config-dir=[]:CONFIG_DIR: ' \
'-d+[]:DATA_DIR: ' \
'--data-dir=[]:DATA_DIR: ' \
'--backend=[Specify a WireGuard backend to use. If not set, innernet will auto-select based on availability]:BACKEND:(kernel userspace)' \
'--mtu=[Specify the desired MTU for your interface (default: 1420 for IPv4 and 1400 for IPv6)]:MTU: ' \
'-h[Print help information]' \
'--help[Print help information]' \
'-V[Print version information]' \
'--version[Print version information]' \
'--no-routing[Whether the routing should be done by innernet or is done by an external tool like e.g. babeld]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
":: :_innernet-server_commands" \
"*::: :->innernet-server" \
&& ret=0
@ -35,121 +35,88 @@ _innernet-server() {
(( CURRENT += 1 ))
curcontext="${curcontext%:*:*}:innernet-server-command-$line[1]:"
case $line[1] in
(init)
(new)
_arguments "${_arguments_options[@]}" \
'--network-name=[The network name (ex: evilcorp)]' \
'--network-cidr=[The network CIDR (ex: 10.42.0.0/16)]' \
'(--auto-external-endpoint)--external-endpoint=[This server'\''s external endpoint (ex: 100.100.100.100:51820)]' \
'--listen-port=[Port to listen on (for the WireGuard interface)]' \
'--network-name=[The network name (ex: evilcorp)]:NETWORK_NAME: ' \
'--network-cidr=[The network CIDR (ex: 10.42.0.0/16)]:NETWORK_CIDR: ' \
'(--auto-external-endpoint)--external-endpoint=[This server'\''s external endpoint (ex: 100.100.100.100:51820)]:EXTERNAL_ENDPOINT: ' \
'--listen-port=[Port to listen on (for the WireGuard interface)]:LISTEN_PORT: ' \
'--auto-external-endpoint[Auto-resolve external endpoint]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
&& ret=0
;;
(new)
_arguments "${_arguments_options[@]}" \
'--network-name=[The network name (ex: evilcorp)]' \
'--network-cidr=[The network CIDR (ex: 10.42.0.0/16)]' \
'(--auto-external-endpoint)--external-endpoint=[This server'\''s external endpoint (ex: 100.100.100.100:51820)]' \
'--listen-port=[Port to listen on (for the WireGuard interface)]' \
'--auto-external-endpoint[Auto-resolve external endpoint]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
'-h[Print help information]' \
'--help[Print help information]' \
&& ret=0
;;
(uninstall)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':interface:_files' \
'-h[Print help information]' \
'--help[Print help information]' \
':interface:' \
&& ret=0
;;
(serve)
_arguments "${_arguments_options[@]}" \
'--backend=[Specify a WireGuard backend to use. If not set, innernet will auto-select based on availability]: :(kernel userspace)' \
'--mtu=[Specify the desired MTU for your interface (default: 1420 for IPv4 and 1400 for IPv6)]' \
'--backend=[Specify a WireGuard backend to use. If not set, innernet will auto-select based on availability]:BACKEND:(kernel userspace)' \
'--mtu=[Specify the desired MTU for your interface (default: 1420 for IPv4 and 1400 for IPv6)]:MTU: ' \
'--no-routing[Whether the routing should be done by innernet or is done by an external tool like e.g. babeld]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':interface:_files' \
'-h[Print help information]' \
'--help[Print help information]' \
':interface:' \
&& ret=0
;;
(add-peer)
_arguments "${_arguments_options[@]}" \
'--name=[Name of new peer]' \
'(--auto-ip)--ip=[Specify desired IP of new peer (within parent CIDR)]' \
'--cidr=[Name of CIDR to add new peer under]' \
'--admin=[Make new peer an admin?]' \
'--save-config=[Save the config to the given location]' \
'--invite-expires=[Invite expiration period (eg. '\''30d'\'', '\''7w'\'', '\''2h'\'', '\''60m'\'', '\''1000s'\'')]' \
'--name=[Name of new peer]:NAME: ' \
'(--auto-ip)--ip=[Specify desired IP of new peer (within parent CIDR)]:IP: ' \
'--cidr=[Name of CIDR to add new peer under]:CIDR: ' \
'--admin=[Make new peer an admin?]:ADMIN: ' \
'--save-config=[Save the config to the given location]:SAVE_CONFIG: ' \
'--invite-expires=[Invite expiration period (eg. '\''30d'\'', '\''7w'\'', '\''2h'\'', '\''60m'\'', '\''1000s'\'')]:INVITE_EXPIRES: ' \
'--auto-ip[Auto-assign the peer the first available IP within the CIDR]' \
'--yes[Bypass confirmation]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':interface:_files' \
'-h[Print help information]' \
'--help[Print help information]' \
':interface:' \
&& ret=0
;;
(rename-peer)
_arguments "${_arguments_options[@]}" \
'--name=[Name of peer to rename]' \
'--new-name=[The new name of the peer]' \
'--name=[Name of peer to rename]:NAME: ' \
'--new-name=[The new name of the peer]:NEW_NAME: ' \
'--yes[Bypass confirmation]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':interface:_files' \
'-h[Print help information]' \
'--help[Print help information]' \
':interface:' \
&& ret=0
;;
(add-cidr)
_arguments "${_arguments_options[@]}" \
'--name=[The CIDR name (eg. '\''engineers'\'')]' \
'--cidr=[The CIDR network (eg. '\''10.42.5.0/24'\'')]' \
'--parent=[The CIDR parent name]' \
'--name=[The CIDR name (eg. '\''engineers'\'')]:NAME: ' \
'--cidr=[The CIDR network (eg. '\''10.42.5.0/24'\'')]:CIDR: ' \
'--parent=[The CIDR parent name]:PARENT: ' \
'--yes[Bypass confirmation]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':interface:_files' \
'-h[Print help information]' \
'--help[Print help information]' \
':interface:' \
&& ret=0
;;
(delete-cidr)
_arguments "${_arguments_options[@]}" \
'--name=[The CIDR name (eg. '\''engineers'\'')]' \
'--name=[The CIDR name (eg. '\''engineers'\'')]:NAME: ' \
'--yes[Bypass confirmation]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':interface:_files' \
'-h[Print help information]' \
'--help[Print help information]' \
':interface:' \
&& ret=0
;;
(completions)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':shell:(zsh bash fish powershell elvish)' \
'-h[Print help information]' \
'--help[Print help information]' \
':shell:(bash elvish fish powershell zsh)' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
&& ret=0
;;
esac
@ -160,93 +127,61 @@ esac
(( $+functions[_innernet-server_commands] )) ||
_innernet-server_commands() {
local commands; commands=(
"new:Create a new network" \
"uninstall:Permanently uninstall a created network, rendering it unusable. Use with care" \
"serve:Serve the coordinating server for an existing network" \
"add-peer:Add a peer to an existing network" \
"rename-peer:Rename an existing peer" \
"add-cidr:Add a new CIDR to an existing network" \
"delete-cidr:Delete a CIDR" \
"completions:Generate shell completion scripts" \
"help:Prints this message or the help of the given subcommand(s)" \
'new:Create a new network' \
'uninstall:Permanently uninstall a created network, rendering it unusable. Use with care' \
'serve:Serve the coordinating server for an existing network' \
'add-peer:Add a peer to an existing network' \
'rename-peer:Rename an existing peer' \
'add-cidr:Add a new CIDR to an existing network' \
'delete-cidr:Delete a CIDR' \
'completions:Generate shell completion scripts' \
'help:Print this message or the help of the given subcommand(s)' \
)
_describe -t commands 'innernet-server commands' commands "$@"
}
(( $+functions[_innernet-server__add-cidr_commands] )) ||
_innernet-server__add-cidr_commands() {
local commands; commands=(
)
local commands; commands=()
_describe -t commands 'innernet-server add-cidr commands' commands "$@"
}
(( $+functions[_innernet-server__add-peer_commands] )) ||
_innernet-server__add-peer_commands() {
local commands; commands=(
)
local commands; commands=()
_describe -t commands 'innernet-server add-peer commands' commands "$@"
}
(( $+functions[_innernet-server__completions_commands] )) ||
_innernet-server__completions_commands() {
local commands; commands=(
)
local commands; commands=()
_describe -t commands 'innernet-server completions commands' commands "$@"
}
(( $+functions[_innernet-server__delete-cidr_commands] )) ||
_innernet-server__delete-cidr_commands() {
local commands; commands=(
)
local commands; commands=()
_describe -t commands 'innernet-server delete-cidr commands' commands "$@"
}
(( $+functions[_innernet-server__help_commands] )) ||
_innernet-server__help_commands() {
local commands; commands=(
)
local commands; commands=()
_describe -t commands 'innernet-server help commands' commands "$@"
}
(( $+functions[_init_commands] )) ||
_init_commands() {
local commands; commands=(
)
_describe -t commands 'init commands' commands "$@"
}
(( $+functions[_innernet-server__init_commands] )) ||
_innernet-server__init_commands() {
local commands; commands=(
)
_describe -t commands 'innernet-server init commands' commands "$@"
}
(( $+functions[_innernet-server__new_commands] )) ||
_innernet-server__new_commands() {
local commands; commands=(
)
local commands; commands=()
_describe -t commands 'innernet-server new commands' commands "$@"
}
(( $+functions[_innernet-server__rename-peer_commands] )) ||
_innernet-server__rename-peer_commands() {
local commands; commands=(
)
local commands; commands=()
_describe -t commands 'innernet-server rename-peer commands' commands "$@"
}
(( $+functions[_innernet-server__serve_commands] )) ||
_innernet-server__serve_commands() {
local commands; commands=(
)
local commands; commands=()
_describe -t commands 'innernet-server serve commands' commands "$@"
}
(( $+functions[_innernet-server__uninstall_commands] )) ||
_innernet-server__uninstall_commands() {
local commands; commands=(
)
local commands; commands=()
_describe -t commands 'innernet-server uninstall commands' commands "$@"
}

View File

@ -1,47 +1,43 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.48.5.
.TH INNERNET "8" "December 2021" "innernet 1.5.2" "System Administration Utilities"
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.13.
.TH INNERNET "8" "January 2022" "innernet 1.5.3-beta.1" "System Administration Utilities"
.SH NAME
innernet \- manual page for innernet 1.5.2
innernet \- manual page for innernet 1.5.3-beta.1
.SH DESCRIPTION
innernet 1.5.2
innernet 1.5.3\-beta.1
Jake McGinty <jake@tonari.no>
A client to manage innernet network interfaces.
.SS "USAGE:"
.IP
innernet [OPTIONS] [SUBCOMMAND]
.SS "OPTIONS:"
.HP
.TP
\fB\-v\fR, \fB\-\-verbose\fR
.IP
Verbose output, use \fB\-vv\fR for even higher verbositude
.HP
\fB\-c\fR, \fB\-\-config\-dir\fR <config\-dir>
.IP
.TP
\fB\-c\fR, \fB\-\-config\-dir\fR <CONFIG_DIR>
[default: /etc/innernet]
.HP
\fB\-d\fR, \fB\-\-data\-dir\fR <data\-dir>
.IP
.TP
\fB\-d\fR, \fB\-\-data\-dir\fR <DATA_DIR>
[default: /var/lib/innernet]
.HP
.TP
\fB\-\-no\-routing\fR
.IP
Whether the routing should be done by innernet or is done by an external tool like e.g. babeld
.HP
\fB\-\-backend\fR <backend>
.IP
Specify a WireGuard backend to use. If not set, innernet will auto\-select based on availability [default:
kernel] [possible values: kernel, userspace]
.HP
\fB\-\-mtu\fR <mtu>
.IP
Specify the desired MTU for your interface (default: 1420 for IPv4 and 1400 for IPv6)
.HP
Whether the routing should be done by innernet or is done by an
external tool like e.g. babeld
.TP
\fB\-\-backend\fR <BACKEND>
Specify a WireGuard backend to use. If not set, innernet will
auto\-select based on availability [default: kernel] [possible
values: kernel, userspace]
.TP
\fB\-\-mtu\fR <MTU>
Specify the desired MTU for your interface (default: 1420 for
IPv4 and 1400 for IPv6)
.TP
\fB\-h\fR, \fB\-\-help\fR
.IP
Prints help information
.HP
Print help information
.TP
\fB\-V\fR, \fB\-\-version\fR
.IP
Prints version information
Print version information
.SS "SUBCOMMANDS:"
.TP
install
@ -102,4 +98,4 @@ completions
Generate shell completion scripts
.TP
help
Prints this message or the help of the given subcommand(s)
Print this message or the help of the given subcommand(s)

Binary file not shown.

View File

@ -9,10 +9,9 @@ _innernet() {
for i in ${COMP_WORDS[@]}
do
case "${i}" in
innernet)
"$1")
cmd="innernet"
;;
add-association)
cmd+="__add__association"
;;
@ -49,9 +48,6 @@ _innernet() {
install)
cmd+="__install"
;;
list)
cmd+="__list"
;;
list-associations)
cmd+="__list__associations"
;;
@ -61,9 +57,6 @@ _innernet() {
override-endpoint)
cmd+="__override__endpoint"
;;
redeem)
cmd+="__redeem"
;;
rename-peer)
cmd+="__rename__peer"
;;
@ -86,18 +79,17 @@ _innernet() {
case "${cmd}" in
innernet)
opts=" -v -h -V -c -d --verbose --no-routing --help --version --config-dir --data-dir --backend --mtu install show up fetch uninstall down add-peer rename-peer add-cidr delete-cidr list-cidrs disable-peer enable-peer add-association delete-association list-associations set-listen-port override-endpoint completions help redeem list"
opts="-h -V -v -c -d --help --version --verbose --config-dir --data-dir --no-routing --backend --mtu install show up fetch uninstall down add-peer rename-peer add-cidr delete-cidr list-cidrs disable-peer enable-peer add-association delete-association list-associations set-listen-port override-endpoint completions help"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
--config-dir)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
-c)
-c)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
@ -105,7 +97,7 @@ _innernet() {
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
-d)
-d)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
@ -124,15 +116,13 @@ _innernet() {
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
innernet__add__association)
opts=" -h -V --help --version <interface> <cidr1> <cidr2> "
opts="-h --help <INTERFACE> <CIDR1> <CIDR2>"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
@ -141,13 +131,12 @@ _innernet() {
return 0
;;
innernet__add__cidr)
opts=" -h -V --yes --help --version --name --cidr --parent <interface> "
opts="-h --name --cidr --parent --yes --help <INTERFACE>"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
--name)
COMPREPLY=($(compgen -f "${cur}"))
return 0
@ -168,13 +157,12 @@ _innernet() {
return 0
;;
innernet__add__peer)
opts=" -h -V --auto-ip --yes --help --version --name --ip --cidr --admin --save-config --invite-expires <interface> "
opts="-h --name --ip --auto-ip --cidr --admin --yes --save-config --invite-expires --help <INTERFACE>"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
--name)
COMPREPLY=($(compgen -f "${cur}"))
return 0
@ -207,13 +195,12 @@ _innernet() {
return 0
;;
innernet__completions)
opts=" -h -V --help --version <shell> "
opts="-h --help bash elvish fish powershell zsh"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
@ -222,13 +209,12 @@ _innernet() {
return 0
;;
innernet__delete__association)
opts=" -h -V --help --version <interface> "
opts="-h --help <INTERFACE>"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
@ -237,13 +223,12 @@ _innernet() {
return 0
;;
innernet__delete__cidr)
opts=" -h -V --yes --help --version --name <interface> "
opts="-h --name --yes --help <INTERFACE>"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
--name)
COMPREPLY=($(compgen -f "${cur}"))
return 0
@ -256,13 +241,12 @@ _innernet() {
return 0
;;
innernet__disable__peer)
opts=" -h -V --help --version <interface> "
opts="-h --help <INTERFACE>"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
@ -271,13 +255,12 @@ _innernet() {
return 0
;;
innernet__down)
opts=" -h -V --help --version <interface> "
opts="-h --help <INTERFACE>"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
@ -286,13 +269,12 @@ _innernet() {
return 0
;;
innernet__enable__peer)
opts=" -h -V --help --version <interface> "
opts="-h --help <INTERFACE>"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
@ -301,13 +283,12 @@ _innernet() {
return 0
;;
innernet__fetch)
opts=" -h -V --no-write-hosts --no-nat-traversal --no-nat-candidates --help --version --hosts-path --exclude-nat-candidates <interface> "
opts="-h --hosts-path --no-write-hosts --no-nat-traversal --exclude-nat-candidates --no-nat-candidates --help <INTERFACE>"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
--hosts-path)
COMPREPLY=($(compgen -f "${cur}"))
return 0
@ -324,13 +305,12 @@ _innernet() {
return 0
;;
innernet__help)
opts=" -h -V --help --version "
opts=""
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
@ -339,13 +319,12 @@ _innernet() {
return 0
;;
innernet__install)
opts=" -d -h -V --no-write-hosts --default-name --delete-invite --no-nat-traversal --no-nat-candidates --help --version --hosts-path --name --exclude-nat-candidates <invite> "
opts="-d -h --hosts-path --no-write-hosts --name --default-name --delete-invite --no-nat-traversal --exclude-nat-candidates --no-nat-candidates --help <INVITE>"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
--hosts-path)
COMPREPLY=($(compgen -f "${cur}"))
return 0
@ -365,29 +344,13 @@ _innernet() {
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
innernet__list)
opts=" -s -t -h -V --short --tree --help --version <interface> "
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
innernet__list__associations)
opts=" -h -V --help --version <interface> "
opts="-h --help <INTERFACE>"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
@ -396,13 +359,12 @@ _innernet() {
return 0
;;
innernet__list__cidrs)
opts=" -t -h -V --tree --help --version <interface> "
opts="-t -h --tree --help <INTERFACE>"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
@ -411,45 +373,17 @@ _innernet() {
return 0
;;
innernet__override__endpoint)
opts=" -u -h -V -e --unset --yes --help --version --endpoint <interface> "
opts="-e -u -h --endpoint --unset --yes --help <INTERFACE>"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
--endpoint)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
-e)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
innernet__redeem)
opts=" -d -h -V --no-write-hosts --default-name --delete-invite --no-nat-traversal --no-nat-candidates --help --version --hosts-path --name --exclude-nat-candidates <invite> "
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
--hosts-path)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--name)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--exclude-nat-candidates)
-e)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
@ -461,13 +395,12 @@ _innernet() {
return 0
;;
innernet__rename__peer)
opts=" -h -V --yes --help --version --name --new-name <interface> "
opts="-h --name --new-name --yes --help <INTERFACE>"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
--name)
COMPREPLY=($(compgen -f "${cur}"))
return 0
@ -484,18 +417,17 @@ _innernet() {
return 0
;;
innernet__set__listen__port)
opts=" -u -h -V -l --unset --yes --help --version --listen-port <interface> "
opts="-l -u -h --listen-port --unset --yes --help <INTERFACE>"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
--listen-port)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
-l)
-l)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
@ -507,13 +439,12 @@ _innernet() {
return 0
;;
innernet__show)
opts=" -s -t -h -V --short --tree --help --version <interface> "
opts="-s -t -h --short --tree --help <INTERFACE>"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
@ -522,13 +453,12 @@ _innernet() {
return 0
;;
innernet__uninstall)
opts=" -h -V --help --version <interface> "
opts="-h --help <INTERFACE>"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
@ -537,13 +467,12 @@ _innernet() {
return 0
;;
innernet__up)
opts=" -d -h -V --daemon --no-write-hosts --no-nat-traversal --no-nat-candidates --help --version --interval --hosts-path --exclude-nat-candidates <interface> "
opts="-d -h --daemon --interval --hosts-path --no-write-hosts --no-nat-traversal --exclude-nat-candidates --no-nat-candidates --help <INTERFACE>"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
--interval)
COMPREPLY=($(compgen -f "${cur}"))
return 0

View File

@ -1,19 +1,22 @@
edit:completion:arg-completer[innernet] = [@words]{
use builtin;
use str;
set edit:completion:arg-completer[innernet] = [@words]{
fn spaces [n]{
repeat $n ' ' | joins ''
builtin:repeat $n ' ' | str:join ''
}
fn cand [text desc]{
edit:complex-candidate $text &display-suffix=' '(spaces (- 14 (wcswidth $text)))$desc
edit:complex-candidate $text &display=$text' '(spaces (- 14 (wcswidth $text)))$desc
}
command = 'innernet'
for word $words[1:-1] {
if (has-prefix $word '-') {
var command = 'innernet'
for word $words[1..-1] {
if (str:has-prefix $word '-') {
break
}
command = $command';'$word
set command = $command';'$word
}
completions = [
var completions = [
&'innernet'= {
cand -c 'c'
cand --config-dir 'config-dir'
@ -21,13 +24,13 @@ edit:completion:arg-completer[innernet] = [@words]{
cand --data-dir 'data-dir'
cand --backend 'Specify a WireGuard backend to use. If not set, innernet will auto-select based on availability'
cand --mtu 'Specify the desired MTU for your interface (default: 1420 for IPv4 and 1400 for IPv6)'
cand -h 'Print help information'
cand --help 'Print help information'
cand -V 'Print version information'
cand --version 'Print version information'
cand -v 'Verbose output, use -vv for even higher verbositude'
cand --verbose 'Verbose output, use -vv for even higher verbositude'
cand --no-routing 'Whether the routing should be done by innernet or is done by an external tool like e.g. babeld'
cand -h 'Prints help information'
cand --help 'Prints help information'
cand -V 'Prints version information'
cand --version 'Prints version information'
cand install 'Install a new innernet config'
cand show 'Enumerate all innernet connections'
cand up 'Bring up your local interface, and update it with latest peer list'
@ -47,7 +50,7 @@ edit:completion:arg-completer[innernet] = [@words]{
cand set-listen-port 'Set the local listen port'
cand override-endpoint 'Override your external endpoint that the server sends to other peers'
cand completions 'Generate shell completion scripts'
cand help 'Prints this message or the help of the given subcommand(s)'
cand help 'Print this message or the help of the given subcommand(s)'
}
&'innernet;install'= {
cand --hosts-path 'The path to write hosts to'
@ -59,20 +62,16 @@ edit:completion:arg-completer[innernet] = [@words]{
cand --delete-invite 'Delete the invitation after a successful install'
cand --no-nat-traversal 'Don''t attempt NAT traversal. Note that this still will report candidates unless you also specify to exclude all NAT candidates'
cand --no-nat-candidates 'Don''t report any candidates to coordinating server. Shorthand for --exclude-nat-candidates ''0.0.0.0/0'''
cand -h 'Prints help information'
cand --help 'Prints help information'
cand -V 'Prints version information'
cand --version 'Prints version information'
cand -h 'Print help information'
cand --help 'Print help information'
}
&'innernet;show'= {
cand -s 'One-line peer list'
cand --short 'One-line peer list'
cand -t 'Display peers in a tree based on the CIDRs'
cand --tree 'Display peers in a tree based on the CIDRs'
cand -h 'Prints help information'
cand --help 'Prints help information'
cand -V 'Prints version information'
cand --version 'Prints version information'
cand -h 'Print help information'
cand --help 'Print help information'
}
&'innernet;up'= {
cand --interval 'Keep fetching the latest peer list at the specified interval in seconds. Valid only in daemon mode'
@ -83,10 +82,8 @@ edit:completion:arg-completer[innernet] = [@words]{
cand --no-write-hosts 'Don''t write to any hosts files'
cand --no-nat-traversal 'Don''t attempt NAT traversal. Note that this still will report candidates unless you also specify to exclude all NAT candidates'
cand --no-nat-candidates 'Don''t report any candidates to coordinating server. Shorthand for --exclude-nat-candidates ''0.0.0.0/0'''
cand -h 'Prints help information'
cand --help 'Prints help information'
cand -V 'Prints version information'
cand --version 'Prints version information'
cand -h 'Print help information'
cand --help 'Print help information'
}
&'innernet;fetch'= {
cand --hosts-path 'The path to write hosts to'
@ -94,22 +91,16 @@ edit:completion:arg-completer[innernet] = [@words]{
cand --no-write-hosts 'Don''t write to any hosts files'
cand --no-nat-traversal 'Don''t attempt NAT traversal. Note that this still will report candidates unless you also specify to exclude all NAT candidates'
cand --no-nat-candidates 'Don''t report any candidates to coordinating server. Shorthand for --exclude-nat-candidates ''0.0.0.0/0'''
cand -h 'Prints help information'
cand --help 'Prints help information'
cand -V 'Prints version information'
cand --version 'Prints version information'
cand -h 'Print help information'
cand --help 'Print help information'
}
&'innernet;uninstall'= {
cand -h 'Prints help information'
cand --help 'Prints help information'
cand -V 'Prints version information'
cand --version 'Prints version information'
cand -h 'Print help information'
cand --help 'Print help information'
}
&'innernet;down'= {
cand -h 'Prints help information'
cand --help 'Prints help information'
cand -V 'Prints version information'
cand --version 'Prints version information'
cand -h 'Print help information'
cand --help 'Print help information'
}
&'innernet;add-peer'= {
cand --name 'Name of new peer'
@ -120,75 +111,55 @@ edit:completion:arg-completer[innernet] = [@words]{
cand --invite-expires 'Invite expiration period (eg. ''30d'', ''7w'', ''2h'', ''60m'', ''1000s'')'
cand --auto-ip 'Auto-assign the peer the first available IP within the CIDR'
cand --yes 'Bypass confirmation'
cand -h 'Prints help information'
cand --help 'Prints help information'
cand -V 'Prints version information'
cand --version 'Prints version information'
cand -h 'Print help information'
cand --help 'Print help information'
}
&'innernet;rename-peer'= {
cand --name 'Name of peer to rename'
cand --new-name 'The new name of the peer'
cand --yes 'Bypass confirmation'
cand -h 'Prints help information'
cand --help 'Prints help information'
cand -V 'Prints version information'
cand --version 'Prints version information'
cand -h 'Print help information'
cand --help 'Print help information'
}
&'innernet;add-cidr'= {
cand --name 'The CIDR name (eg. ''engineers'')'
cand --cidr 'The CIDR network (eg. ''10.42.5.0/24'')'
cand --parent 'The CIDR parent name'
cand --yes 'Bypass confirmation'
cand -h 'Prints help information'
cand --help 'Prints help information'
cand -V 'Prints version information'
cand --version 'Prints version information'
cand -h 'Print help information'
cand --help 'Print help information'
}
&'innernet;delete-cidr'= {
cand --name 'The CIDR name (eg. ''engineers'')'
cand --yes 'Bypass confirmation'
cand -h 'Prints help information'
cand --help 'Prints help information'
cand -V 'Prints version information'
cand --version 'Prints version information'
cand -h 'Print help information'
cand --help 'Print help information'
}
&'innernet;list-cidrs'= {
cand -t 'Display CIDRs in tree format'
cand --tree 'Display CIDRs in tree format'
cand -h 'Prints help information'
cand --help 'Prints help information'
cand -V 'Prints version information'
cand --version 'Prints version information'
cand -h 'Print help information'
cand --help 'Print help information'
}
&'innernet;disable-peer'= {
cand -h 'Prints help information'
cand --help 'Prints help information'
cand -V 'Prints version information'
cand --version 'Prints version information'
cand -h 'Print help information'
cand --help 'Print help information'
}
&'innernet;enable-peer'= {
cand -h 'Prints help information'
cand --help 'Prints help information'
cand -V 'Prints version information'
cand --version 'Prints version information'
cand -h 'Print help information'
cand --help 'Print help information'
}
&'innernet;add-association'= {
cand -h 'Prints help information'
cand --help 'Prints help information'
cand -V 'Prints version information'
cand --version 'Prints version information'
cand -h 'Print help information'
cand --help 'Print help information'
}
&'innernet;delete-association'= {
cand -h 'Prints help information'
cand --help 'Prints help information'
cand -V 'Prints version information'
cand --version 'Prints version information'
cand -h 'Print help information'
cand --help 'Print help information'
}
&'innernet;list-associations'= {
cand -h 'Prints help information'
cand --help 'Prints help information'
cand -V 'Prints version information'
cand --version 'Prints version information'
cand -h 'Print help information'
cand --help 'Print help information'
}
&'innernet;set-listen-port'= {
cand -l 'The listen port you''d like to set for the interface'
@ -196,10 +167,8 @@ edit:completion:arg-completer[innernet] = [@words]{
cand -u 'Unset the local listen port to use a randomized port'
cand --unset 'Unset the local listen port to use a randomized port'
cand --yes 'Bypass confirmation'
cand -h 'Prints help information'
cand --help 'Prints help information'
cand -V 'Prints version information'
cand --version 'Prints version information'
cand -h 'Print help information'
cand --help 'Print help information'
}
&'innernet;override-endpoint'= {
cand -e 'The listen port you''d like to set for the interface'
@ -207,22 +176,14 @@ edit:completion:arg-completer[innernet] = [@words]{
cand -u 'Unset an existing override to use the automatic endpoint discovery'
cand --unset 'Unset an existing override to use the automatic endpoint discovery'
cand --yes 'Bypass confirmation'
cand -h 'Prints help information'
cand --help 'Prints help information'
cand -V 'Prints version information'
cand --version 'Prints version information'
cand -h 'Print help information'
cand --help 'Print help information'
}
&'innernet;completions'= {
cand -h 'Prints help information'
cand --help 'Prints help information'
cand -V 'Prints version information'
cand --version 'Prints version information'
cand -h 'Print help information'
cand --help 'Print help information'
}
&'innernet;help'= {
cand -h 'Prints help information'
cand --help 'Prints help information'
cand -V 'Prints version information'
cand --version 'Prints version information'
}
]
$completions[$command]

View File

@ -1,11 +1,11 @@
complete -c innernet -n "__fish_use_subcommand" -s c -l config-dir
complete -c innernet -n "__fish_use_subcommand" -s d -l data-dir
complete -c innernet -n "__fish_use_subcommand" -l backend -d 'Specify a WireGuard backend to use. If not set, innernet will auto-select based on availability' -r -f -a "kernel userspace"
complete -c innernet -n "__fish_use_subcommand" -l mtu -d 'Specify the desired MTU for your interface (default: 1420 for IPv4 and 1400 for IPv6)'
complete -c innernet -n "__fish_use_subcommand" -s c -l config-dir -r
complete -c innernet -n "__fish_use_subcommand" -s d -l data-dir -r
complete -c innernet -n "__fish_use_subcommand" -l backend -d 'Specify a WireGuard backend to use. If not set, innernet will auto-select based on availability' -r -f -a "{kernel ,userspace }"
complete -c innernet -n "__fish_use_subcommand" -l mtu -d 'Specify the desired MTU for your interface (default: 1420 for IPv4 and 1400 for IPv6)' -r
complete -c innernet -n "__fish_use_subcommand" -s h -l help -d 'Print help information'
complete -c innernet -n "__fish_use_subcommand" -s V -l version -d 'Print version information'
complete -c innernet -n "__fish_use_subcommand" -s v -l verbose -d 'Verbose output, use -vv for even higher verbositude'
complete -c innernet -n "__fish_use_subcommand" -l no-routing -d 'Whether the routing should be done by innernet or is done by an external tool like e.g. babeld'
complete -c innernet -n "__fish_use_subcommand" -s h -l help -d 'Prints help information'
complete -c innernet -n "__fish_use_subcommand" -s V -l version -d 'Prints version information'
complete -c innernet -n "__fish_use_subcommand" -f -a "install" -d 'Install a new innernet config'
complete -c innernet -n "__fish_use_subcommand" -f -a "show" -d 'Enumerate all innernet connections'
complete -c innernet -n "__fish_use_subcommand" -f -a "up" -d 'Bring up your local interface, and update it with latest peer list'
@ -25,90 +25,69 @@ complete -c innernet -n "__fish_use_subcommand" -f -a "list-associations" -d 'Li
complete -c innernet -n "__fish_use_subcommand" -f -a "set-listen-port" -d 'Set the local listen port'
complete -c innernet -n "__fish_use_subcommand" -f -a "override-endpoint" -d 'Override your external endpoint that the server sends to other peers'
complete -c innernet -n "__fish_use_subcommand" -f -a "completions" -d 'Generate shell completion scripts'
complete -c innernet -n "__fish_use_subcommand" -f -a "help" -d 'Prints this message or the help of the given subcommand(s)'
complete -c innernet -n "__fish_seen_subcommand_from install" -l hosts-path -d 'The path to write hosts to'
complete -c innernet -n "__fish_seen_subcommand_from install" -l name -d 'Set a specific interface name'
complete -c innernet -n "__fish_seen_subcommand_from install" -l exclude-nat-candidates -d 'Exclude one or more CIDRs from NAT candidate reporting. ex. --exclude-nat-candidates \'0.0.0.0/0\' would report no candidates'
complete -c innernet -n "__fish_use_subcommand" -f -a "help" -d 'Print this message or the help of the given subcommand(s)'
complete -c innernet -n "__fish_seen_subcommand_from install" -l hosts-path -d 'The path to write hosts to' -r
complete -c innernet -n "__fish_seen_subcommand_from install" -l name -d 'Set a specific interface name' -r
complete -c innernet -n "__fish_seen_subcommand_from install" -l exclude-nat-candidates -d 'Exclude one or more CIDRs from NAT candidate reporting. ex. --exclude-nat-candidates \'0.0.0.0/0\' would report no candidates' -r
complete -c innernet -n "__fish_seen_subcommand_from install" -l no-write-hosts -d 'Don\'t write to any hosts files'
complete -c innernet -n "__fish_seen_subcommand_from install" -l default-name -d 'Use the network name inside the invitation as the interface name'
complete -c innernet -n "__fish_seen_subcommand_from install" -s d -l delete-invite -d 'Delete the invitation after a successful install'
complete -c innernet -n "__fish_seen_subcommand_from install" -l no-nat-traversal -d 'Don\'t attempt NAT traversal. Note that this still will report candidates unless you also specify to exclude all NAT candidates'
complete -c innernet -n "__fish_seen_subcommand_from install" -l no-nat-candidates -d 'Don\'t report any candidates to coordinating server. Shorthand for --exclude-nat-candidates \'0.0.0.0/0\''
complete -c innernet -n "__fish_seen_subcommand_from install" -s h -l help -d 'Prints help information'
complete -c innernet -n "__fish_seen_subcommand_from install" -s V -l version -d 'Prints version information'
complete -c innernet -n "__fish_seen_subcommand_from install" -s h -l help -d 'Print help information'
complete -c innernet -n "__fish_seen_subcommand_from show" -s s -l short -d 'One-line peer list'
complete -c innernet -n "__fish_seen_subcommand_from show" -s t -l tree -d 'Display peers in a tree based on the CIDRs'
complete -c innernet -n "__fish_seen_subcommand_from show" -s h -l help -d 'Prints help information'
complete -c innernet -n "__fish_seen_subcommand_from show" -s V -l version -d 'Prints version information'
complete -c innernet -n "__fish_seen_subcommand_from up" -l interval -d 'Keep fetching the latest peer list at the specified interval in seconds. Valid only in daemon mode'
complete -c innernet -n "__fish_seen_subcommand_from up" -l hosts-path -d 'The path to write hosts to'
complete -c innernet -n "__fish_seen_subcommand_from up" -l exclude-nat-candidates -d 'Exclude one or more CIDRs from NAT candidate reporting. ex. --exclude-nat-candidates \'0.0.0.0/0\' would report no candidates'
complete -c innernet -n "__fish_seen_subcommand_from show" -s h -l help -d 'Print help information'
complete -c innernet -n "__fish_seen_subcommand_from up" -l interval -d 'Keep fetching the latest peer list at the specified interval in seconds. Valid only in daemon mode' -r
complete -c innernet -n "__fish_seen_subcommand_from up" -l hosts-path -d 'The path to write hosts to' -r
complete -c innernet -n "__fish_seen_subcommand_from up" -l exclude-nat-candidates -d 'Exclude one or more CIDRs from NAT candidate reporting. ex. --exclude-nat-candidates \'0.0.0.0/0\' would report no candidates' -r
complete -c innernet -n "__fish_seen_subcommand_from up" -s d -l daemon -d 'Enable daemon mode i.e. keep the process running, while fetching the latest peer list periodically'
complete -c innernet -n "__fish_seen_subcommand_from up" -l no-write-hosts -d 'Don\'t write to any hosts files'
complete -c innernet -n "__fish_seen_subcommand_from up" -l no-nat-traversal -d 'Don\'t attempt NAT traversal. Note that this still will report candidates unless you also specify to exclude all NAT candidates'
complete -c innernet -n "__fish_seen_subcommand_from up" -l no-nat-candidates -d 'Don\'t report any candidates to coordinating server. Shorthand for --exclude-nat-candidates \'0.0.0.0/0\''
complete -c innernet -n "__fish_seen_subcommand_from up" -s h -l help -d 'Prints help information'
complete -c innernet -n "__fish_seen_subcommand_from up" -s V -l version -d 'Prints version information'
complete -c innernet -n "__fish_seen_subcommand_from fetch" -l hosts-path -d 'The path to write hosts to'
complete -c innernet -n "__fish_seen_subcommand_from fetch" -l exclude-nat-candidates -d 'Exclude one or more CIDRs from NAT candidate reporting. ex. --exclude-nat-candidates \'0.0.0.0/0\' would report no candidates'
complete -c innernet -n "__fish_seen_subcommand_from up" -s h -l help -d 'Print help information'
complete -c innernet -n "__fish_seen_subcommand_from fetch" -l hosts-path -d 'The path to write hosts to' -r
complete -c innernet -n "__fish_seen_subcommand_from fetch" -l exclude-nat-candidates -d 'Exclude one or more CIDRs from NAT candidate reporting. ex. --exclude-nat-candidates \'0.0.0.0/0\' would report no candidates' -r
complete -c innernet -n "__fish_seen_subcommand_from fetch" -l no-write-hosts -d 'Don\'t write to any hosts files'
complete -c innernet -n "__fish_seen_subcommand_from fetch" -l no-nat-traversal -d 'Don\'t attempt NAT traversal. Note that this still will report candidates unless you also specify to exclude all NAT candidates'
complete -c innernet -n "__fish_seen_subcommand_from fetch" -l no-nat-candidates -d 'Don\'t report any candidates to coordinating server. Shorthand for --exclude-nat-candidates \'0.0.0.0/0\''
complete -c innernet -n "__fish_seen_subcommand_from fetch" -s h -l help -d 'Prints help information'
complete -c innernet -n "__fish_seen_subcommand_from fetch" -s V -l version -d 'Prints version information'
complete -c innernet -n "__fish_seen_subcommand_from uninstall" -s h -l help -d 'Prints help information'
complete -c innernet -n "__fish_seen_subcommand_from uninstall" -s V -l version -d 'Prints version information'
complete -c innernet -n "__fish_seen_subcommand_from down" -s h -l help -d 'Prints help information'
complete -c innernet -n "__fish_seen_subcommand_from down" -s V -l version -d 'Prints version information'
complete -c innernet -n "__fish_seen_subcommand_from add-peer" -l name -d 'Name of new peer'
complete -c innernet -n "__fish_seen_subcommand_from add-peer" -l ip -d 'Specify desired IP of new peer (within parent CIDR)'
complete -c innernet -n "__fish_seen_subcommand_from add-peer" -l cidr -d 'Name of CIDR to add new peer under'
complete -c innernet -n "__fish_seen_subcommand_from add-peer" -l admin -d 'Make new peer an admin?'
complete -c innernet -n "__fish_seen_subcommand_from add-peer" -l save-config -d 'Save the config to the given location'
complete -c innernet -n "__fish_seen_subcommand_from add-peer" -l invite-expires -d 'Invite expiration period (eg. \'30d\', \'7w\', \'2h\', \'60m\', \'1000s\')'
complete -c innernet -n "__fish_seen_subcommand_from fetch" -s h -l help -d 'Print help information'
complete -c innernet -n "__fish_seen_subcommand_from uninstall" -s h -l help -d 'Print help information'
complete -c innernet -n "__fish_seen_subcommand_from down" -s h -l help -d 'Print help information'
complete -c innernet -n "__fish_seen_subcommand_from add-peer" -l name -d 'Name of new peer' -r
complete -c innernet -n "__fish_seen_subcommand_from add-peer" -l ip -d 'Specify desired IP of new peer (within parent CIDR)' -r
complete -c innernet -n "__fish_seen_subcommand_from add-peer" -l cidr -d 'Name of CIDR to add new peer under' -r
complete -c innernet -n "__fish_seen_subcommand_from add-peer" -l admin -d 'Make new peer an admin?' -r
complete -c innernet -n "__fish_seen_subcommand_from add-peer" -l save-config -d 'Save the config to the given location' -r
complete -c innernet -n "__fish_seen_subcommand_from add-peer" -l invite-expires -d 'Invite expiration period (eg. \'30d\', \'7w\', \'2h\', \'60m\', \'1000s\')' -r
complete -c innernet -n "__fish_seen_subcommand_from add-peer" -l auto-ip -d 'Auto-assign the peer the first available IP within the CIDR'
complete -c innernet -n "__fish_seen_subcommand_from add-peer" -l yes -d 'Bypass confirmation'
complete -c innernet -n "__fish_seen_subcommand_from add-peer" -s h -l help -d 'Prints help information'
complete -c innernet -n "__fish_seen_subcommand_from add-peer" -s V -l version -d 'Prints version information'
complete -c innernet -n "__fish_seen_subcommand_from rename-peer" -l name -d 'Name of peer to rename'
complete -c innernet -n "__fish_seen_subcommand_from rename-peer" -l new-name -d 'The new name of the peer'
complete -c innernet -n "__fish_seen_subcommand_from add-peer" -s h -l help -d 'Print help information'
complete -c innernet -n "__fish_seen_subcommand_from rename-peer" -l name -d 'Name of peer to rename' -r
complete -c innernet -n "__fish_seen_subcommand_from rename-peer" -l new-name -d 'The new name of the peer' -r
complete -c innernet -n "__fish_seen_subcommand_from rename-peer" -l yes -d 'Bypass confirmation'
complete -c innernet -n "__fish_seen_subcommand_from rename-peer" -s h -l help -d 'Prints help information'
complete -c innernet -n "__fish_seen_subcommand_from rename-peer" -s V -l version -d 'Prints version information'
complete -c innernet -n "__fish_seen_subcommand_from add-cidr" -l name -d 'The CIDR name (eg. \'engineers\')'
complete -c innernet -n "__fish_seen_subcommand_from add-cidr" -l cidr -d 'The CIDR network (eg. \'10.42.5.0/24\')'
complete -c innernet -n "__fish_seen_subcommand_from add-cidr" -l parent -d 'The CIDR parent name'
complete -c innernet -n "__fish_seen_subcommand_from rename-peer" -s h -l help -d 'Print help information'
complete -c innernet -n "__fish_seen_subcommand_from add-cidr" -l name -d 'The CIDR name (eg. \'engineers\')' -r
complete -c innernet -n "__fish_seen_subcommand_from add-cidr" -l cidr -d 'The CIDR network (eg. \'10.42.5.0/24\')' -r
complete -c innernet -n "__fish_seen_subcommand_from add-cidr" -l parent -d 'The CIDR parent name' -r
complete -c innernet -n "__fish_seen_subcommand_from add-cidr" -l yes -d 'Bypass confirmation'
complete -c innernet -n "__fish_seen_subcommand_from add-cidr" -s h -l help -d 'Prints help information'
complete -c innernet -n "__fish_seen_subcommand_from add-cidr" -s V -l version -d 'Prints version information'
complete -c innernet -n "__fish_seen_subcommand_from delete-cidr" -l name -d 'The CIDR name (eg. \'engineers\')'
complete -c innernet -n "__fish_seen_subcommand_from add-cidr" -s h -l help -d 'Print help information'
complete -c innernet -n "__fish_seen_subcommand_from delete-cidr" -l name -d 'The CIDR name (eg. \'engineers\')' -r
complete -c innernet -n "__fish_seen_subcommand_from delete-cidr" -l yes -d 'Bypass confirmation'
complete -c innernet -n "__fish_seen_subcommand_from delete-cidr" -s h -l help -d 'Prints help information'
complete -c innernet -n "__fish_seen_subcommand_from delete-cidr" -s V -l version -d 'Prints version information'
complete -c innernet -n "__fish_seen_subcommand_from delete-cidr" -s h -l help -d 'Print help information'
complete -c innernet -n "__fish_seen_subcommand_from list-cidrs" -s t -l tree -d 'Display CIDRs in tree format'
complete -c innernet -n "__fish_seen_subcommand_from list-cidrs" -s h -l help -d 'Prints help information'
complete -c innernet -n "__fish_seen_subcommand_from list-cidrs" -s V -l version -d 'Prints version information'
complete -c innernet -n "__fish_seen_subcommand_from disable-peer" -s h -l help -d 'Prints help information'
complete -c innernet -n "__fish_seen_subcommand_from disable-peer" -s V -l version -d 'Prints version information'
complete -c innernet -n "__fish_seen_subcommand_from enable-peer" -s h -l help -d 'Prints help information'
complete -c innernet -n "__fish_seen_subcommand_from enable-peer" -s V -l version -d 'Prints version information'
complete -c innernet -n "__fish_seen_subcommand_from add-association" -s h -l help -d 'Prints help information'
complete -c innernet -n "__fish_seen_subcommand_from add-association" -s V -l version -d 'Prints version information'
complete -c innernet -n "__fish_seen_subcommand_from delete-association" -s h -l help -d 'Prints help information'
complete -c innernet -n "__fish_seen_subcommand_from delete-association" -s V -l version -d 'Prints version information'
complete -c innernet -n "__fish_seen_subcommand_from list-associations" -s h -l help -d 'Prints help information'
complete -c innernet -n "__fish_seen_subcommand_from list-associations" -s V -l version -d 'Prints version information'
complete -c innernet -n "__fish_seen_subcommand_from set-listen-port" -s l -l listen-port -d 'The listen port you\'d like to set for the interface'
complete -c innernet -n "__fish_seen_subcommand_from list-cidrs" -s h -l help -d 'Print help information'
complete -c innernet -n "__fish_seen_subcommand_from disable-peer" -s h -l help -d 'Print help information'
complete -c innernet -n "__fish_seen_subcommand_from enable-peer" -s h -l help -d 'Print help information'
complete -c innernet -n "__fish_seen_subcommand_from add-association" -s h -l help -d 'Print help information'
complete -c innernet -n "__fish_seen_subcommand_from delete-association" -s h -l help -d 'Print help information'
complete -c innernet -n "__fish_seen_subcommand_from list-associations" -s h -l help -d 'Print help information'
complete -c innernet -n "__fish_seen_subcommand_from set-listen-port" -s l -l listen-port -d 'The listen port you\'d like to set for the interface' -r
complete -c innernet -n "__fish_seen_subcommand_from set-listen-port" -s u -l unset -d 'Unset the local listen port to use a randomized port'
complete -c innernet -n "__fish_seen_subcommand_from set-listen-port" -l yes -d 'Bypass confirmation'
complete -c innernet -n "__fish_seen_subcommand_from set-listen-port" -s h -l help -d 'Prints help information'
complete -c innernet -n "__fish_seen_subcommand_from set-listen-port" -s V -l version -d 'Prints version information'
complete -c innernet -n "__fish_seen_subcommand_from override-endpoint" -s e -l endpoint -d 'The listen port you\'d like to set for the interface'
complete -c innernet -n "__fish_seen_subcommand_from set-listen-port" -s h -l help -d 'Print help information'
complete -c innernet -n "__fish_seen_subcommand_from override-endpoint" -s e -l endpoint -d 'The listen port you\'d like to set for the interface' -r
complete -c innernet -n "__fish_seen_subcommand_from override-endpoint" -s u -l unset -d 'Unset an existing override to use the automatic endpoint discovery'
complete -c innernet -n "__fish_seen_subcommand_from override-endpoint" -l yes -d 'Bypass confirmation'
complete -c innernet -n "__fish_seen_subcommand_from override-endpoint" -s h -l help -d 'Prints help information'
complete -c innernet -n "__fish_seen_subcommand_from override-endpoint" -s V -l version -d 'Prints version information'
complete -c innernet -n "__fish_seen_subcommand_from completions" -s h -l help -d 'Prints help information'
complete -c innernet -n "__fish_seen_subcommand_from completions" -s V -l version -d 'Prints version information'
complete -c innernet -n "__fish_seen_subcommand_from help" -s h -l help -d 'Prints help information'
complete -c innernet -n "__fish_seen_subcommand_from help" -s V -l version -d 'Prints version information'
complete -c innernet -n "__fish_seen_subcommand_from override-endpoint" -s h -l help -d 'Print help information'
complete -c innernet -n "__fish_seen_subcommand_from completions" -s h -l help -d 'Print help information'

View File

@ -26,13 +26,13 @@ Register-ArgumentCompleter -Native -CommandName 'innernet' -ScriptBlock {
[CompletionResult]::new('--data-dir', 'data-dir', [CompletionResultType]::ParameterName, 'data-dir')
[CompletionResult]::new('--backend', 'backend', [CompletionResultType]::ParameterName, 'Specify a WireGuard backend to use. If not set, innernet will auto-select based on availability')
[CompletionResult]::new('--mtu', 'mtu', [CompletionResultType]::ParameterName, 'Specify the desired MTU for your interface (default: 1420 for IPv4 and 1400 for IPv6)')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information')
[CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Print version information')
[CompletionResult]::new('--version', 'version', [CompletionResultType]::ParameterName, 'Print version information')
[CompletionResult]::new('-v', 'v', [CompletionResultType]::ParameterName, 'Verbose output, use -vv for even higher verbositude')
[CompletionResult]::new('--verbose', 'verbose', [CompletionResultType]::ParameterName, 'Verbose output, use -vv for even higher verbositude')
[CompletionResult]::new('--no-routing', 'no-routing', [CompletionResultType]::ParameterName, 'Whether the routing should be done by innernet or is done by an external tool like e.g. babeld')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Prints help information')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Prints help information')
[CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Prints version information')
[CompletionResult]::new('--version', 'version', [CompletionResultType]::ParameterName, 'Prints version information')
[CompletionResult]::new('install', 'install', [CompletionResultType]::ParameterValue, 'Install a new innernet config')
[CompletionResult]::new('show', 'show', [CompletionResultType]::ParameterValue, 'Enumerate all innernet connections')
[CompletionResult]::new('up', 'up', [CompletionResultType]::ParameterValue, 'Bring up your local interface, and update it with latest peer list')
@ -52,7 +52,7 @@ Register-ArgumentCompleter -Native -CommandName 'innernet' -ScriptBlock {
[CompletionResult]::new('set-listen-port', 'set-listen-port', [CompletionResultType]::ParameterValue, 'Set the local listen port')
[CompletionResult]::new('override-endpoint', 'override-endpoint', [CompletionResultType]::ParameterValue, 'Override your external endpoint that the server sends to other peers')
[CompletionResult]::new('completions', 'completions', [CompletionResultType]::ParameterValue, 'Generate shell completion scripts')
[CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Prints this message or the help of the given subcommand(s)')
[CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Print this message or the help of the given subcommand(s)')
break
}
'innernet;install' {
@ -65,10 +65,8 @@ Register-ArgumentCompleter -Native -CommandName 'innernet' -ScriptBlock {
[CompletionResult]::new('--delete-invite', 'delete-invite', [CompletionResultType]::ParameterName, 'Delete the invitation after a successful install')
[CompletionResult]::new('--no-nat-traversal', 'no-nat-traversal', [CompletionResultType]::ParameterName, 'Don''t attempt NAT traversal. Note that this still will report candidates unless you also specify to exclude all NAT candidates')
[CompletionResult]::new('--no-nat-candidates', 'no-nat-candidates', [CompletionResultType]::ParameterName, 'Don''t report any candidates to coordinating server. Shorthand for --exclude-nat-candidates ''0.0.0.0/0''')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Prints help information')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Prints help information')
[CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Prints version information')
[CompletionResult]::new('--version', 'version', [CompletionResultType]::ParameterName, 'Prints version information')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information')
break
}
'innernet;show' {
@ -76,10 +74,8 @@ Register-ArgumentCompleter -Native -CommandName 'innernet' -ScriptBlock {
[CompletionResult]::new('--short', 'short', [CompletionResultType]::ParameterName, 'One-line peer list')
[CompletionResult]::new('-t', 't', [CompletionResultType]::ParameterName, 'Display peers in a tree based on the CIDRs')
[CompletionResult]::new('--tree', 'tree', [CompletionResultType]::ParameterName, 'Display peers in a tree based on the CIDRs')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Prints help information')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Prints help information')
[CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Prints version information')
[CompletionResult]::new('--version', 'version', [CompletionResultType]::ParameterName, 'Prints version information')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information')
break
}
'innernet;up' {
@ -91,10 +87,8 @@ Register-ArgumentCompleter -Native -CommandName 'innernet' -ScriptBlock {
[CompletionResult]::new('--no-write-hosts', 'no-write-hosts', [CompletionResultType]::ParameterName, 'Don''t write to any hosts files')
[CompletionResult]::new('--no-nat-traversal', 'no-nat-traversal', [CompletionResultType]::ParameterName, 'Don''t attempt NAT traversal. Note that this still will report candidates unless you also specify to exclude all NAT candidates')
[CompletionResult]::new('--no-nat-candidates', 'no-nat-candidates', [CompletionResultType]::ParameterName, 'Don''t report any candidates to coordinating server. Shorthand for --exclude-nat-candidates ''0.0.0.0/0''')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Prints help information')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Prints help information')
[CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Prints version information')
[CompletionResult]::new('--version', 'version', [CompletionResultType]::ParameterName, 'Prints version information')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information')
break
}
'innernet;fetch' {
@ -103,24 +97,18 @@ Register-ArgumentCompleter -Native -CommandName 'innernet' -ScriptBlock {
[CompletionResult]::new('--no-write-hosts', 'no-write-hosts', [CompletionResultType]::ParameterName, 'Don''t write to any hosts files')
[CompletionResult]::new('--no-nat-traversal', 'no-nat-traversal', [CompletionResultType]::ParameterName, 'Don''t attempt NAT traversal. Note that this still will report candidates unless you also specify to exclude all NAT candidates')
[CompletionResult]::new('--no-nat-candidates', 'no-nat-candidates', [CompletionResultType]::ParameterName, 'Don''t report any candidates to coordinating server. Shorthand for --exclude-nat-candidates ''0.0.0.0/0''')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Prints help information')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Prints help information')
[CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Prints version information')
[CompletionResult]::new('--version', 'version', [CompletionResultType]::ParameterName, 'Prints version information')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information')
break
}
'innernet;uninstall' {
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Prints help information')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Prints help information')
[CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Prints version information')
[CompletionResult]::new('--version', 'version', [CompletionResultType]::ParameterName, 'Prints version information')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information')
break
}
'innernet;down' {
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Prints help information')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Prints help information')
[CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Prints version information')
[CompletionResult]::new('--version', 'version', [CompletionResultType]::ParameterName, 'Prints version information')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information')
break
}
'innernet;add-peer' {
@ -132,20 +120,16 @@ Register-ArgumentCompleter -Native -CommandName 'innernet' -ScriptBlock {
[CompletionResult]::new('--invite-expires', 'invite-expires', [CompletionResultType]::ParameterName, 'Invite expiration period (eg. ''30d'', ''7w'', ''2h'', ''60m'', ''1000s'')')
[CompletionResult]::new('--auto-ip', 'auto-ip', [CompletionResultType]::ParameterName, 'Auto-assign the peer the first available IP within the CIDR')
[CompletionResult]::new('--yes', 'yes', [CompletionResultType]::ParameterName, 'Bypass confirmation')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Prints help information')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Prints help information')
[CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Prints version information')
[CompletionResult]::new('--version', 'version', [CompletionResultType]::ParameterName, 'Prints version information')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information')
break
}
'innernet;rename-peer' {
[CompletionResult]::new('--name', 'name', [CompletionResultType]::ParameterName, 'Name of peer to rename')
[CompletionResult]::new('--new-name', 'new-name', [CompletionResultType]::ParameterName, 'The new name of the peer')
[CompletionResult]::new('--yes', 'yes', [CompletionResultType]::ParameterName, 'Bypass confirmation')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Prints help information')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Prints help information')
[CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Prints version information')
[CompletionResult]::new('--version', 'version', [CompletionResultType]::ParameterName, 'Prints version information')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information')
break
}
'innernet;add-cidr' {
@ -153,63 +137,47 @@ Register-ArgumentCompleter -Native -CommandName 'innernet' -ScriptBlock {
[CompletionResult]::new('--cidr', 'cidr', [CompletionResultType]::ParameterName, 'The CIDR network (eg. ''10.42.5.0/24'')')
[CompletionResult]::new('--parent', 'parent', [CompletionResultType]::ParameterName, 'The CIDR parent name')
[CompletionResult]::new('--yes', 'yes', [CompletionResultType]::ParameterName, 'Bypass confirmation')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Prints help information')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Prints help information')
[CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Prints version information')
[CompletionResult]::new('--version', 'version', [CompletionResultType]::ParameterName, 'Prints version information')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information')
break
}
'innernet;delete-cidr' {
[CompletionResult]::new('--name', 'name', [CompletionResultType]::ParameterName, 'The CIDR name (eg. ''engineers'')')
[CompletionResult]::new('--yes', 'yes', [CompletionResultType]::ParameterName, 'Bypass confirmation')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Prints help information')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Prints help information')
[CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Prints version information')
[CompletionResult]::new('--version', 'version', [CompletionResultType]::ParameterName, 'Prints version information')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information')
break
}
'innernet;list-cidrs' {
[CompletionResult]::new('-t', 't', [CompletionResultType]::ParameterName, 'Display CIDRs in tree format')
[CompletionResult]::new('--tree', 'tree', [CompletionResultType]::ParameterName, 'Display CIDRs in tree format')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Prints help information')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Prints help information')
[CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Prints version information')
[CompletionResult]::new('--version', 'version', [CompletionResultType]::ParameterName, 'Prints version information')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information')
break
}
'innernet;disable-peer' {
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Prints help information')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Prints help information')
[CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Prints version information')
[CompletionResult]::new('--version', 'version', [CompletionResultType]::ParameterName, 'Prints version information')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information')
break
}
'innernet;enable-peer' {
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Prints help information')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Prints help information')
[CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Prints version information')
[CompletionResult]::new('--version', 'version', [CompletionResultType]::ParameterName, 'Prints version information')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information')
break
}
'innernet;add-association' {
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Prints help information')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Prints help information')
[CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Prints version information')
[CompletionResult]::new('--version', 'version', [CompletionResultType]::ParameterName, 'Prints version information')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information')
break
}
'innernet;delete-association' {
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Prints help information')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Prints help information')
[CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Prints version information')
[CompletionResult]::new('--version', 'version', [CompletionResultType]::ParameterName, 'Prints version information')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information')
break
}
'innernet;list-associations' {
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Prints help information')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Prints help information')
[CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Prints version information')
[CompletionResult]::new('--version', 'version', [CompletionResultType]::ParameterName, 'Prints version information')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information')
break
}
'innernet;set-listen-port' {
@ -218,10 +186,8 @@ Register-ArgumentCompleter -Native -CommandName 'innernet' -ScriptBlock {
[CompletionResult]::new('-u', 'u', [CompletionResultType]::ParameterName, 'Unset the local listen port to use a randomized port')
[CompletionResult]::new('--unset', 'unset', [CompletionResultType]::ParameterName, 'Unset the local listen port to use a randomized port')
[CompletionResult]::new('--yes', 'yes', [CompletionResultType]::ParameterName, 'Bypass confirmation')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Prints help information')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Prints help information')
[CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Prints version information')
[CompletionResult]::new('--version', 'version', [CompletionResultType]::ParameterName, 'Prints version information')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information')
break
}
'innernet;override-endpoint' {
@ -230,24 +196,16 @@ Register-ArgumentCompleter -Native -CommandName 'innernet' -ScriptBlock {
[CompletionResult]::new('-u', 'u', [CompletionResultType]::ParameterName, 'Unset an existing override to use the automatic endpoint discovery')
[CompletionResult]::new('--unset', 'unset', [CompletionResultType]::ParameterName, 'Unset an existing override to use the automatic endpoint discovery')
[CompletionResult]::new('--yes', 'yes', [CompletionResultType]::ParameterName, 'Bypass confirmation')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Prints help information')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Prints help information')
[CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Prints version information')
[CompletionResult]::new('--version', 'version', [CompletionResultType]::ParameterName, 'Prints version information')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information')
break
}
'innernet;completions' {
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Prints help information')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Prints help information')
[CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Prints version information')
[CompletionResult]::new('--version', 'version', [CompletionResultType]::ParameterName, 'Prints version information')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information')
break
}
'innernet;help' {
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Prints help information')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Prints help information')
[CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Prints version information')
[CompletionResult]::new('--version', 'version', [CompletionResultType]::ParameterName, 'Prints version information')
break
}
})

View File

@ -15,19 +15,19 @@ _innernet() {
local context curcontext="$curcontext" state line
_arguments "${_arguments_options[@]}" \
'-c+[]' \
'--config-dir=[]' \
'-d+[]' \
'--data-dir=[]' \
'--backend=[Specify a WireGuard backend to use. If not set, innernet will auto-select based on availability]: :(kernel userspace)' \
'--mtu=[Specify the desired MTU for your interface (default: 1420 for IPv4 and 1400 for IPv6)]' \
'-c+[]:CONFIG_DIR: ' \
'--config-dir=[]:CONFIG_DIR: ' \
'-d+[]:DATA_DIR: ' \
'--data-dir=[]:DATA_DIR: ' \
'--backend=[Specify a WireGuard backend to use. If not set, innernet will auto-select based on availability]:BACKEND:(kernel userspace)' \
'--mtu=[Specify the desired MTU for your interface (default: 1420 for IPv4 and 1400 for IPv6)]:MTU: ' \
'-h[Print help information]' \
'--help[Print help information]' \
'-V[Print version information]' \
'--version[Print version information]' \
'*-v[Verbose output, use -vv for even higher verbositude]' \
'*--verbose[Verbose output, use -vv for even higher verbositude]' \
'--no-routing[Whether the routing should be done by innernet or is done by an external tool like e.g. babeld]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
":: :_innernet_commands" \
"*::: :->innernet" \
&& ret=0
@ -37,53 +37,20 @@ _innernet() {
(( CURRENT += 1 ))
curcontext="${curcontext%:*:*}:innernet-command-$line[1]:"
case $line[1] in
(redeem)
(install)
_arguments "${_arguments_options[@]}" \
'--hosts-path=[The path to write hosts to]' \
'(--default-name)--name=[Set a specific interface name]' \
'*--exclude-nat-candidates=[Exclude one or more CIDRs from NAT candidate reporting. ex. --exclude-nat-candidates '\''0.0.0.0/0'\'' would report no candidates]' \
'--hosts-path=[The path to write hosts to]:HOSTS_PATH: ' \
'(--default-name)--name=[Set a specific interface name]:NAME: ' \
'*--exclude-nat-candidates=[Exclude one or more CIDRs from NAT candidate reporting. ex. --exclude-nat-candidates '\''0.0.0.0/0'\'' would report no candidates]:EXCLUDE_NAT_CANDIDATES: ' \
'(--hosts-path)--no-write-hosts[Don'\''t write to any hosts files]' \
'--default-name[Use the network name inside the invitation as the interface name]' \
'-d[Delete the invitation after a successful install]' \
'--delete-invite[Delete the invitation after a successful install]' \
'--no-nat-traversal[Don'\''t attempt NAT traversal. Note that this still will report candidates unless you also specify to exclude all NAT candidates]' \
'(--exclude-nat-candidates)--no-nat-candidates[Don'\''t report any candidates to coordinating server. Shorthand for --exclude-nat-candidates '\''0.0.0.0/0'\'']' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':invite -- Path to the invitation file:_files' \
&& ret=0
;;
(install)
_arguments "${_arguments_options[@]}" \
'--hosts-path=[The path to write hosts to]' \
'(--default-name)--name=[Set a specific interface name]' \
'*--exclude-nat-candidates=[Exclude one or more CIDRs from NAT candidate reporting. ex. --exclude-nat-candidates '\''0.0.0.0/0'\'' would report no candidates]' \
'(--hosts-path)--no-write-hosts[Don'\''t write to any hosts files]' \
'--default-name[Use the network name inside the invitation as the interface name]' \
'-d[Delete the invitation after a successful install]' \
'--delete-invite[Delete the invitation after a successful install]' \
'--no-nat-traversal[Don'\''t attempt NAT traversal. Note that this still will report candidates unless you also specify to exclude all NAT candidates]' \
'(--exclude-nat-candidates)--no-nat-candidates[Don'\''t report any candidates to coordinating server. Shorthand for --exclude-nat-candidates '\''0.0.0.0/0'\'']' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':invite -- Path to the invitation file:_files' \
&& ret=0
;;
(list)
_arguments "${_arguments_options[@]}" \
'-s[One-line peer list]' \
'--short[One-line peer list]' \
'-t[Display peers in a tree based on the CIDRs]' \
'--tree[Display peers in a tree based on the CIDRs]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
'::interface:_files' \
'-h[Print help information]' \
'--help[Print help information]' \
':invite -- Path to the invitation file:' \
&& ret=0
;;
(show)
@ -92,216 +59,176 @@ _arguments "${_arguments_options[@]}" \
'--short[One-line peer list]' \
'-t[Display peers in a tree based on the CIDRs]' \
'--tree[Display peers in a tree based on the CIDRs]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
'::interface:_files' \
'-h[Print help information]' \
'--help[Print help information]' \
'::interface:' \
&& ret=0
;;
(up)
_arguments "${_arguments_options[@]}" \
'--interval=[Keep fetching the latest peer list at the specified interval in seconds. Valid only in daemon mode]' \
'--hosts-path=[The path to write hosts to]' \
'*--exclude-nat-candidates=[Exclude one or more CIDRs from NAT candidate reporting. ex. --exclude-nat-candidates '\''0.0.0.0/0'\'' would report no candidates]' \
'--interval=[Keep fetching the latest peer list at the specified interval in seconds. Valid only in daemon mode]:INTERVAL: ' \
'--hosts-path=[The path to write hosts to]:HOSTS_PATH: ' \
'*--exclude-nat-candidates=[Exclude one or more CIDRs from NAT candidate reporting. ex. --exclude-nat-candidates '\''0.0.0.0/0'\'' would report no candidates]:EXCLUDE_NAT_CANDIDATES: ' \
'-d[Enable daemon mode i.e. keep the process running, while fetching the latest peer list periodically]' \
'--daemon[Enable daemon mode i.e. keep the process running, while fetching the latest peer list periodically]' \
'(--hosts-path)--no-write-hosts[Don'\''t write to any hosts files]' \
'--no-nat-traversal[Don'\''t attempt NAT traversal. Note that this still will report candidates unless you also specify to exclude all NAT candidates]' \
'(--exclude-nat-candidates)--no-nat-candidates[Don'\''t report any candidates to coordinating server. Shorthand for --exclude-nat-candidates '\''0.0.0.0/0'\'']' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
'::interface:_files' \
'-h[Print help information]' \
'--help[Print help information]' \
'::interface:' \
&& ret=0
;;
(fetch)
_arguments "${_arguments_options[@]}" \
'--hosts-path=[The path to write hosts to]' \
'*--exclude-nat-candidates=[Exclude one or more CIDRs from NAT candidate reporting. ex. --exclude-nat-candidates '\''0.0.0.0/0'\'' would report no candidates]' \
'--hosts-path=[The path to write hosts to]:HOSTS_PATH: ' \
'*--exclude-nat-candidates=[Exclude one or more CIDRs from NAT candidate reporting. ex. --exclude-nat-candidates '\''0.0.0.0/0'\'' would report no candidates]:EXCLUDE_NAT_CANDIDATES: ' \
'(--hosts-path)--no-write-hosts[Don'\''t write to any hosts files]' \
'--no-nat-traversal[Don'\''t attempt NAT traversal. Note that this still will report candidates unless you also specify to exclude all NAT candidates]' \
'(--exclude-nat-candidates)--no-nat-candidates[Don'\''t report any candidates to coordinating server. Shorthand for --exclude-nat-candidates '\''0.0.0.0/0'\'']' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':interface:_files' \
'-h[Print help information]' \
'--help[Print help information]' \
':interface:' \
&& ret=0
;;
(uninstall)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':interface:_files' \
'-h[Print help information]' \
'--help[Print help information]' \
':interface:' \
&& ret=0
;;
(down)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':interface:_files' \
'-h[Print help information]' \
'--help[Print help information]' \
':interface:' \
&& ret=0
;;
(add-peer)
_arguments "${_arguments_options[@]}" \
'--name=[Name of new peer]' \
'(--auto-ip)--ip=[Specify desired IP of new peer (within parent CIDR)]' \
'--cidr=[Name of CIDR to add new peer under]' \
'--admin=[Make new peer an admin?]' \
'--save-config=[Save the config to the given location]' \
'--invite-expires=[Invite expiration period (eg. '\''30d'\'', '\''7w'\'', '\''2h'\'', '\''60m'\'', '\''1000s'\'')]' \
'--name=[Name of new peer]:NAME: ' \
'(--auto-ip)--ip=[Specify desired IP of new peer (within parent CIDR)]:IP: ' \
'--cidr=[Name of CIDR to add new peer under]:CIDR: ' \
'--admin=[Make new peer an admin?]:ADMIN: ' \
'--save-config=[Save the config to the given location]:SAVE_CONFIG: ' \
'--invite-expires=[Invite expiration period (eg. '\''30d'\'', '\''7w'\'', '\''2h'\'', '\''60m'\'', '\''1000s'\'')]:INVITE_EXPIRES: ' \
'--auto-ip[Auto-assign the peer the first available IP within the CIDR]' \
'--yes[Bypass confirmation]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':interface:_files' \
'-h[Print help information]' \
'--help[Print help information]' \
':interface:' \
&& ret=0
;;
(rename-peer)
_arguments "${_arguments_options[@]}" \
'--name=[Name of peer to rename]' \
'--new-name=[The new name of the peer]' \
'--name=[Name of peer to rename]:NAME: ' \
'--new-name=[The new name of the peer]:NEW_NAME: ' \
'--yes[Bypass confirmation]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':interface:_files' \
'-h[Print help information]' \
'--help[Print help information]' \
':interface:' \
&& ret=0
;;
(add-cidr)
_arguments "${_arguments_options[@]}" \
'--name=[The CIDR name (eg. '\''engineers'\'')]' \
'--cidr=[The CIDR network (eg. '\''10.42.5.0/24'\'')]' \
'--parent=[The CIDR parent name]' \
'--name=[The CIDR name (eg. '\''engineers'\'')]:NAME: ' \
'--cidr=[The CIDR network (eg. '\''10.42.5.0/24'\'')]:CIDR: ' \
'--parent=[The CIDR parent name]:PARENT: ' \
'--yes[Bypass confirmation]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':interface:_files' \
'-h[Print help information]' \
'--help[Print help information]' \
':interface:' \
&& ret=0
;;
(delete-cidr)
_arguments "${_arguments_options[@]}" \
'--name=[The CIDR name (eg. '\''engineers'\'')]' \
'--name=[The CIDR name (eg. '\''engineers'\'')]:NAME: ' \
'--yes[Bypass confirmation]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':interface:_files' \
'-h[Print help information]' \
'--help[Print help information]' \
':interface:' \
&& ret=0
;;
(list-cidrs)
_arguments "${_arguments_options[@]}" \
'-t[Display CIDRs in tree format]' \
'--tree[Display CIDRs in tree format]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':interface:_files' \
'-h[Print help information]' \
'--help[Print help information]' \
':interface:' \
&& ret=0
;;
(disable-peer)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':interface:_files' \
'-h[Print help information]' \
'--help[Print help information]' \
':interface:' \
&& ret=0
;;
(enable-peer)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':interface:_files' \
'-h[Print help information]' \
'--help[Print help information]' \
':interface:' \
&& ret=0
;;
(add-association)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':interface:_files' \
'::cidr1 -- The first cidr to associate:_files' \
'::cidr2 -- The second cidr to associate:_files' \
'-h[Print help information]' \
'--help[Print help information]' \
':interface:' \
'::cidr1 -- The first cidr to associate:' \
'::cidr2 -- The second cidr to associate:' \
&& ret=0
;;
(delete-association)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':interface:_files' \
'-h[Print help information]' \
'--help[Print help information]' \
':interface:' \
&& ret=0
;;
(list-associations)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':interface:_files' \
'-h[Print help information]' \
'--help[Print help information]' \
':interface:' \
&& ret=0
;;
(set-listen-port)
_arguments "${_arguments_options[@]}" \
'-l+[The listen port you'\''d like to set for the interface]' \
'--listen-port=[The listen port you'\''d like to set for the interface]' \
'-l+[The listen port you'\''d like to set for the interface]:LISTEN_PORT: ' \
'--listen-port=[The listen port you'\''d like to set for the interface]:LISTEN_PORT: ' \
'(-l --listen-port)-u[Unset the local listen port to use a randomized port]' \
'(-l --listen-port)--unset[Unset the local listen port to use a randomized port]' \
'--yes[Bypass confirmation]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':interface:_files' \
'-h[Print help information]' \
'--help[Print help information]' \
':interface:' \
&& ret=0
;;
(override-endpoint)
_arguments "${_arguments_options[@]}" \
'-e+[The listen port you'\''d like to set for the interface]' \
'--endpoint=[The listen port you'\''d like to set for the interface]' \
'-e+[The listen port you'\''d like to set for the interface]:ENDPOINT: ' \
'--endpoint=[The listen port you'\''d like to set for the interface]:ENDPOINT: ' \
'(-e --endpoint)-u[Unset an existing override to use the automatic endpoint discovery]' \
'(-e --endpoint)--unset[Unset an existing override to use the automatic endpoint discovery]' \
'--yes[Bypass confirmation]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':interface:_files' \
'-h[Print help information]' \
'--help[Print help information]' \
':interface:' \
&& ret=0
;;
(completions)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':shell:(zsh bash fish powershell elvish)' \
'-h[Print help information]' \
'--help[Print help information]' \
':shell:(bash elvish fish powershell zsh)' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
&& ret=0
;;
esac
@ -312,195 +239,127 @@ esac
(( $+functions[_innernet_commands] )) ||
_innernet_commands() {
local commands; commands=(
"install:Install a new innernet config" \
"show:Enumerate all innernet connections" \
"up:Bring up your local interface, and update it with latest peer list" \
"fetch:Fetch and update your local interface with the latest peer list" \
"uninstall:Uninstall an innernet network" \
"down:Bring down the interface (equivalent to 'wg-quick down <interface>')" \
"add-peer:Add a new peer" \
"rename-peer:Rename a peer" \
"add-cidr:Add a new CIDR" \
"delete-cidr:Delete a CIDR" \
"list-cidrs:List CIDRs" \
"disable-peer:Disable an enabled peer" \
"enable-peer:Enable a disabled peer" \
"add-association:Add an association between CIDRs" \
"delete-association:Delete an association between CIDRs" \
"list-associations:List existing assocations between CIDRs" \
"set-listen-port:Set the local listen port" \
"override-endpoint:Override your external endpoint that the server sends to other peers" \
"completions:Generate shell completion scripts" \
"help:Prints this message or the help of the given subcommand(s)" \
'install:Install a new innernet config' \
'show:Enumerate all innernet connections' \
'up:Bring up your local interface, and update it with latest peer list' \
'fetch:Fetch and update your local interface with the latest peer list' \
'uninstall:Uninstall an innernet network' \
'down:Bring down the interface (equivalent to '\''wg-quick down <interface>'\'')' \
'add-peer:Add a new peer' \
'rename-peer:Rename a peer' \
'add-cidr:Add a new CIDR' \
'delete-cidr:Delete a CIDR' \
'list-cidrs:List CIDRs' \
'disable-peer:Disable an enabled peer' \
'enable-peer:Enable a disabled peer' \
'add-association:Add an association between CIDRs' \
'delete-association:Delete an association between CIDRs' \
'list-associations:List existing assocations between CIDRs' \
'set-listen-port:Set the local listen port' \
'override-endpoint:Override your external endpoint that the server sends to other peers' \
'completions:Generate shell completion scripts' \
'help:Print this message or the help of the given subcommand(s)' \
)
_describe -t commands 'innernet commands' commands "$@"
}
(( $+functions[_innernet__add-association_commands] )) ||
_innernet__add-association_commands() {
local commands; commands=(
)
local commands; commands=()
_describe -t commands 'innernet add-association commands' commands "$@"
}
(( $+functions[_innernet__add-cidr_commands] )) ||
_innernet__add-cidr_commands() {
local commands; commands=(
)
local commands; commands=()
_describe -t commands 'innernet add-cidr commands' commands "$@"
}
(( $+functions[_innernet__add-peer_commands] )) ||
_innernet__add-peer_commands() {
local commands; commands=(
)
local commands; commands=()
_describe -t commands 'innernet add-peer commands' commands "$@"
}
(( $+functions[_innernet__completions_commands] )) ||
_innernet__completions_commands() {
local commands; commands=(
)
local commands; commands=()
_describe -t commands 'innernet completions commands' commands "$@"
}
(( $+functions[_innernet__delete-association_commands] )) ||
_innernet__delete-association_commands() {
local commands; commands=(
)
local commands; commands=()
_describe -t commands 'innernet delete-association commands' commands "$@"
}
(( $+functions[_innernet__delete-cidr_commands] )) ||
_innernet__delete-cidr_commands() {
local commands; commands=(
)
local commands; commands=()
_describe -t commands 'innernet delete-cidr commands' commands "$@"
}
(( $+functions[_innernet__disable-peer_commands] )) ||
_innernet__disable-peer_commands() {
local commands; commands=(
)
local commands; commands=()
_describe -t commands 'innernet disable-peer commands' commands "$@"
}
(( $+functions[_innernet__down_commands] )) ||
_innernet__down_commands() {
local commands; commands=(
)
local commands; commands=()
_describe -t commands 'innernet down commands' commands "$@"
}
(( $+functions[_innernet__enable-peer_commands] )) ||
_innernet__enable-peer_commands() {
local commands; commands=(
)
local commands; commands=()
_describe -t commands 'innernet enable-peer commands' commands "$@"
}
(( $+functions[_innernet__fetch_commands] )) ||
_innernet__fetch_commands() {
local commands; commands=(
)
local commands; commands=()
_describe -t commands 'innernet fetch commands' commands "$@"
}
(( $+functions[_innernet__help_commands] )) ||
_innernet__help_commands() {
local commands; commands=(
)
local commands; commands=()
_describe -t commands 'innernet help commands' commands "$@"
}
(( $+functions[_innernet__install_commands] )) ||
_innernet__install_commands() {
local commands; commands=(
)
local commands; commands=()
_describe -t commands 'innernet install commands' commands "$@"
}
(( $+functions[_innernet__list_commands] )) ||
_innernet__list_commands() {
local commands; commands=(
)
_describe -t commands 'innernet list commands' commands "$@"
}
(( $+functions[_list_commands] )) ||
_list_commands() {
local commands; commands=(
)
_describe -t commands 'list commands' commands "$@"
}
(( $+functions[_innernet__list-associations_commands] )) ||
_innernet__list-associations_commands() {
local commands; commands=(
)
local commands; commands=()
_describe -t commands 'innernet list-associations commands' commands "$@"
}
(( $+functions[_innernet__list-cidrs_commands] )) ||
_innernet__list-cidrs_commands() {
local commands; commands=(
)
local commands; commands=()
_describe -t commands 'innernet list-cidrs commands' commands "$@"
}
(( $+functions[_innernet__override-endpoint_commands] )) ||
_innernet__override-endpoint_commands() {
local commands; commands=(
)
local commands; commands=()
_describe -t commands 'innernet override-endpoint commands' commands "$@"
}
(( $+functions[_innernet__redeem_commands] )) ||
_innernet__redeem_commands() {
local commands; commands=(
)
_describe -t commands 'innernet redeem commands' commands "$@"
}
(( $+functions[_redeem_commands] )) ||
_redeem_commands() {
local commands; commands=(
)
_describe -t commands 'redeem commands' commands "$@"
}
(( $+functions[_innernet__rename-peer_commands] )) ||
_innernet__rename-peer_commands() {
local commands; commands=(
)
local commands; commands=()
_describe -t commands 'innernet rename-peer commands' commands "$@"
}
(( $+functions[_innernet__set-listen-port_commands] )) ||
_innernet__set-listen-port_commands() {
local commands; commands=(
)
local commands; commands=()
_describe -t commands 'innernet set-listen-port commands' commands "$@"
}
(( $+functions[_innernet__show_commands] )) ||
_innernet__show_commands() {
local commands; commands=(
)
local commands; commands=()
_describe -t commands 'innernet show commands' commands "$@"
}
(( $+functions[_innernet__uninstall_commands] )) ||
_innernet__uninstall_commands() {
local commands; commands=(
)
local commands; commands=()
_describe -t commands 'innernet uninstall commands' commands "$@"
}
(( $+functions[_innernet__up_commands] )) ||
_innernet__up_commands() {
local commands; commands=(
)
local commands; commands=()
_describe -t commands 'innernet up commands' commands "$@"
}

View File

@ -1,6 +1,6 @@
[package]
name = "netlink-request"
version = "1.5.2"
version = "1.5.3-beta.1"
edition = "2021"
[target.'cfg(target_os = "linux")'.dependencies]

View File

@ -6,7 +6,7 @@ license = "MIT"
name = "server"
publish = false
readme = "README.md"
version = "1.5.2"
version = "1.5.3-beta.1"
[[bin]]
name = "innernet-server"

View File

@ -4,7 +4,7 @@ edition = "2021"
license = "MIT"
name = "shared"
publish = false
version = "1.5.2"
version = "1.5.3-beta.1"
[dependencies]
anyhow = "1"

View File

@ -7,7 +7,7 @@ license = "LGPL-2.1-or-later"
name = "wireguard-control"
readme = "README.md"
repository = "https://github.com/tonarino/innernet"
version = "1.5.2"
version = "1.5.3-beta.1"
[dependencies]
base64 = "0.13"