From 8d058c8d879bdeec64506f2d34c2c55e2975ec28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C4=9Bj=20Laitl?= Date: Wed, 14 Jun 2023 10:49:16 +0200 Subject: [PATCH] meta: release v1.6.0 (ran on Linux) (#270) * meta: release v1.6.0 * README: update release steps --- Cargo.lock | 10 +- README.md | 12 +- client/Cargo.toml | 2 +- doc/innernet-server.8 | 70 ++-- doc/innernet-server.8.gz | Bin 865 -> 844 bytes doc/innernet-server.completions.bash | 243 ++++++++++-- doc/innernet-server.completions.elvish | 81 ++-- doc/innernet-server.completions.fish | 41 +- doc/innernet-server.completions.powershell | 92 +++-- doc/innernet-server.completions.zsh | 200 ++++++++-- doc/innernet.8 | 72 ++-- doc/innernet.8.gz | Bin 1052 -> 1026 bytes doc/innernet.completions.bash | 440 ++++++++++++++++++--- doc/innernet.completions.elvish | 144 +++++-- doc/innernet.completions.fish | 74 ++-- doc/innernet.completions.powershell | 164 ++++++-- doc/innernet.completions.zsh | 326 ++++++++++++--- netlink-request/Cargo.toml | 2 +- server/Cargo.toml | 2 +- shared/Cargo.toml | 2 +- wireguard-control/Cargo.toml | 2 +- 21 files changed, 1546 insertions(+), 433 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 11c0140..f8309a7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -190,7 +190,7 @@ checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b" [[package]] name = "client" -version = "1.5.5" +version = "1.6.0" dependencies = [ "anyhow", "clap", @@ -751,7 +751,7 @@ dependencies = [ [[package]] name = "netlink-request" -version = "1.5.5" +version = "1.6.0" dependencies = [ "netlink-packet-core", "netlink-packet-generic", @@ -1050,7 +1050,7 @@ dependencies = [ [[package]] name = "server" -version = "1.5.5" +version = "1.6.0" dependencies = [ "anyhow", "bytes", @@ -1085,7 +1085,7 @@ dependencies = [ [[package]] name = "shared" -version = "1.5.5" +version = "1.6.0" dependencies = [ "anyhow", "atty", @@ -1591,7 +1591,7 @@ dependencies = [ [[package]] name = "wireguard-control" -version = "1.5.5" +version = "1.6.0" dependencies = [ "base64", "hex", diff --git a/README.md b/README.md index 8bd30fa..221caad 100644 --- a/README.md +++ b/README.md @@ -216,10 +216,10 @@ brew install tonarino/innernet/innernet ```sh # to install innernet: -cargo install --git https://github.com/tonarino/innernet --tag v1.5.5 client +cargo install --git https://github.com/tonarino/innernet --tag v1.6.0 client # to install innernet-server: -cargo install --git https://github.com/tonarino/innernet --tag v1.5.5 server +cargo install --git https://github.com/tonarino/innernet --tag v1.6.0 server ``` Note that you'll be responsible for updating manually. @@ -255,6 +255,8 @@ The resulting binary will be located at `./target/release/innernet` ### Releases -1. Run `cargo release [--dry-run] [minor|major|patch|...]` to automatically bump the crates appropriately. -2. Create a new git tag (ex. `v0.6.0`). -3. Push (with tags) to the repo. +Please run the release script from a Linux machine: generated shell completions depend on available wireguard backends and Mac doesn't support the `kernel` backend. + +1. Fetch and check-out the `main` branch. +2. Run `./release.sh [patch|major|minor|rc]` +3. Push the `main` branch and the created tag to the repo. diff --git a/client/Cargo.toml b/client/Cargo.toml index a5b5073..a82f39e 100644 --- a/client/Cargo.toml +++ b/client/Cargo.toml @@ -13,7 +13,7 @@ name = "client" publish = false readme = "README.md" repository = "https://github.com/tonarino/innernet" -version = "1.5.5" +version = "1.6.0" [[bin]] name = "innernet" diff --git a/doc/innernet-server.8 b/doc/innernet-server.8 index 79c2dff..8ce9d07 100644 --- a/doc/innernet-server.8 +++ b/doc/innernet-server.8 @@ -1,48 +1,19 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.2. -.TH INNERNET-SERVER "8" "September 2022" "innernet-server 1.5.5" "System Administration Utilities" +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. +.TH INNERNET-SERVER "8" "June 2023" "innernet-server 1.6.0" "System Administration Utilities" .SH NAME -innernet-server \- manual page for innernet-server 1.5.5 +innernet-server \- manual page for innernet-server 1.6.0 +.SH SYNOPSIS +.B innernet-server +[\fI\,OPTIONS\/\fR] \fI\,\/\fR .SH DESCRIPTION -innernet\-server 1.5.5 -Jake McGinty A server to coordinate innernet networks. -.SS "USAGE:" -.IP -innernet\-server [OPTIONS] -.SS "OPTIONS:" -.TP -\fB\-c\fR, \fB\-\-config\-dir\fR -[default: /etc/innernet\-server] -.TP -\fB\-d\fR, \fB\-\-data\-dir\fR -[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 -.TP -\fB\-\-backend\fR -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 -Specify the desired MTU for your interface (default: 1280) -.TP -\fB\-h\fR, \fB\-\-help\fR -Print help information -.TP -\fB\-V\fR, \fB\-\-version\fR -Print version information -.SS "SUBCOMMANDS:" +.SS "Commands:" .TP new Create a new network .TP uninstall -Permanently uninstall a created network, rendering it unusable. Use with -.IP -care +Permanently uninstall a created network, rendering it unusable. Use with care .TP serve Serve the coordinating server for an existing network @@ -70,3 +41,28 @@ Generate shell completion scripts .TP help Print this message or the help of the given subcommand(s) +.SH OPTIONS +.TP +\fB\-c\fR, \fB\-\-config\-dir\fR +[default: /etc/innernet\-server] +.TP +\fB\-d\fR, \fB\-\-data\-dir\fR +[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 +.TP +\fB\-\-backend\fR +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 +Specify the desired MTU for your interface (default: 1280) +.TP +\fB\-h\fR, \fB\-\-help\fR +Print help +.TP +\fB\-V\fR, \fB\-\-version\fR +Print version diff --git a/doc/innernet-server.8.gz b/doc/innernet-server.8.gz index 3062d2bee352d49f29dc393394d4cc0b6836b53a..296d82c1d4cd333f819928a5b9bcbd37501f8835 100644 GIT binary patch literal 844 zcmV-S1GD@eiwFo^e2HWL18HtG7)Zmvf_gl$!ARwolrz*=J?+kxfZ-`E7gZtwa5o{KVg2C6>yXNoxTCc9PF5dB`P$`A&12tRwy@DYo_3R{PEBDLmb8PJIL}po#p9# zP^7c(=?r?GdeHl;Q3zL;S089C6iFy_1B+&hhRA=!mlQAd*5Mk4d@Yo)jgDz`ooPOe6z-ytLC;_W-5ud!vr$4>$E1v=Xo!W%$vvE+#Ha$5A6b1cs5ly-mLMD< z8_O0FW4N~nJK8jM29Uc2_MAttgv0_^@d_(QXAd2V*!?CLPEC%wlZSlY+(3#iKcWjj@m6OtkGI; zSZc9vzuyL3hxJlyk;u)WI(X%+eHUEUdNatC^)(eoe(Xb7(uY>HSe64W426MQo8M%& z|0LP$YxKaeW{q^8;R0QCar9={djGML>F*FY|tKe`aYYn8&=_qhOJ!_ zY97z;yLx@QI9jTi18s!q-0Q}_chrxXG~n$i^ZTn$m+v~s)%mr0ulaj8xG@;>1pIyu Wqf7Z7akAl17YEs55?yV{kmO|f_eUvCoNl*$NFb4X9@6APg;@_qGnmen zFqw^#hreO@n56KK{1yKOkXYC=0~?g6nMDry0k&AygNjMG34i}19E3r*e1v2=jTh5+ z*-zuemv{la4?XCmSX-=e)G&BA7?43o;*n_k2KA22H{tv6y$d`T3WSJPLJDIkl~58^ zR+PdDG`%29A7L6z;^2FRtPfO5!%C>x24Sr<{BIJ^FpAURBAG9f+4M}5y$<`6y&z1A zv5@uvw-tW+mkgn4?t%!~K&zloN^>EpBj;>DzrE5ghWe4F&|9U^IQ~eLC-Wb3JtNY<>GKr?6yCbl5Ip}g8Wb6B^Uu5gW75F1vlw6BV*5^W#8E%KO=|eL9XOt}N zf+vn^)|B=mT%#?nzt8*JQSwVl&MfN)N6|9+fo{k2bt&>+QD%Lqvc6W06>>vN!PhO? zt!vm8p*4fqs-`3vA#f$p$?4ocH#&1RGa2AFOCB1nRjPzi&}1;&gpjiwOMaO+XT=Lj z?#sWAhM!~C&9ufstceM}3XS82Y07&HbTe!WhLEg5Doc~KS6v}{QI-K~ta2Y&Vqpnp zNc$v7wqv4XxzptVy7s&{VEGJBwK7KJB?dcIHfTGpc*G^>c^Tm;LSPn&EUhkw;kp7a;$Dq-5lnckbZ56g4im*ULEMmC5UEf z$lKvs!)vG$YNyhBjP_xF+6nJ$q>#okYV90}N20Xl0nS!J6duY?s4LJk zD%4Ik!ct^o7_~Npl|h=3-TK`sm`2a<^%$h?-?#9*qh5B$y>qRkhYP>aBje1M^)b$~ zevPPuh;ypO9i2{o7SDw*r^SqpHyi@%7Y&t=sqZs9MlvY!Ke zsfFODQeCTu$!PJ*a!JV+TiD272innernet-server" \ && ret=0 @@ -37,30 +37,30 @@ _innernet-server() { case $line[1] in (new) _arguments "${_arguments_options[@]}" \ -'--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: ' \ +'--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[Print help information]' \ -'--help[Print help information]' \ +'-h[Print help]' \ +'--help[Print help]' \ && ret=0 ;; (uninstall) _arguments "${_arguments_options[@]}" \ '--yes[Bypass confirmation]' \ -'-h[Print help information]' \ -'--help[Print help information]' \ +'-h[Print help]' \ +'--help[Print help]' \ ':interface:' \ && ret=0 ;; (serve) _arguments "${_arguments_options[@]}" \ '--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: 1280)]:MTU: ' \ +'--mtu=[Specify the desired MTU for your interface (default\: 1280)]:MTU: ' \ '--no-routing[Whether the routing should be done by innernet or is done by an external tool like e.g. babeld]' \ -'-h[Print help information]' \ -'--help[Print help information]' \ +'-h[Print help]' \ +'--help[Print help]' \ ':interface:' \ && ret=0 ;; @@ -69,27 +69,27 @@ _arguments "${_arguments_options[@]}" \ '--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: ' \ +'--admin=[Make new peer an admin?]:ADMIN:(true false)' \ '--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[Print help information]' \ -'--help[Print help information]' \ +'-h[Print help]' \ +'--help[Print help]' \ ':interface:' \ && ret=0 ;; (disable-peer) _arguments "${_arguments_options[@]}" \ -'-h[Print help information]' \ -'--help[Print help information]' \ +'-h[Print help]' \ +'--help[Print help]' \ ':interface:' \ && ret=0 ;; (enable-peer) _arguments "${_arguments_options[@]}" \ -'-h[Print help information]' \ -'--help[Print help information]' \ +'-h[Print help]' \ +'--help[Print help]' \ ':interface:' \ && ret=0 ;; @@ -98,8 +98,8 @@ _arguments "${_arguments_options[@]}" \ '--name=[Name of peer to rename]:NAME: ' \ '--new-name=[The new name of the peer]:NEW_NAME: ' \ '--yes[Bypass confirmation]' \ -'-h[Print help information]' \ -'--help[Print help information]' \ +'-h[Print help]' \ +'--help[Print help]' \ ':interface:' \ && ret=0 ;; @@ -109,8 +109,8 @@ _arguments "${_arguments_options[@]}" \ '--cidr=[The CIDR network (eg. '\''10.42.5.0/24'\'')]:CIDR: ' \ '--parent=[The CIDR parent name]:PARENT: ' \ '--yes[Bypass confirmation]' \ -'-h[Print help information]' \ -'--help[Print help information]' \ +'-h[Print help]' \ +'--help[Print help]' \ ':interface:' \ && ret=0 ;; @@ -118,22 +118,77 @@ _arguments "${_arguments_options[@]}" \ _arguments "${_arguments_options[@]}" \ '--name=[The CIDR name (eg. '\''engineers'\'')]:NAME: ' \ '--yes[Bypass confirmation]' \ -'-h[Print help information]' \ -'--help[Print help information]' \ +'-h[Print help]' \ +'--help[Print help]' \ ':interface:' \ && ret=0 ;; (completions) _arguments "${_arguments_options[@]}" \ -'-h[Print help information]' \ -'--help[Print help information]' \ +'-h[Print help]' \ +'--help[Print help]' \ ':shell:(bash elvish fish powershell zsh)' \ && ret=0 ;; (help) _arguments "${_arguments_options[@]}" \ -'*::subcommand -- The subcommand whose help message to display:' \ +":: :_innernet-server__help_commands" \ +"*::: :->help" \ && ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:innernet-server-help-command-$line[1]:" + case $line[1] in + (new) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(uninstall) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(serve) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(add-peer) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(disable-peer) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(enable-peer) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(rename-peer) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(add-cidr) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(delete-cidr) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(completions) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; + esac + ;; +esac ;; esac ;; @@ -162,55 +217,126 @@ _innernet-server__add-cidr_commands() { local commands; commands=() _describe -t commands 'innernet-server add-cidr commands' commands "$@" } +(( $+functions[_innernet-server__help__add-cidr_commands] )) || +_innernet-server__help__add-cidr_commands() { + local commands; commands=() + _describe -t commands 'innernet-server help add-cidr commands' commands "$@" +} (( $+functions[_innernet-server__add-peer_commands] )) || _innernet-server__add-peer_commands() { local commands; commands=() _describe -t commands 'innernet-server add-peer commands' commands "$@" } +(( $+functions[_innernet-server__help__add-peer_commands] )) || +_innernet-server__help__add-peer_commands() { + local commands; commands=() + _describe -t commands 'innernet-server help add-peer commands' commands "$@" +} (( $+functions[_innernet-server__completions_commands] )) || _innernet-server__completions_commands() { local commands; commands=() _describe -t commands 'innernet-server completions commands' commands "$@" } +(( $+functions[_innernet-server__help__completions_commands] )) || +_innernet-server__help__completions_commands() { + local commands; commands=() + _describe -t commands 'innernet-server help completions commands' commands "$@" +} (( $+functions[_innernet-server__delete-cidr_commands] )) || _innernet-server__delete-cidr_commands() { local commands; commands=() _describe -t commands 'innernet-server delete-cidr commands' commands "$@" } +(( $+functions[_innernet-server__help__delete-cidr_commands] )) || +_innernet-server__help__delete-cidr_commands() { + local commands; commands=() + _describe -t commands 'innernet-server help delete-cidr commands' commands "$@" +} (( $+functions[_innernet-server__disable-peer_commands] )) || _innernet-server__disable-peer_commands() { local commands; commands=() _describe -t commands 'innernet-server disable-peer commands' commands "$@" } +(( $+functions[_innernet-server__help__disable-peer_commands] )) || +_innernet-server__help__disable-peer_commands() { + local commands; commands=() + _describe -t commands 'innernet-server help disable-peer commands' commands "$@" +} (( $+functions[_innernet-server__enable-peer_commands] )) || _innernet-server__enable-peer_commands() { local commands; commands=() _describe -t commands 'innernet-server enable-peer commands' commands "$@" } +(( $+functions[_innernet-server__help__enable-peer_commands] )) || +_innernet-server__help__enable-peer_commands() { + local commands; commands=() + _describe -t commands 'innernet-server help enable-peer commands' commands "$@" +} (( $+functions[_innernet-server__help_commands] )) || _innernet-server__help_commands() { - local commands; 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' \ +'disable-peer:Disable an enabled peer' \ +'enable-peer:Enable a disabled peer' \ +'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 help commands' commands "$@" } +(( $+functions[_innernet-server__help__help_commands] )) || +_innernet-server__help__help_commands() { + local commands; commands=() + _describe -t commands 'innernet-server help help commands' commands "$@" +} +(( $+functions[_innernet-server__help__new_commands] )) || +_innernet-server__help__new_commands() { + local commands; commands=() + _describe -t commands 'innernet-server help new commands' commands "$@" +} (( $+functions[_innernet-server__new_commands] )) || _innernet-server__new_commands() { local commands; commands=() _describe -t commands 'innernet-server new commands' commands "$@" } +(( $+functions[_innernet-server__help__rename-peer_commands] )) || +_innernet-server__help__rename-peer_commands() { + local commands; commands=() + _describe -t commands 'innernet-server help rename-peer commands' commands "$@" +} (( $+functions[_innernet-server__rename-peer_commands] )) || _innernet-server__rename-peer_commands() { local commands; commands=() _describe -t commands 'innernet-server rename-peer commands' commands "$@" } +(( $+functions[_innernet-server__help__serve_commands] )) || +_innernet-server__help__serve_commands() { + local commands; commands=() + _describe -t commands 'innernet-server help serve commands' commands "$@" +} (( $+functions[_innernet-server__serve_commands] )) || _innernet-server__serve_commands() { local commands; commands=() _describe -t commands 'innernet-server serve commands' commands "$@" } +(( $+functions[_innernet-server__help__uninstall_commands] )) || +_innernet-server__help__uninstall_commands() { + local commands; commands=() + _describe -t commands 'innernet-server help uninstall commands' commands "$@" +} (( $+functions[_innernet-server__uninstall_commands] )) || _innernet-server__uninstall_commands() { local commands; commands=() _describe -t commands 'innernet-server uninstall commands' commands "$@" } -_innernet-server "$@" +if [ "$funcstack[1]" = "_innernet-server" ]; then + _innernet-server "$@" +else + compdef _innernet-server innernet-server +fi diff --git a/doc/innernet.8 b/doc/innernet.8 index a552535..14e482a 100644 --- a/doc/innernet.8 +++ b/doc/innernet.8 @@ -1,43 +1,13 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.2. -.TH INNERNET "8" "September 2022" "innernet 1.5.5" "System Administration Utilities" +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. +.TH INNERNET "8" "June 2023" "innernet 1.6.0" "System Administration Utilities" .SH NAME -innernet \- manual page for innernet 1.5.5 +innernet \- manual page for innernet 1.6.0 +.SH SYNOPSIS +.B innernet +[\fI\,OPTIONS\/\fR] [\fI\,COMMAND\/\fR] .SH DESCRIPTION -innernet 1.5.5 -Jake McGinty A client to manage innernet network interfaces. -.SS "USAGE:" -.IP -innernet [OPTIONS] [SUBCOMMAND] -.SS "OPTIONS:" -.TP -\fB\-v\fR, \fB\-\-verbose\fR -Verbose output, use \fB\-vv\fR for even higher verbositude -.TP -\fB\-c\fR, \fB\-\-config\-dir\fR -[default: /etc/innernet] -.TP -\fB\-d\fR, \fB\-\-data\-dir\fR -[default: /var/lib/innernet] -.TP -\fB\-\-no\-routing\fR -Whether the routing should be done by innernet or is done by an -external tool like e.g. babeld -.TP -\fB\-\-backend\fR -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 -Specify the desired MTU for your interface (default: 1280) -.TP -\fB\-h\fR, \fB\-\-help\fR -Print help information -.TP -\fB\-V\fR, \fB\-\-version\fR -Print version information -.SS "SUBCOMMANDS:" +.SS "Commands:" .TP install Install a new innernet config @@ -98,3 +68,31 @@ Generate shell completion scripts .TP help Print this message or the help of the given subcommand(s) +.SH OPTIONS +.TP +\fB\-v\fR, \fB\-\-verbose\fR... +Verbose output, use \fB\-vv\fR for even higher verbositude +.TP +\fB\-c\fR, \fB\-\-config\-dir\fR +[default: /etc/innernet] +.TP +\fB\-d\fR, \fB\-\-data\-dir\fR +[default: /var/lib/innernet] +.TP +\fB\-\-no\-routing\fR +Whether the routing should be done by innernet or is done by an +external tool like e.g. babeld +.TP +\fB\-\-backend\fR +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 +Specify the desired MTU for your interface (default: 1280) +.TP +\fB\-h\fR, \fB\-\-help\fR +Print help +.TP +\fB\-V\fR, \fB\-\-version\fR +Print version diff --git a/doc/innernet.8.gz b/doc/innernet.8.gz index c6483fb136fdcea32d1eecffc5cb0acdc9829225..6c27d85024b596bff3e2d338e1b736e41b922f71 100644 GIT binary patch literal 1026 zcmV+d1pWITiwFo^e2HWL18Htz0S3CVH|i{&i7{Q~Rz zIECBzpG)t)PO6aD^Y^fqGA`X1sWnXi)h8b&Hl z>2wu)Q8t0Rl&CCN?QA=+NmiKm6vX<0{5O`DC5yv9 zaMC>XFu7KR+Q}&EBUOobXUgVeXP-ylhjkn_8+ZG!;DSriN1IyzHGh2XcX! z!XZg2ptL(E>0&HYh$K&0_ecfWe8+Cxcc}9cXh5+$d>N@xr&u3PCqn!sV_sJ1qiQ2? zM-STDd5!-z^1#bB^{~-sD^&D5eyYif&8Ct2yYuTp&f%Ag8 zLDF^@s3AbDXMxFUS=pfBRvde%gB59DkH)wSKzqj- zbZpRtKX2uM;xNr753~Q;ocUeSZX6Gn6*t-VKx^h4{E;qLZ?r)oMNz~)g&XL`R*gM} zhR#99DfxAW&dN@1U1UL7+D2dxpAX@~X354v)(+sqbeY`7cmK@d)iwJnu;5K;-@^qB z{>5oTzx7aJ2t^x#_dv7Bdh!d*f!7zM+`I&pjg`*EH3dd3LkR5i4t;f8>RK|DLN_Hn zEl49y?*=_F-QIAE-gIQHSl0$tYu80j2pDZ6*zgUOVrY27^C#*E@Al1P`u9AUU9+^p zTo!}`pJk1A4X?>=5OkeGiH{&IKxs?uM3v|qIZE1Xys;FGp$W<@sTrD3Y8-yxvg8~0 zd_6;-mM5oJ(qmI;V&M<-mo9;Zd=@|q-x7W- w28*+^{O0Q21;Q#;t literal 1052 zcmV+%1mpW3iwFp#gf3$M18HtZYe~x=`6ff=|nNCOZ>1Y9+PaWu_ zSXkVxu!P?GUXKohA_9e$FdyTO&f{pv1NwX?lrWaag;ub%LJBL;bfP%DgK2*_j``$aOFMlZ~NvL}Q|J{HOz;p$)7{b99YrHGZjj{1;G zfy#o_?jCo=8Bc!)T|Uu)#d6JZG?aCkLT8!w$D=P4ZF1k-_Av9;r;qTEE^h|2$)rCW zJ_bN-a*)M+l&x>F?mk=3FTgKpgXKyaq@(CtSc0x>QP~TqXdM6!;q%8mD%gt6mMR^P z!d4s`?!3*NYqb`etjk5|2(AXR>1{IpXPC^dqX&*_R!RE>F45+fr(7NzD&D5z%(8}P z*kAO2qS>?ZQi|1UR9RQ)tXooILTy~C-?wO84)g={F_^8cBnb|IYlTjD=K{OVoAWVK z5&odQC{l*iT7neRXN)&7tk?=AZ(qD(`4cMc!@lVc{u)h(*HKzvF4n{Z-$jYzij{P4 zaCB;*!pD%TL1_yHsT1cw4noR^RhF_bC^5GLGxSPG%52YsWGkoVBQ#}sazIJSD6}zR zB{AAFS)n;ue49&Ckj9=BY-cMU^JKAX;&tWXXeee5Wbl$W>Z)vX3UALhf9QRB|E{6j zw%h5RwClrtNl5>|iGtX6{#iDlZ!e^3$lBoQgXd5u`sNj!gfEn_jB1yJ|5SN}ho-JU zsos-haEL~#+W7$l&bjTTsOWT$@xE0N-IPu{RT1hSb=#q^(xsf0ZD$ z)HCYMfu1s*g;*_CiIzco^@R`QJ?d=#D43HB`UVV+CKLiaygqlHW$2&9VEkf zh?BH#v9=HWhFs2OmwPap=qs(gC3J`j!$|b?wZpJ;^`HP~#hU=aLG3tF!4GOYe-S7% zM&}|Z&c{pduQ{R_Vh>1@vK2?2K^u5V5`WOI>zy|R%PVl2AX(ROprY(_ zX`_^6;PvB$6-?kQ&R^5BDg~!tX&e=rx*W~wqoBw0@H^Rwj0Hv-CFDx~6gN&Y+D}+}Fue WE25$gDt~L2mk'')' + cand add-peer 'Add a new peer' + cand rename-peer 'Rename a peer' + cand add-cidr 'Add a new CIDR' + cand delete-cidr 'Delete a CIDR' + cand list-cidrs 'List CIDRs' + cand disable-peer 'Disable an enabled peer' + cand enable-peer 'Enable a disabled peer' + cand add-association 'Add an association between CIDRs' + cand delete-association 'Delete an association between CIDRs' + cand list-associations 'List existing assocations between CIDRs' + 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 'Print this message or the help of the given subcommand(s)' + } + &'innernet;help;install'= { + } + &'innernet;help;show'= { + } + &'innernet;help;up'= { + } + &'innernet;help;fetch'= { + } + &'innernet;help;uninstall'= { + } + &'innernet;help;down'= { + } + &'innernet;help;add-peer'= { + } + &'innernet;help;rename-peer'= { + } + &'innernet;help;add-cidr'= { + } + &'innernet;help;delete-cidr'= { + } + &'innernet;help;list-cidrs'= { + } + &'innernet;help;disable-peer'= { + } + &'innernet;help;enable-peer'= { + } + &'innernet;help;add-association'= { + } + &'innernet;help;delete-association'= { + } + &'innernet;help;list-associations'= { + } + &'innernet;help;set-listen-port'= { + } + &'innernet;help;override-endpoint'= { + } + &'innernet;help;completions'= { + } + &'innernet;help;help'= { } ] $completions[$command] diff --git a/doc/innernet.completions.fish b/doc/innernet.completions.fish index fbac7ad..058fc68 100644 --- a/doc/innernet.completions.fish +++ b/doc/innernet.completions.fish @@ -1,11 +1,11 @@ -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" -s c -l config-dir -r -F +complete -c innernet -n "__fish_use_subcommand" -s d -l data-dir -r -F 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: 1280)' -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 'Print help' +complete -c innernet -n "__fish_use_subcommand" -s V -l version -d 'Print version' 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' @@ -26,7 +26,7 @@ complete -c innernet -n "__fish_use_subcommand" -f -a "set-listen-port" -d 'Set 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 '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 hosts-path -d 'The path to write hosts to' -r -F 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' @@ -34,63 +34,83 @@ complete -c innernet -n "__fish_seen_subcommand_from install" -l default-name -d 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 'Print help information' +complete -c innernet -n "__fish_seen_subcommand_from install" -s h -l help -d 'Print help' 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 'Print help information' +complete -c innernet -n "__fish_seen_subcommand_from show" -s h -l help -d 'Print help' 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 hosts-path -d 'The path to write hosts to' -r -F 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 '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 up" -s h -l help -d 'Print help' +complete -c innernet -n "__fish_seen_subcommand_from fetch" -l hosts-path -d 'The path to write hosts to' -r -F 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 'Print help information' +complete -c innernet -n "__fish_seen_subcommand_from fetch" -s h -l help -d 'Print help' complete -c innernet -n "__fish_seen_subcommand_from uninstall" -l yes -d 'Bypass confirmation' -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 uninstall" -s h -l help -d 'Print help' +complete -c innernet -n "__fish_seen_subcommand_from down" -s h -l help -d 'Print help' 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 admin -d 'Make new peer an admin?' -r -f -a "{true ,false }" 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 'Print help information' +complete -c innernet -n "__fish_seen_subcommand_from add-peer" -s h -l help -d 'Print help (see more with \'--help\')' 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 'Print help information' +complete -c innernet -n "__fish_seen_subcommand_from rename-peer" -s h -l help -d 'Print help (see more with \'--help\')' 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 'Print help information' +complete -c innernet -n "__fish_seen_subcommand_from add-cidr" -s h -l help -d 'Print help' 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 'Print help information' +complete -c innernet -n "__fish_seen_subcommand_from delete-cidr" -s h -l help -d 'Print help' 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 '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 list-cidrs" -s h -l help -d 'Print help' +complete -c innernet -n "__fish_seen_subcommand_from disable-peer" -s h -l help -d 'Print help' +complete -c innernet -n "__fish_seen_subcommand_from enable-peer" -s h -l help -d 'Print help' complete -c innernet -n "__fish_seen_subcommand_from add-association" -l yes -d 'Bypass confirmation' -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 add-association" -s h -l help -d 'Print help' complete -c innernet -n "__fish_seen_subcommand_from delete-association" -l yes -d 'Bypass confirmation' -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 delete-association" -s h -l help -d 'Print help' +complete -c innernet -n "__fish_seen_subcommand_from list-associations" -s h -l help -d 'Print help' 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 'Print help information' +complete -c innernet -n "__fish_seen_subcommand_from set-listen-port" -s h -l help -d 'Print help' 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 'Print help information' -complete -c innernet -n "__fish_seen_subcommand_from completions" -s h -l help -d 'Print help information' +complete -c innernet -n "__fish_seen_subcommand_from override-endpoint" -s h -l help -d 'Print help' +complete -c innernet -n "__fish_seen_subcommand_from completions" -s h -l help -d 'Print help' +complete -c innernet -n "__fish_seen_subcommand_from help; and not __fish_seen_subcommand_from install; and not __fish_seen_subcommand_from show; and not __fish_seen_subcommand_from up; and not __fish_seen_subcommand_from fetch; and not __fish_seen_subcommand_from uninstall; and not __fish_seen_subcommand_from down; and not __fish_seen_subcommand_from add-peer; and not __fish_seen_subcommand_from rename-peer; and not __fish_seen_subcommand_from add-cidr; and not __fish_seen_subcommand_from delete-cidr; and not __fish_seen_subcommand_from list-cidrs; and not __fish_seen_subcommand_from disable-peer; and not __fish_seen_subcommand_from enable-peer; and not __fish_seen_subcommand_from add-association; and not __fish_seen_subcommand_from delete-association; and not __fish_seen_subcommand_from list-associations; and not __fish_seen_subcommand_from set-listen-port; and not __fish_seen_subcommand_from override-endpoint; and not __fish_seen_subcommand_from completions; and not __fish_seen_subcommand_from help" -f -a "install" -d 'Install a new innernet config' +complete -c innernet -n "__fish_seen_subcommand_from help; and not __fish_seen_subcommand_from install; and not __fish_seen_subcommand_from show; and not __fish_seen_subcommand_from up; and not __fish_seen_subcommand_from fetch; and not __fish_seen_subcommand_from uninstall; and not __fish_seen_subcommand_from down; and not __fish_seen_subcommand_from add-peer; and not __fish_seen_subcommand_from rename-peer; and not __fish_seen_subcommand_from add-cidr; and not __fish_seen_subcommand_from delete-cidr; and not __fish_seen_subcommand_from list-cidrs; and not __fish_seen_subcommand_from disable-peer; and not __fish_seen_subcommand_from enable-peer; and not __fish_seen_subcommand_from add-association; and not __fish_seen_subcommand_from delete-association; and not __fish_seen_subcommand_from list-associations; and not __fish_seen_subcommand_from set-listen-port; and not __fish_seen_subcommand_from override-endpoint; and not __fish_seen_subcommand_from completions; and not __fish_seen_subcommand_from help" -f -a "show" -d 'Enumerate all innernet connections' +complete -c innernet -n "__fish_seen_subcommand_from help; and not __fish_seen_subcommand_from install; and not __fish_seen_subcommand_from show; and not __fish_seen_subcommand_from up; and not __fish_seen_subcommand_from fetch; and not __fish_seen_subcommand_from uninstall; and not __fish_seen_subcommand_from down; and not __fish_seen_subcommand_from add-peer; and not __fish_seen_subcommand_from rename-peer; and not __fish_seen_subcommand_from add-cidr; and not __fish_seen_subcommand_from delete-cidr; and not __fish_seen_subcommand_from list-cidrs; and not __fish_seen_subcommand_from disable-peer; and not __fish_seen_subcommand_from enable-peer; and not __fish_seen_subcommand_from add-association; and not __fish_seen_subcommand_from delete-association; and not __fish_seen_subcommand_from list-associations; and not __fish_seen_subcommand_from set-listen-port; and not __fish_seen_subcommand_from override-endpoint; and not __fish_seen_subcommand_from completions; and not __fish_seen_subcommand_from help" -f -a "up" -d 'Bring up your local interface, and update it with latest peer list' +complete -c innernet -n "__fish_seen_subcommand_from help; and not __fish_seen_subcommand_from install; and not __fish_seen_subcommand_from show; and not __fish_seen_subcommand_from up; and not __fish_seen_subcommand_from fetch; and not __fish_seen_subcommand_from uninstall; and not __fish_seen_subcommand_from down; and not __fish_seen_subcommand_from add-peer; and not __fish_seen_subcommand_from rename-peer; and not __fish_seen_subcommand_from add-cidr; and not __fish_seen_subcommand_from delete-cidr; and not __fish_seen_subcommand_from list-cidrs; and not __fish_seen_subcommand_from disable-peer; and not __fish_seen_subcommand_from enable-peer; and not __fish_seen_subcommand_from add-association; and not __fish_seen_subcommand_from delete-association; and not __fish_seen_subcommand_from list-associations; and not __fish_seen_subcommand_from set-listen-port; and not __fish_seen_subcommand_from override-endpoint; and not __fish_seen_subcommand_from completions; and not __fish_seen_subcommand_from help" -f -a "fetch" -d 'Fetch and update your local interface with the latest peer list' +complete -c innernet -n "__fish_seen_subcommand_from help; and not __fish_seen_subcommand_from install; and not __fish_seen_subcommand_from show; and not __fish_seen_subcommand_from up; and not __fish_seen_subcommand_from fetch; and not __fish_seen_subcommand_from uninstall; and not __fish_seen_subcommand_from down; and not __fish_seen_subcommand_from add-peer; and not __fish_seen_subcommand_from rename-peer; and not __fish_seen_subcommand_from add-cidr; and not __fish_seen_subcommand_from delete-cidr; and not __fish_seen_subcommand_from list-cidrs; and not __fish_seen_subcommand_from disable-peer; and not __fish_seen_subcommand_from enable-peer; and not __fish_seen_subcommand_from add-association; and not __fish_seen_subcommand_from delete-association; and not __fish_seen_subcommand_from list-associations; and not __fish_seen_subcommand_from set-listen-port; and not __fish_seen_subcommand_from override-endpoint; and not __fish_seen_subcommand_from completions; and not __fish_seen_subcommand_from help" -f -a "uninstall" -d 'Uninstall an innernet network' +complete -c innernet -n "__fish_seen_subcommand_from help; and not __fish_seen_subcommand_from install; and not __fish_seen_subcommand_from show; and not __fish_seen_subcommand_from up; and not __fish_seen_subcommand_from fetch; and not __fish_seen_subcommand_from uninstall; and not __fish_seen_subcommand_from down; and not __fish_seen_subcommand_from add-peer; and not __fish_seen_subcommand_from rename-peer; and not __fish_seen_subcommand_from add-cidr; and not __fish_seen_subcommand_from delete-cidr; and not __fish_seen_subcommand_from list-cidrs; and not __fish_seen_subcommand_from disable-peer; and not __fish_seen_subcommand_from enable-peer; and not __fish_seen_subcommand_from add-association; and not __fish_seen_subcommand_from delete-association; and not __fish_seen_subcommand_from list-associations; and not __fish_seen_subcommand_from set-listen-port; and not __fish_seen_subcommand_from override-endpoint; and not __fish_seen_subcommand_from completions; and not __fish_seen_subcommand_from help" -f -a "down" -d 'Bring down the interface (equivalent to \'wg-quick down \')' +complete -c innernet -n "__fish_seen_subcommand_from help; and not __fish_seen_subcommand_from install; and not __fish_seen_subcommand_from show; and not __fish_seen_subcommand_from up; and not __fish_seen_subcommand_from fetch; and not __fish_seen_subcommand_from uninstall; and not __fish_seen_subcommand_from down; and not __fish_seen_subcommand_from add-peer; and not __fish_seen_subcommand_from rename-peer; and not __fish_seen_subcommand_from add-cidr; and not __fish_seen_subcommand_from delete-cidr; and not __fish_seen_subcommand_from list-cidrs; and not __fish_seen_subcommand_from disable-peer; and not __fish_seen_subcommand_from enable-peer; and not __fish_seen_subcommand_from add-association; and not __fish_seen_subcommand_from delete-association; and not __fish_seen_subcommand_from list-associations; and not __fish_seen_subcommand_from set-listen-port; and not __fish_seen_subcommand_from override-endpoint; and not __fish_seen_subcommand_from completions; and not __fish_seen_subcommand_from help" -f -a "add-peer" -d 'Add a new peer' +complete -c innernet -n "__fish_seen_subcommand_from help; and not __fish_seen_subcommand_from install; and not __fish_seen_subcommand_from show; and not __fish_seen_subcommand_from up; and not __fish_seen_subcommand_from fetch; and not __fish_seen_subcommand_from uninstall; and not __fish_seen_subcommand_from down; and not __fish_seen_subcommand_from add-peer; and not __fish_seen_subcommand_from rename-peer; and not __fish_seen_subcommand_from add-cidr; and not __fish_seen_subcommand_from delete-cidr; and not __fish_seen_subcommand_from list-cidrs; and not __fish_seen_subcommand_from disable-peer; and not __fish_seen_subcommand_from enable-peer; and not __fish_seen_subcommand_from add-association; and not __fish_seen_subcommand_from delete-association; and not __fish_seen_subcommand_from list-associations; and not __fish_seen_subcommand_from set-listen-port; and not __fish_seen_subcommand_from override-endpoint; and not __fish_seen_subcommand_from completions; and not __fish_seen_subcommand_from help" -f -a "rename-peer" -d 'Rename a peer' +complete -c innernet -n "__fish_seen_subcommand_from help; and not __fish_seen_subcommand_from install; and not __fish_seen_subcommand_from show; and not __fish_seen_subcommand_from up; and not __fish_seen_subcommand_from fetch; and not __fish_seen_subcommand_from uninstall; and not __fish_seen_subcommand_from down; and not __fish_seen_subcommand_from add-peer; and not __fish_seen_subcommand_from rename-peer; and not __fish_seen_subcommand_from add-cidr; and not __fish_seen_subcommand_from delete-cidr; and not __fish_seen_subcommand_from list-cidrs; and not __fish_seen_subcommand_from disable-peer; and not __fish_seen_subcommand_from enable-peer; and not __fish_seen_subcommand_from add-association; and not __fish_seen_subcommand_from delete-association; and not __fish_seen_subcommand_from list-associations; and not __fish_seen_subcommand_from set-listen-port; and not __fish_seen_subcommand_from override-endpoint; and not __fish_seen_subcommand_from completions; and not __fish_seen_subcommand_from help" -f -a "add-cidr" -d 'Add a new CIDR' +complete -c innernet -n "__fish_seen_subcommand_from help; and not __fish_seen_subcommand_from install; and not __fish_seen_subcommand_from show; and not __fish_seen_subcommand_from up; and not __fish_seen_subcommand_from fetch; and not __fish_seen_subcommand_from uninstall; and not __fish_seen_subcommand_from down; and not __fish_seen_subcommand_from add-peer; and not __fish_seen_subcommand_from rename-peer; and not __fish_seen_subcommand_from add-cidr; and not __fish_seen_subcommand_from delete-cidr; and not __fish_seen_subcommand_from list-cidrs; and not __fish_seen_subcommand_from disable-peer; and not __fish_seen_subcommand_from enable-peer; and not __fish_seen_subcommand_from add-association; and not __fish_seen_subcommand_from delete-association; and not __fish_seen_subcommand_from list-associations; and not __fish_seen_subcommand_from set-listen-port; and not __fish_seen_subcommand_from override-endpoint; and not __fish_seen_subcommand_from completions; and not __fish_seen_subcommand_from help" -f -a "delete-cidr" -d 'Delete a CIDR' +complete -c innernet -n "__fish_seen_subcommand_from help; and not __fish_seen_subcommand_from install; and not __fish_seen_subcommand_from show; and not __fish_seen_subcommand_from up; and not __fish_seen_subcommand_from fetch; and not __fish_seen_subcommand_from uninstall; and not __fish_seen_subcommand_from down; and not __fish_seen_subcommand_from add-peer; and not __fish_seen_subcommand_from rename-peer; and not __fish_seen_subcommand_from add-cidr; and not __fish_seen_subcommand_from delete-cidr; and not __fish_seen_subcommand_from list-cidrs; and not __fish_seen_subcommand_from disable-peer; and not __fish_seen_subcommand_from enable-peer; and not __fish_seen_subcommand_from add-association; and not __fish_seen_subcommand_from delete-association; and not __fish_seen_subcommand_from list-associations; and not __fish_seen_subcommand_from set-listen-port; and not __fish_seen_subcommand_from override-endpoint; and not __fish_seen_subcommand_from completions; and not __fish_seen_subcommand_from help" -f -a "list-cidrs" -d 'List CIDRs' +complete -c innernet -n "__fish_seen_subcommand_from help; and not __fish_seen_subcommand_from install; and not __fish_seen_subcommand_from show; and not __fish_seen_subcommand_from up; and not __fish_seen_subcommand_from fetch; and not __fish_seen_subcommand_from uninstall; and not __fish_seen_subcommand_from down; and not __fish_seen_subcommand_from add-peer; and not __fish_seen_subcommand_from rename-peer; and not __fish_seen_subcommand_from add-cidr; and not __fish_seen_subcommand_from delete-cidr; and not __fish_seen_subcommand_from list-cidrs; and not __fish_seen_subcommand_from disable-peer; and not __fish_seen_subcommand_from enable-peer; and not __fish_seen_subcommand_from add-association; and not __fish_seen_subcommand_from delete-association; and not __fish_seen_subcommand_from list-associations; and not __fish_seen_subcommand_from set-listen-port; and not __fish_seen_subcommand_from override-endpoint; and not __fish_seen_subcommand_from completions; and not __fish_seen_subcommand_from help" -f -a "disable-peer" -d 'Disable an enabled peer' +complete -c innernet -n "__fish_seen_subcommand_from help; and not __fish_seen_subcommand_from install; and not __fish_seen_subcommand_from show; and not __fish_seen_subcommand_from up; and not __fish_seen_subcommand_from fetch; and not __fish_seen_subcommand_from uninstall; and not __fish_seen_subcommand_from down; and not __fish_seen_subcommand_from add-peer; and not __fish_seen_subcommand_from rename-peer; and not __fish_seen_subcommand_from add-cidr; and not __fish_seen_subcommand_from delete-cidr; and not __fish_seen_subcommand_from list-cidrs; and not __fish_seen_subcommand_from disable-peer; and not __fish_seen_subcommand_from enable-peer; and not __fish_seen_subcommand_from add-association; and not __fish_seen_subcommand_from delete-association; and not __fish_seen_subcommand_from list-associations; and not __fish_seen_subcommand_from set-listen-port; and not __fish_seen_subcommand_from override-endpoint; and not __fish_seen_subcommand_from completions; and not __fish_seen_subcommand_from help" -f -a "enable-peer" -d 'Enable a disabled peer' +complete -c innernet -n "__fish_seen_subcommand_from help; and not __fish_seen_subcommand_from install; and not __fish_seen_subcommand_from show; and not __fish_seen_subcommand_from up; and not __fish_seen_subcommand_from fetch; and not __fish_seen_subcommand_from uninstall; and not __fish_seen_subcommand_from down; and not __fish_seen_subcommand_from add-peer; and not __fish_seen_subcommand_from rename-peer; and not __fish_seen_subcommand_from add-cidr; and not __fish_seen_subcommand_from delete-cidr; and not __fish_seen_subcommand_from list-cidrs; and not __fish_seen_subcommand_from disable-peer; and not __fish_seen_subcommand_from enable-peer; and not __fish_seen_subcommand_from add-association; and not __fish_seen_subcommand_from delete-association; and not __fish_seen_subcommand_from list-associations; and not __fish_seen_subcommand_from set-listen-port; and not __fish_seen_subcommand_from override-endpoint; and not __fish_seen_subcommand_from completions; and not __fish_seen_subcommand_from help" -f -a "add-association" -d 'Add an association between CIDRs' +complete -c innernet -n "__fish_seen_subcommand_from help; and not __fish_seen_subcommand_from install; and not __fish_seen_subcommand_from show; and not __fish_seen_subcommand_from up; and not __fish_seen_subcommand_from fetch; and not __fish_seen_subcommand_from uninstall; and not __fish_seen_subcommand_from down; and not __fish_seen_subcommand_from add-peer; and not __fish_seen_subcommand_from rename-peer; and not __fish_seen_subcommand_from add-cidr; and not __fish_seen_subcommand_from delete-cidr; and not __fish_seen_subcommand_from list-cidrs; and not __fish_seen_subcommand_from disable-peer; and not __fish_seen_subcommand_from enable-peer; and not __fish_seen_subcommand_from add-association; and not __fish_seen_subcommand_from delete-association; and not __fish_seen_subcommand_from list-associations; and not __fish_seen_subcommand_from set-listen-port; and not __fish_seen_subcommand_from override-endpoint; and not __fish_seen_subcommand_from completions; and not __fish_seen_subcommand_from help" -f -a "delete-association" -d 'Delete an association between CIDRs' +complete -c innernet -n "__fish_seen_subcommand_from help; and not __fish_seen_subcommand_from install; and not __fish_seen_subcommand_from show; and not __fish_seen_subcommand_from up; and not __fish_seen_subcommand_from fetch; and not __fish_seen_subcommand_from uninstall; and not __fish_seen_subcommand_from down; and not __fish_seen_subcommand_from add-peer; and not __fish_seen_subcommand_from rename-peer; and not __fish_seen_subcommand_from add-cidr; and not __fish_seen_subcommand_from delete-cidr; and not __fish_seen_subcommand_from list-cidrs; and not __fish_seen_subcommand_from disable-peer; and not __fish_seen_subcommand_from enable-peer; and not __fish_seen_subcommand_from add-association; and not __fish_seen_subcommand_from delete-association; and not __fish_seen_subcommand_from list-associations; and not __fish_seen_subcommand_from set-listen-port; and not __fish_seen_subcommand_from override-endpoint; and not __fish_seen_subcommand_from completions; and not __fish_seen_subcommand_from help" -f -a "list-associations" -d 'List existing assocations between CIDRs' +complete -c innernet -n "__fish_seen_subcommand_from help; and not __fish_seen_subcommand_from install; and not __fish_seen_subcommand_from show; and not __fish_seen_subcommand_from up; and not __fish_seen_subcommand_from fetch; and not __fish_seen_subcommand_from uninstall; and not __fish_seen_subcommand_from down; and not __fish_seen_subcommand_from add-peer; and not __fish_seen_subcommand_from rename-peer; and not __fish_seen_subcommand_from add-cidr; and not __fish_seen_subcommand_from delete-cidr; and not __fish_seen_subcommand_from list-cidrs; and not __fish_seen_subcommand_from disable-peer; and not __fish_seen_subcommand_from enable-peer; and not __fish_seen_subcommand_from add-association; and not __fish_seen_subcommand_from delete-association; and not __fish_seen_subcommand_from list-associations; and not __fish_seen_subcommand_from set-listen-port; and not __fish_seen_subcommand_from override-endpoint; and not __fish_seen_subcommand_from completions; and not __fish_seen_subcommand_from help" -f -a "set-listen-port" -d 'Set the local listen port' +complete -c innernet -n "__fish_seen_subcommand_from help; and not __fish_seen_subcommand_from install; and not __fish_seen_subcommand_from show; and not __fish_seen_subcommand_from up; and not __fish_seen_subcommand_from fetch; and not __fish_seen_subcommand_from uninstall; and not __fish_seen_subcommand_from down; and not __fish_seen_subcommand_from add-peer; and not __fish_seen_subcommand_from rename-peer; and not __fish_seen_subcommand_from add-cidr; and not __fish_seen_subcommand_from delete-cidr; and not __fish_seen_subcommand_from list-cidrs; and not __fish_seen_subcommand_from disable-peer; and not __fish_seen_subcommand_from enable-peer; and not __fish_seen_subcommand_from add-association; and not __fish_seen_subcommand_from delete-association; and not __fish_seen_subcommand_from list-associations; and not __fish_seen_subcommand_from set-listen-port; and not __fish_seen_subcommand_from override-endpoint; and not __fish_seen_subcommand_from completions; and not __fish_seen_subcommand_from help" -f -a "override-endpoint" -d 'Override your external endpoint that the server sends to other peers' +complete -c innernet -n "__fish_seen_subcommand_from help; and not __fish_seen_subcommand_from install; and not __fish_seen_subcommand_from show; and not __fish_seen_subcommand_from up; and not __fish_seen_subcommand_from fetch; and not __fish_seen_subcommand_from uninstall; and not __fish_seen_subcommand_from down; and not __fish_seen_subcommand_from add-peer; and not __fish_seen_subcommand_from rename-peer; and not __fish_seen_subcommand_from add-cidr; and not __fish_seen_subcommand_from delete-cidr; and not __fish_seen_subcommand_from list-cidrs; and not __fish_seen_subcommand_from disable-peer; and not __fish_seen_subcommand_from enable-peer; and not __fish_seen_subcommand_from add-association; and not __fish_seen_subcommand_from delete-association; and not __fish_seen_subcommand_from list-associations; and not __fish_seen_subcommand_from set-listen-port; and not __fish_seen_subcommand_from override-endpoint; and not __fish_seen_subcommand_from completions; and not __fish_seen_subcommand_from help" -f -a "completions" -d 'Generate shell completion scripts' +complete -c innernet -n "__fish_seen_subcommand_from help; and not __fish_seen_subcommand_from install; and not __fish_seen_subcommand_from show; and not __fish_seen_subcommand_from up; and not __fish_seen_subcommand_from fetch; and not __fish_seen_subcommand_from uninstall; and not __fish_seen_subcommand_from down; and not __fish_seen_subcommand_from add-peer; and not __fish_seen_subcommand_from rename-peer; and not __fish_seen_subcommand_from add-cidr; and not __fish_seen_subcommand_from delete-cidr; and not __fish_seen_subcommand_from list-cidrs; and not __fish_seen_subcommand_from disable-peer; and not __fish_seen_subcommand_from enable-peer; and not __fish_seen_subcommand_from add-association; and not __fish_seen_subcommand_from delete-association; and not __fish_seen_subcommand_from list-associations; and not __fish_seen_subcommand_from set-listen-port; and not __fish_seen_subcommand_from override-endpoint; and not __fish_seen_subcommand_from completions; and not __fish_seen_subcommand_from help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' diff --git a/doc/innernet.completions.powershell b/doc/innernet.completions.powershell index c6e2de7..d8a6506 100644 --- a/doc/innernet.completions.powershell +++ b/doc/innernet.completions.powershell @@ -27,13 +27,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: 1280)') - [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, 'Print help') + [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help') + [CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Print version') + [CompletionResult]::new('--version', 'version', [CompletionResultType]::ParameterName, 'Print version') [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') @@ -66,8 +66,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, 'Print help information') - [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information') + [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help') + [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help') break } 'innernet;show' { @@ -75,8 +75,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, 'Print help information') - [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information') + [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help') + [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help') break } 'innernet;up' { @@ -88,8 +88,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, 'Print help information') - [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information') + [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help') + [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help') break } 'innernet;fetch' { @@ -98,19 +98,19 @@ 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, 'Print help information') - [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information') + [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help') + [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help') break } 'innernet;uninstall' { [CompletionResult]::new('--yes', 'yes', [CompletionResultType]::ParameterName, 'Bypass confirmation') - [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information') - [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information') + [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help') + [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help') break } 'innernet;down' { - [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information') - [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information') + [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help') + [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help') break } 'innernet;add-peer' { @@ -122,16 +122,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, 'Print help information') - [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information') + [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') + [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') 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, 'Print help information') - [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information') + [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') + [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') break } 'innernet;add-cidr' { @@ -139,49 +139,49 @@ 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, 'Print help information') - [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information') + [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help') + [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help') 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, 'Print help information') - [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information') + [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help') + [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help') 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, 'Print help information') - [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information') + [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help') + [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help') break } 'innernet;disable-peer' { - [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information') - [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information') + [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help') + [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help') break } 'innernet;enable-peer' { - [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information') - [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information') + [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help') + [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help') break } 'innernet;add-association' { [CompletionResult]::new('--yes', 'yes', [CompletionResultType]::ParameterName, 'Bypass confirmation') - [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information') - [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information') + [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help') + [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help') break } 'innernet;delete-association' { [CompletionResult]::new('--yes', 'yes', [CompletionResultType]::ParameterName, 'Bypass confirmation') - [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information') - [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information') + [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help') + [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help') break } 'innernet;list-associations' { - [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information') - [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information') + [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help') + [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help') break } 'innernet;set-listen-port' { @@ -190,8 +190,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, 'Print help information') - [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information') + [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help') + [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help') break } 'innernet;override-endpoint' { @@ -200,16 +200,96 @@ 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, 'Print help information') - [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information') + [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help') + [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help') break } 'innernet;completions' { - [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information') - [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information') + [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help') + [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help') break } 'innernet;help' { + [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') + [CompletionResult]::new('fetch', 'fetch', [CompletionResultType]::ParameterValue, 'Fetch and update your local interface with the latest peer list') + [CompletionResult]::new('uninstall', 'uninstall', [CompletionResultType]::ParameterValue, 'Uninstall an innernet network') + [CompletionResult]::new('down', 'down', [CompletionResultType]::ParameterValue, 'Bring down the interface (equivalent to ''wg-quick down '')') + [CompletionResult]::new('add-peer', 'add-peer', [CompletionResultType]::ParameterValue, 'Add a new peer') + [CompletionResult]::new('rename-peer', 'rename-peer', [CompletionResultType]::ParameterValue, 'Rename a peer') + [CompletionResult]::new('add-cidr', 'add-cidr', [CompletionResultType]::ParameterValue, 'Add a new CIDR') + [CompletionResult]::new('delete-cidr', 'delete-cidr', [CompletionResultType]::ParameterValue, 'Delete a CIDR') + [CompletionResult]::new('list-cidrs', 'list-cidrs', [CompletionResultType]::ParameterValue, 'List CIDRs') + [CompletionResult]::new('disable-peer', 'disable-peer', [CompletionResultType]::ParameterValue, 'Disable an enabled peer') + [CompletionResult]::new('enable-peer', 'enable-peer', [CompletionResultType]::ParameterValue, 'Enable a disabled peer') + [CompletionResult]::new('add-association', 'add-association', [CompletionResultType]::ParameterValue, 'Add an association between CIDRs') + [CompletionResult]::new('delete-association', 'delete-association', [CompletionResultType]::ParameterValue, 'Delete an association between CIDRs') + [CompletionResult]::new('list-associations', 'list-associations', [CompletionResultType]::ParameterValue, 'List existing assocations between CIDRs') + [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, 'Print this message or the help of the given subcommand(s)') + break + } + 'innernet;help;install' { + break + } + 'innernet;help;show' { + break + } + 'innernet;help;up' { + break + } + 'innernet;help;fetch' { + break + } + 'innernet;help;uninstall' { + break + } + 'innernet;help;down' { + break + } + 'innernet;help;add-peer' { + break + } + 'innernet;help;rename-peer' { + break + } + 'innernet;help;add-cidr' { + break + } + 'innernet;help;delete-cidr' { + break + } + 'innernet;help;list-cidrs' { + break + } + 'innernet;help;disable-peer' { + break + } + 'innernet;help;enable-peer' { + break + } + 'innernet;help;add-association' { + break + } + 'innernet;help;delete-association' { + break + } + 'innernet;help;list-associations' { + break + } + 'innernet;help;set-listen-port' { + break + } + 'innernet;help;override-endpoint' { + break + } + 'innernet;help;completions' { + break + } + 'innernet;help;help' { break } }) diff --git a/doc/innernet.completions.zsh b/doc/innernet.completions.zsh index 81a3c0d..4456043 100644 --- a/doc/innernet.completions.zsh +++ b/doc/innernet.completions.zsh @@ -15,19 +15,19 @@ _innernet() { local context curcontext="$curcontext" state line _arguments "${_arguments_options[@]}" \ -'-c+[]:CONFIG_DIR: ' \ -'--config-dir=[]:CONFIG_DIR: ' \ -'-d+[]:DATA_DIR: ' \ -'--data-dir=[]:DATA_DIR: ' \ +'-c+[]:CONFIG_DIR:_files' \ +'--config-dir=[]:CONFIG_DIR:_files' \ +'-d+[]:DATA_DIR:_files' \ +'--data-dir=[]:DATA_DIR:_files' \ '--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: 1280)]:MTU: ' \ -'-h[Print help information]' \ -'--help[Print help information]' \ -'-V[Print version information]' \ -'--version[Print version information]' \ +'--mtu=[Specify the desired MTU for your interface (default\: 1280)]:MTU: ' \ '*-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[Print help]' \ +'--help[Print help]' \ +'-V[Print version]' \ +'--version[Print version]' \ ":: :_innernet_commands" \ "*::: :->innernet" \ && ret=0 @@ -39,7 +39,7 @@ _innernet() { case $line[1] in (install) _arguments "${_arguments_options[@]}" \ -'--hosts-path=[The path to write hosts to]:HOSTS_PATH: ' \ +'--hosts-path=[The path to write hosts to]:HOSTS_PATH:_files' \ '(--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]' \ @@ -48,9 +48,9 @@ _arguments "${_arguments_options[@]}" \ '--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[Print help information]' \ -'--help[Print help information]' \ -':invite -- Path to the invitation file:' \ +'-h[Print help]' \ +'--help[Print help]' \ +':invite -- Path to the invitation file:_files' \ && ret=0 ;; (show) @@ -59,50 +59,50 @@ _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[Print help information]' \ -'--help[Print help information]' \ +'-h[Print help]' \ +'--help[Print help]' \ '::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]:INTERVAL: ' \ -'--hosts-path=[The path to write hosts to]:HOSTS_PATH: ' \ +'--hosts-path=[The path to write hosts to]:HOSTS_PATH:_files' \ '*--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[Print help information]' \ -'--help[Print help information]' \ +'-h[Print help]' \ +'--help[Print help]' \ '::interface:' \ && ret=0 ;; (fetch) _arguments "${_arguments_options[@]}" \ -'--hosts-path=[The path to write hosts to]:HOSTS_PATH: ' \ +'--hosts-path=[The path to write hosts to]:HOSTS_PATH:_files' \ '*--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[Print help information]' \ -'--help[Print help information]' \ +'-h[Print help]' \ +'--help[Print help]' \ ':interface:' \ && ret=0 ;; (uninstall) _arguments "${_arguments_options[@]}" \ '--yes[Bypass confirmation]' \ -'-h[Print help information]' \ -'--help[Print help information]' \ +'-h[Print help]' \ +'--help[Print help]' \ ':interface:' \ && ret=0 ;; (down) _arguments "${_arguments_options[@]}" \ -'-h[Print help information]' \ -'--help[Print help information]' \ +'-h[Print help]' \ +'--help[Print help]' \ ':interface:' \ && ret=0 ;; @@ -111,13 +111,13 @@ _arguments "${_arguments_options[@]}" \ '--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: ' \ +'--admin=[Make new peer an admin?]:ADMIN:(true false)' \ '--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[Print help information]' \ -'--help[Print help information]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ ':interface:' \ && ret=0 ;; @@ -126,8 +126,8 @@ _arguments "${_arguments_options[@]}" \ '--name=[Name of peer to rename]:NAME: ' \ '--new-name=[The new name of the peer]:NEW_NAME: ' \ '--yes[Bypass confirmation]' \ -'-h[Print help information]' \ -'--help[Print help information]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ ':interface:' \ && ret=0 ;; @@ -137,8 +137,8 @@ _arguments "${_arguments_options[@]}" \ '--cidr=[The CIDR network (eg. '\''10.42.5.0/24'\'')]:CIDR: ' \ '--parent=[The CIDR parent name]:PARENT: ' \ '--yes[Bypass confirmation]' \ -'-h[Print help information]' \ -'--help[Print help information]' \ +'-h[Print help]' \ +'--help[Print help]' \ ':interface:' \ && ret=0 ;; @@ -146,8 +146,8 @@ _arguments "${_arguments_options[@]}" \ _arguments "${_arguments_options[@]}" \ '--name=[The CIDR name (eg. '\''engineers'\'')]:NAME: ' \ '--yes[Bypass confirmation]' \ -'-h[Print help information]' \ -'--help[Print help information]' \ +'-h[Print help]' \ +'--help[Print help]' \ ':interface:' \ && ret=0 ;; @@ -155,30 +155,30 @@ _arguments "${_arguments_options[@]}" \ _arguments "${_arguments_options[@]}" \ '-t[Display CIDRs in tree format]' \ '--tree[Display CIDRs in tree format]' \ -'-h[Print help information]' \ -'--help[Print help information]' \ +'-h[Print help]' \ +'--help[Print help]' \ ':interface:' \ && ret=0 ;; (disable-peer) _arguments "${_arguments_options[@]}" \ -'-h[Print help information]' \ -'--help[Print help information]' \ +'-h[Print help]' \ +'--help[Print help]' \ ':interface:' \ && ret=0 ;; (enable-peer) _arguments "${_arguments_options[@]}" \ -'-h[Print help information]' \ -'--help[Print help information]' \ +'-h[Print help]' \ +'--help[Print help]' \ ':interface:' \ && ret=0 ;; (add-association) _arguments "${_arguments_options[@]}" \ '--yes[Bypass confirmation]' \ -'-h[Print help information]' \ -'--help[Print help information]' \ +'-h[Print help]' \ +'--help[Print help]' \ ':interface:' \ '::cidr1 -- The first cidr to associate:' \ '::cidr2 -- The second cidr to associate:' \ @@ -187,8 +187,8 @@ _arguments "${_arguments_options[@]}" \ (delete-association) _arguments "${_arguments_options[@]}" \ '--yes[Bypass confirmation]' \ -'-h[Print help information]' \ -'--help[Print help information]' \ +'-h[Print help]' \ +'--help[Print help]' \ ':interface:' \ '::cidr1 -- The first cidr to associate:' \ '::cidr2 -- The second cidr to associate:' \ @@ -196,8 +196,8 @@ _arguments "${_arguments_options[@]}" \ ;; (list-associations) _arguments "${_arguments_options[@]}" \ -'-h[Print help information]' \ -'--help[Print help information]' \ +'-h[Print help]' \ +'--help[Print help]' \ ':interface:' \ && ret=0 ;; @@ -208,8 +208,8 @@ _arguments "${_arguments_options[@]}" \ '(-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[Print help information]' \ -'--help[Print help information]' \ +'-h[Print help]' \ +'--help[Print help]' \ ':interface:' \ && ret=0 ;; @@ -220,22 +220,113 @@ _arguments "${_arguments_options[@]}" \ '(-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[Print help information]' \ -'--help[Print help information]' \ +'-h[Print help]' \ +'--help[Print help]' \ ':interface:' \ && ret=0 ;; (completions) _arguments "${_arguments_options[@]}" \ -'-h[Print help information]' \ -'--help[Print help information]' \ +'-h[Print help]' \ +'--help[Print help]' \ ':shell:(bash elvish fish powershell zsh)' \ && ret=0 ;; (help) _arguments "${_arguments_options[@]}" \ -'*::subcommand -- The subcommand whose help message to display:' \ +":: :_innernet__help_commands" \ +"*::: :->help" \ && ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:innernet-help-command-$line[1]:" + case $line[1] in + (install) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(show) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(up) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(fetch) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(uninstall) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(down) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(add-peer) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(rename-peer) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(add-cidr) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(delete-cidr) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(list-cidrs) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(disable-peer) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(enable-peer) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(add-association) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(delete-association) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(list-associations) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(set-listen-port) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(override-endpoint) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(completions) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; + esac + ;; +esac ;; esac ;; @@ -273,100 +364,225 @@ _innernet__add-association_commands() { local commands; commands=() _describe -t commands 'innernet add-association commands' commands "$@" } +(( $+functions[_innernet__help__add-association_commands] )) || +_innernet__help__add-association_commands() { + local commands; commands=() + _describe -t commands 'innernet help add-association commands' commands "$@" +} (( $+functions[_innernet__add-cidr_commands] )) || _innernet__add-cidr_commands() { local commands; commands=() _describe -t commands 'innernet add-cidr commands' commands "$@" } +(( $+functions[_innernet__help__add-cidr_commands] )) || +_innernet__help__add-cidr_commands() { + local commands; commands=() + _describe -t commands 'innernet help add-cidr commands' commands "$@" +} (( $+functions[_innernet__add-peer_commands] )) || _innernet__add-peer_commands() { local commands; commands=() _describe -t commands 'innernet add-peer commands' commands "$@" } +(( $+functions[_innernet__help__add-peer_commands] )) || +_innernet__help__add-peer_commands() { + local commands; commands=() + _describe -t commands 'innernet help add-peer commands' commands "$@" +} (( $+functions[_innernet__completions_commands] )) || _innernet__completions_commands() { local commands; commands=() _describe -t commands 'innernet completions commands' commands "$@" } +(( $+functions[_innernet__help__completions_commands] )) || +_innernet__help__completions_commands() { + local commands; commands=() + _describe -t commands 'innernet help completions commands' commands "$@" +} (( $+functions[_innernet__delete-association_commands] )) || _innernet__delete-association_commands() { local commands; commands=() _describe -t commands 'innernet delete-association commands' commands "$@" } +(( $+functions[_innernet__help__delete-association_commands] )) || +_innernet__help__delete-association_commands() { + local commands; commands=() + _describe -t commands 'innernet help delete-association commands' commands "$@" +} (( $+functions[_innernet__delete-cidr_commands] )) || _innernet__delete-cidr_commands() { local commands; commands=() _describe -t commands 'innernet delete-cidr commands' commands "$@" } +(( $+functions[_innernet__help__delete-cidr_commands] )) || +_innernet__help__delete-cidr_commands() { + local commands; commands=() + _describe -t commands 'innernet help delete-cidr commands' commands "$@" +} (( $+functions[_innernet__disable-peer_commands] )) || _innernet__disable-peer_commands() { local commands; commands=() _describe -t commands 'innernet disable-peer commands' commands "$@" } +(( $+functions[_innernet__help__disable-peer_commands] )) || +_innernet__help__disable-peer_commands() { + local commands; commands=() + _describe -t commands 'innernet help disable-peer commands' commands "$@" +} (( $+functions[_innernet__down_commands] )) || _innernet__down_commands() { local commands; commands=() _describe -t commands 'innernet down commands' commands "$@" } +(( $+functions[_innernet__help__down_commands] )) || +_innernet__help__down_commands() { + local commands; commands=() + _describe -t commands 'innernet help down commands' commands "$@" +} (( $+functions[_innernet__enable-peer_commands] )) || _innernet__enable-peer_commands() { local commands; commands=() _describe -t commands 'innernet enable-peer commands' commands "$@" } +(( $+functions[_innernet__help__enable-peer_commands] )) || +_innernet__help__enable-peer_commands() { + local commands; commands=() + _describe -t commands 'innernet help enable-peer commands' commands "$@" +} (( $+functions[_innernet__fetch_commands] )) || _innernet__fetch_commands() { local commands; commands=() _describe -t commands 'innernet fetch commands' commands "$@" } +(( $+functions[_innernet__help__fetch_commands] )) || +_innernet__help__fetch_commands() { + local commands; commands=() + _describe -t commands 'innernet help fetch commands' commands "$@" +} (( $+functions[_innernet__help_commands] )) || _innernet__help_commands() { - local commands; 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 '\'')' \ +'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 help commands' commands "$@" } +(( $+functions[_innernet__help__help_commands] )) || +_innernet__help__help_commands() { + local commands; commands=() + _describe -t commands 'innernet help help commands' commands "$@" +} +(( $+functions[_innernet__help__install_commands] )) || +_innernet__help__install_commands() { + local commands; commands=() + _describe -t commands 'innernet help install commands' commands "$@" +} (( $+functions[_innernet__install_commands] )) || _innernet__install_commands() { local commands; commands=() _describe -t commands 'innernet install commands' commands "$@" } +(( $+functions[_innernet__help__list-associations_commands] )) || +_innernet__help__list-associations_commands() { + local commands; commands=() + _describe -t commands 'innernet help list-associations commands' commands "$@" +} (( $+functions[_innernet__list-associations_commands] )) || _innernet__list-associations_commands() { local commands; commands=() _describe -t commands 'innernet list-associations commands' commands "$@" } +(( $+functions[_innernet__help__list-cidrs_commands] )) || +_innernet__help__list-cidrs_commands() { + local commands; commands=() + _describe -t commands 'innernet help list-cidrs commands' commands "$@" +} (( $+functions[_innernet__list-cidrs_commands] )) || _innernet__list-cidrs_commands() { local commands; commands=() _describe -t commands 'innernet list-cidrs commands' commands "$@" } +(( $+functions[_innernet__help__override-endpoint_commands] )) || +_innernet__help__override-endpoint_commands() { + local commands; commands=() + _describe -t commands 'innernet help override-endpoint commands' commands "$@" +} (( $+functions[_innernet__override-endpoint_commands] )) || _innernet__override-endpoint_commands() { local commands; commands=() _describe -t commands 'innernet override-endpoint commands' commands "$@" } +(( $+functions[_innernet__help__rename-peer_commands] )) || +_innernet__help__rename-peer_commands() { + local commands; commands=() + _describe -t commands 'innernet help rename-peer commands' commands "$@" +} (( $+functions[_innernet__rename-peer_commands] )) || _innernet__rename-peer_commands() { local commands; commands=() _describe -t commands 'innernet rename-peer commands' commands "$@" } +(( $+functions[_innernet__help__set-listen-port_commands] )) || +_innernet__help__set-listen-port_commands() { + local commands; commands=() + _describe -t commands 'innernet help set-listen-port commands' commands "$@" +} (( $+functions[_innernet__set-listen-port_commands] )) || _innernet__set-listen-port_commands() { local commands; commands=() _describe -t commands 'innernet set-listen-port commands' commands "$@" } +(( $+functions[_innernet__help__show_commands] )) || +_innernet__help__show_commands() { + local commands; commands=() + _describe -t commands 'innernet help show commands' commands "$@" +} (( $+functions[_innernet__show_commands] )) || _innernet__show_commands() { local commands; commands=() _describe -t commands 'innernet show commands' commands "$@" } +(( $+functions[_innernet__help__uninstall_commands] )) || +_innernet__help__uninstall_commands() { + local commands; commands=() + _describe -t commands 'innernet help uninstall commands' commands "$@" +} (( $+functions[_innernet__uninstall_commands] )) || _innernet__uninstall_commands() { local commands; commands=() _describe -t commands 'innernet uninstall commands' commands "$@" } +(( $+functions[_innernet__help__up_commands] )) || +_innernet__help__up_commands() { + local commands; commands=() + _describe -t commands 'innernet help up commands' commands "$@" +} (( $+functions[_innernet__up_commands] )) || _innernet__up_commands() { local commands; commands=() _describe -t commands 'innernet up commands' commands "$@" } -_innernet "$@" +if [ "$funcstack[1]" = "_innernet" ]; then + _innernet "$@" +else + compdef _innernet innernet +fi diff --git a/netlink-request/Cargo.toml b/netlink-request/Cargo.toml index 728a3d9..938bc22 100644 --- a/netlink-request/Cargo.toml +++ b/netlink-request/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "netlink-request" -version = "1.5.5" +version = "1.6.0" edition = "2021" [target.'cfg(target_os = "linux")'.dependencies] diff --git a/server/Cargo.toml b/server/Cargo.toml index 87db785..5215913 100644 --- a/server/Cargo.toml +++ b/server/Cargo.toml @@ -13,7 +13,7 @@ name = "server" publish = false readme = "README.md" repository = "https://github.com/tonarino/innernet" -version = "1.5.5" +version = "1.6.0" [[bin]] name = "innernet-server" diff --git a/shared/Cargo.toml b/shared/Cargo.toml index 744a969..2e85912 100644 --- a/shared/Cargo.toml +++ b/shared/Cargo.toml @@ -9,7 +9,7 @@ edition = "2021" license = "MIT" name = "shared" publish = false -version = "1.5.5" +version = "1.6.0" [dependencies] anyhow = "1" diff --git a/wireguard-control/Cargo.toml b/wireguard-control/Cargo.toml index 846ba91..fa9b1d6 100644 --- a/wireguard-control/Cargo.toml +++ b/wireguard-control/Cargo.toml @@ -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.5" +version = "1.6.0" [dependencies] base64 = "0.13.1"