diff --git a/.github/workflows/release-artifacts.yml b/.github/workflows/release-artifacts.yml index aa62c2a..0f44a10 100644 --- a/.github/workflows/release-artifacts.yml +++ b/.github/workflows/release-artifacts.yml @@ -75,6 +75,7 @@ jobs: build-rpm: name: 'Build RPM packages' + continue-on-error: true runs-on: ubuntu-latest strategy: matrix: diff --git a/Cargo.lock b/Cargo.lock index ea5792a..636906b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -151,7 +151,7 @@ dependencies = [ [[package]] name = "client" -version = "1.3.0" +version = "1.3.1" dependencies = [ "colored", "dialoguer", @@ -895,7 +895,7 @@ dependencies = [ [[package]] name = "server" -version = "1.3.0" +version = "1.3.1" dependencies = [ "anyhow", "bytes", @@ -928,7 +928,7 @@ dependencies = [ [[package]] name = "shared" -version = "1.3.0" +version = "1.3.1" dependencies = [ "colored", "dialoguer", @@ -1280,7 +1280,7 @@ checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" [[package]] name = "wgctrl" -version = "1.3.0" +version = "1.3.1" dependencies = [ "base64", "hex", @@ -1293,7 +1293,7 @@ dependencies = [ [[package]] name = "wgctrl-sys" -version = "1.3.0" +version = "1.3.1" dependencies = [ "bindgen", "cc", diff --git a/README.md b/README.md index 351977d..ba6f1c7 100644 --- a/README.md +++ b/README.md @@ -204,10 +204,10 @@ brew install tonarino/innernet/innernet ```sh # to install innernet: -cargo install --git https://github.com/tonarino/innernet --tag v1.3.0 client +cargo install --git https://github.com/tonarino/innernet --tag v1.3.1 client # to install innernet-server: -cargo install --git https://github.com/tonarino/innernet --tag v1.3.0 server +cargo install --git https://github.com/tonarino/innernet --tag v1.3.1 server ``` Note that you'll be responsible for updating manually. diff --git a/client/Cargo.toml b/client/Cargo.toml index 3d8ba73..7d256d3 100644 --- a/client/Cargo.toml +++ b/client/Cargo.toml @@ -7,7 +7,7 @@ license = "MIT" name = "client" publish = false repository = "https://github.com/tonarino/innernet" -version = "1.3.0" +version = "1.3.1" [[bin]] name = "innernet" diff --git a/doc/innernet-server.8 b/doc/innernet-server.8 index 5febb78..7a252e8 100644 --- a/doc/innernet-server.8 +++ b/doc/innernet-server.8 @@ -1,47 +1,53 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.48.3. -.TH INNERNET-SERVER "8" "May 2021" "innernet-server 1.3.0" "System Administration Utilities" +.TH INNERNET-SERVER "8" "June 2021" "innernet-server 1.3.1" "System Administration Utilities" .SH NAME -innernet-server \- manual page for innernet-server 1.3.0 +innernet-server \- manual page for innernet-server 1.3.1 .SH DESCRIPTION -innernet\-server 1.3.0 +innernet\-server 1.3.1 A server to coordinate innernet networks. .SS "USAGE:" .IP -innernet\-server [FLAGS] [OPTIONS] -.SS "FLAGS:" +innernet\-server [OPTIONS] +.SS "OPTIONS:" +.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\-h\fR, \fB\-\-help\fR Prints help information .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\-V\fR, \fB\-\-version\fR Prints version information -.SS "OPTIONS:" -.TP -\fB\-\-backend\fR -Specify a WireGuard backend to use. If not set, innernet will auto\-select based on -availability [default: userspace] [possible values: userspace] .SS "SUBCOMMANDS:" .TP -add\-cidr -Add a new CIDR to an existing network -.TP -add\-peer -Add a peer to an existing network -.TP -delete\-cidr -Delete a CIDR -.TP -help -Prints this message or the help of the given subcommand(s) -.TP new Create a new network .TP +uninstall +Permanently uninstall a created network, rendering it unusable. Use with care +.TP serve Serve the coordinating server for an existing network .TP -uninstall -Permanently uninstall a created network, rendering it unusable. Use with care +add\-peer +Add a peer to an existing network +.TP +rename\-peer +Rename an existing peer +.TP +add\-cidr +Add a new CIDR to an existing network +.TP +delete\-cidr +Delete a CIDR +.TP +completions +Generate shell completion scripts +.TP +help +Prints this message or the help of the given subcommand(s) diff --git a/doc/innernet-server.8.gz b/doc/innernet-server.8.gz index eabec28..182a915 100644 Binary files a/doc/innernet-server.8.gz and b/doc/innernet-server.8.gz differ diff --git a/doc/innernet-server.completions.bash b/doc/innernet-server.completions.bash index a5dfdfd..2e85867 100644 --- a/doc/innernet-server.completions.bash +++ b/doc/innernet-server.completions.bash @@ -34,6 +34,9 @@ _innernet-server() { new) cmd+="__new" ;; + rename-peer) + cmd+="__rename__peer" + ;; serve) cmd+="__serve" ;; @@ -47,7 +50,7 @@ _innernet-server() { case "${cmd}" in innernet-server) - opts=" -h -V --no-routing --help --version --backend new uninstall serve add-peer add-cidr delete-cidr completions help init init" + opts=" -h -V --no-routing --help --version --backend new uninstall serve add-peer rename-peer add-cidr delete-cidr completions help init init" if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -243,6 +246,29 @@ _innernet-server() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; + innernet__server__rename__peer) + opts=" -h -V --yes --help --version --name --new-name " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --name) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --new-name) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; innernet__server__serve) opts=" -h -V --no-routing --help --version --backend " if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then diff --git a/doc/innernet-server.completions.elvish b/doc/innernet-server.completions.elvish index 39c290b..15cf16e 100644 --- a/doc/innernet-server.completions.elvish +++ b/doc/innernet-server.completions.elvish @@ -25,6 +25,7 @@ edit:completion:arg-completer[innernet-server] = [@words]{ cand uninstall 'Permanently uninstall a created network, rendering it unusable. Use with care' cand serve 'Serve the coordinating server for an existing network' cand add-peer 'Add a peer to an existing network' + cand rename-peer 'Rename an existing peer' cand add-cidr 'Add a new CIDR to an existing network' cand delete-cidr 'Delete a CIDR' cand completions 'Generate shell completion scripts' @@ -69,6 +70,15 @@ edit:completion:arg-completer[innernet-server] = [@words]{ cand -V 'Prints version information' cand --version 'Prints version information' } + &'innernet-server;rename-peer'= { + cand --name 'Name of peer to rename' + cand --new-name 'The new name of the peer' + cand --yes 'Bypass confirmation' + cand -h 'Prints help information' + cand --help 'Prints help information' + cand -V 'Prints version information' + cand --version 'Prints version information' + } &'innernet-server;add-cidr'= { cand --name 'The CIDR name (eg. "engineers")' cand --cidr 'The CIDR network (eg. "10.42.5.0/24")' diff --git a/doc/innernet-server.completions.fish b/doc/innernet-server.completions.fish index c6f6395..98a50fe 100644 --- a/doc/innernet-server.completions.fish +++ b/doc/innernet-server.completions.fish @@ -6,6 +6,7 @@ complete -c innernet-server -n "__fish_use_subcommand" -f -a "new" -d 'Create a complete -c innernet-server -n "__fish_use_subcommand" -f -a "uninstall" -d 'Permanently uninstall a created network, rendering it unusable. Use with care' complete -c innernet-server -n "__fish_use_subcommand" -f -a "serve" -d 'Serve the coordinating server for an existing network' complete -c innernet-server -n "__fish_use_subcommand" -f -a "add-peer" -d 'Add a peer to an existing network' +complete -c innernet-server -n "__fish_use_subcommand" -f -a "rename-peer" -d 'Rename an existing peer' complete -c innernet-server -n "__fish_use_subcommand" -f -a "add-cidr" -d 'Add a new CIDR to an existing network' complete -c innernet-server -n "__fish_use_subcommand" -f -a "delete-cidr" -d 'Delete a CIDR' complete -c innernet-server -n "__fish_use_subcommand" -f -a "completions" -d 'Generate shell completion scripts' @@ -33,6 +34,11 @@ complete -c innernet-server -n "__fish_seen_subcommand_from add-peer" -l auto-ip complete -c innernet-server -n "__fish_seen_subcommand_from add-peer" -l yes -d 'Bypass confirmation' complete -c innernet-server -n "__fish_seen_subcommand_from add-peer" -s h -l help -d 'Prints help information' complete -c innernet-server -n "__fish_seen_subcommand_from add-peer" -s V -l version -d 'Prints version information' +complete -c innernet-server -n "__fish_seen_subcommand_from rename-peer" -l name -d 'Name of peer to rename' +complete -c innernet-server -n "__fish_seen_subcommand_from rename-peer" -l new-name -d 'The new name of the peer' +complete -c innernet-server -n "__fish_seen_subcommand_from rename-peer" -l yes -d 'Bypass confirmation' +complete -c innernet-server -n "__fish_seen_subcommand_from rename-peer" -s h -l help -d 'Prints help information' +complete -c innernet-server -n "__fish_seen_subcommand_from rename-peer" -s V -l version -d 'Prints version information' complete -c innernet-server -n "__fish_seen_subcommand_from add-cidr" -l name -d 'The CIDR name (eg. "engineers")' complete -c innernet-server -n "__fish_seen_subcommand_from add-cidr" -l cidr -d 'The CIDR network (eg. "10.42.5.0/24")' complete -c innernet-server -n "__fish_seen_subcommand_from add-cidr" -l parent -d 'The CIDR parent name' diff --git a/doc/innernet-server.completions.powershell b/doc/innernet-server.completions.powershell index 07d3041..fd66d8d 100644 --- a/doc/innernet-server.completions.powershell +++ b/doc/innernet-server.completions.powershell @@ -30,6 +30,7 @@ Register-ArgumentCompleter -Native -CommandName 'innernet-server' -ScriptBlock { [CompletionResult]::new('uninstall', 'uninstall', [CompletionResultType]::ParameterValue, 'Permanently uninstall a created network, rendering it unusable. Use with care') [CompletionResult]::new('serve', 'serve', [CompletionResultType]::ParameterValue, 'Serve the coordinating server for an existing network') [CompletionResult]::new('add-peer', 'add-peer', [CompletionResultType]::ParameterValue, 'Add a peer to an existing network') + [CompletionResult]::new('rename-peer', 'rename-peer', [CompletionResultType]::ParameterValue, 'Rename an existing peer') [CompletionResult]::new('add-cidr', 'add-cidr', [CompletionResultType]::ParameterValue, 'Add a new CIDR to an existing network') [CompletionResult]::new('delete-cidr', 'delete-cidr', [CompletionResultType]::ParameterValue, 'Delete a CIDR') [CompletionResult]::new('completions', 'completions', [CompletionResultType]::ParameterValue, 'Generate shell completion scripts') @@ -79,6 +80,16 @@ Register-ArgumentCompleter -Native -CommandName 'innernet-server' -ScriptBlock { [CompletionResult]::new('--version', 'version', [CompletionResultType]::ParameterName, 'Prints version information') break } + 'innernet-server;rename-peer' { + [CompletionResult]::new('--name', 'name', [CompletionResultType]::ParameterName, 'Name of peer to rename') + [CompletionResult]::new('--new-name', 'new-name', [CompletionResultType]::ParameterName, 'The new name of the peer') + [CompletionResult]::new('--yes', 'yes', [CompletionResultType]::ParameterName, 'Bypass confirmation') + [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Prints help information') + [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Prints help information') + [CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Prints version information') + [CompletionResult]::new('--version', 'version', [CompletionResultType]::ParameterName, 'Prints version information') + break + } 'innernet-server;add-cidr' { [CompletionResult]::new('--name', 'name', [CompletionResultType]::ParameterName, 'The CIDR name (eg. "engineers")') [CompletionResult]::new('--cidr', 'cidr', [CompletionResultType]::ParameterName, 'The CIDR network (eg. "10.42.5.0/24")') diff --git a/doc/innernet-server.completions.zsh b/doc/innernet-server.completions.zsh index 9439462..08e3d2d 100644 --- a/doc/innernet-server.completions.zsh +++ b/doc/innernet-server.completions.zsh @@ -106,6 +106,18 @@ _arguments "${_arguments_options[@]}" \ ':interface:_files' \ && ret=0 ;; +(rename-peer) +_arguments "${_arguments_options[@]}" \ +'--name=[Name of peer to rename]' \ +'--new-name=[The new name of the peer]' \ +'--yes[Bypass confirmation]' \ +'-h[Prints help information]' \ +'--help[Prints help information]' \ +'-V[Prints version information]' \ +'--version[Prints version information]' \ +':interface:_files' \ +&& ret=0 +;; (add-cidr) _arguments "${_arguments_options[@]}" \ '--name=[The CIDR name (eg. "engineers")]' \ @@ -159,6 +171,7 @@ _innernet-server_commands() { "uninstall:Permanently uninstall a created network, rendering it unusable. Use with care" \ "serve:Serve the coordinating server for an existing network" \ "add-peer:Add a peer to an existing network" \ +"rename-peer:Rename an existing peer" \ "add-cidr:Add a new CIDR to an existing network" \ "delete-cidr:Delete a CIDR" \ "completions:Generate shell completion scripts" \ @@ -222,6 +235,13 @@ _innernet-server__new_commands() { ) _describe -t commands 'innernet-server new 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__serve_commands] )) || _innernet-server__serve_commands() { local commands; commands=( diff --git a/doc/innernet.8 b/doc/innernet.8 index 41c5ce7..2dedc96 100644 --- a/doc/innernet.8 +++ b/doc/innernet.8 @@ -1,47 +1,63 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.48.3. -.TH INNERNET "8" "May 2021" "innernet 1.3.0" "System Administration Utilities" +.TH INNERNET "8" "June 2021" "innernet 1.3.1" "System Administration Utilities" .SH NAME -innernet \- manual page for innernet 1.3.0 +innernet \- manual page for innernet 1.3.1 .SH DESCRIPTION -innernet 1.3.0 +innernet 1.3.1 A client to manage innernet network interfaces. .SS "USAGE:" .IP -innernet [FLAGS] [OPTIONS] [SUBCOMMAND] -.SS "FLAGS:" +innernet [OPTIONS] [SUBCOMMAND] +.SS "OPTIONS:" .HP -\fB\-h\fR, \fB\-\-help\fR +\fB\-v\fR, \fB\-\-verbose\fR .IP -Prints help information +Verbose output, use \fB\-vv\fR for even higher verbositude .HP \fB\-\-no\-routing\fR .IP Whether the routing should be done by innernet or is done by an external tool like e.g. babeld .HP -\fB\-V\fR, \fB\-\-version\fR -.IP -Prints version information -.HP -\fB\-v\fR -.SS "OPTIONS:" -.HP \fB\-\-backend\fR .IP Specify a WireGuard backend to use. If not set, innernet will auto\-select based on availability [default: -userspace] [possible values: userspace] +kernel] [possible values: kernel, userspace] +.HP +\fB\-h\fR, \fB\-\-help\fR +.IP +Prints help information +.HP +\fB\-V\fR, \fB\-\-version\fR +.IP +Prints version information .SS "SUBCOMMANDS:" .TP -add\-association -Add an association between CIDRs +install +Install a new innernet config .TP -add\-cidr -Add a new CIDR +show +Enumerate all innernet connections +.TP +up +Bring up your local interface, and update it with latest peer list +.TP +fetch +Fetch and update your local interface with the latest peer list +.TP +uninstall +Uninstall an innernet network +.TP +down +Bring down the interface (equivalent to "wg\-quick down ") .TP add\-peer Add a new peer .TP -delete\-association -Delete an association between CIDRs +rename\-peer +Rename a peer +.TP +add\-cidr +Add a new CIDR .TP delete\-cidr Delete a CIDR @@ -49,35 +65,26 @@ Delete a CIDR disable\-peer Disable an enabled peer .TP -down -Bring down the interface (equivalent to "wg\-quick down ") -.TP enable\-peer Enable a disabled peer .TP -fetch -Fetch and update your local interface with the latest peer list +add\-association +Add an association between CIDRs .TP -help -Prints this message or the help of the given subcommand(s) -.TP -install -Install a new innernet config +delete\-association +Delete an association between CIDRs .TP list\-associations List existing assocations between CIDRs .TP -override\-endpoint -Override your external endpoint that the server sends to other peers -.TP set\-listen\-port Set the local listen port .TP -show -Enumerate all innernet connections +override\-endpoint +Override your external endpoint that the server sends to other peers .TP -uninstall -Uninstall an innernet network +completions +Generate shell completion scripts .TP -up -Bring up your local interface, and update it with latest peer list +help +Prints this message or the help of the given subcommand(s) diff --git a/doc/innernet.8.gz b/doc/innernet.8.gz index c1a3178..68275ad 100644 Binary files a/doc/innernet.8.gz and b/doc/innernet.8.gz differ diff --git a/doc/innernet.completions.bash b/doc/innernet.completions.bash index fd1e35e..71f4005 100644 --- a/doc/innernet.completions.bash +++ b/doc/innernet.completions.bash @@ -61,6 +61,9 @@ _innernet() { redeem) cmd+="__redeem" ;; + rename-peer) + cmd+="__rename__peer" + ;; set-listen-port) cmd+="__set__listen__port" ;; @@ -80,7 +83,7 @@ _innernet() { case "${cmd}" in innernet) - opts=" -v -h -V --no-routing --help --version --backend install show up fetch uninstall down add-peer add-cidr delete-cidr disable-peer enable-peer add-association delete-association list-associations set-listen-port override-endpoint completions help redeem redeem list list" + opts=" -v -h -V --verbose --no-routing --help --version --backend install show up fetch uninstall down add-peer rename-peer add-cidr delete-cidr disable-peer enable-peer add-association delete-association list-associations set-listen-port override-endpoint completions help redeem redeem list list" if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -399,6 +402,29 @@ _innernet() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; + innernet__rename__peer) + opts=" -h -V --yes --help --version --name --new-name " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --name) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --new-name) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; innernet__set__listen__port) opts=" -u -h -V --unset --help --version " if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then diff --git a/doc/innernet.completions.elvish b/doc/innernet.completions.elvish index 7edab4e..28fbf6d 100644 --- a/doc/innernet.completions.elvish +++ b/doc/innernet.completions.elvish @@ -16,7 +16,8 @@ edit:completion:arg-completer[innernet] = [@words]{ completions = [ &'innernet'= { cand --backend 'Specify a WireGuard backend to use. If not set, innernet will auto-select based on availability' - cand -v 'v' + cand -v 'Verbose output, use -vv for even higher verbositude' + cand --verbose 'Verbose output, use -vv for even higher verbositude' cand --no-routing 'Whether the routing should be done by innernet or is done by an external tool like e.g. babeld' cand -h 'Prints help information' cand --help 'Prints help information' @@ -29,6 +30,7 @@ edit:completion:arg-completer[innernet] = [@words]{ cand uninstall 'Uninstall an innernet network' cand down 'Bring down the interface (equivalent to "wg-quick down ")' 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 disable-peer 'Disable an enabled peer' @@ -108,6 +110,15 @@ edit:completion:arg-completer[innernet] = [@words]{ cand -V 'Prints version information' cand --version 'Prints version information' } + &'innernet;rename-peer'= { + cand --name 'Name of peer to rename' + cand --new-name 'The new name of the peer' + cand --yes 'Bypass confirmation' + cand -h 'Prints help information' + cand --help 'Prints help information' + cand -V 'Prints version information' + cand --version 'Prints version information' + } &'innernet;add-cidr'= { cand --name 'The CIDR name (eg. "engineers")' cand --cidr 'The CIDR network (eg. "10.42.5.0/24")' diff --git a/doc/innernet.completions.fish b/doc/innernet.completions.fish index dd8df80..dcf93fa 100644 --- a/doc/innernet.completions.fish +++ b/doc/innernet.completions.fish @@ -1,5 +1,5 @@ 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" -s v +complete -c innernet -n "__fish_use_subcommand" -s v -l verbose -d 'Verbose output, use -vv for even higher verbositude' complete -c innernet -n "__fish_use_subcommand" -l no-routing -d 'Whether the routing should be done by innernet or is done by an external tool like e.g. babeld' complete -c innernet -n "__fish_use_subcommand" -s h -l help -d 'Prints help information' complete -c innernet -n "__fish_use_subcommand" -s V -l version -d 'Prints version information' @@ -10,6 +10,7 @@ complete -c innernet -n "__fish_use_subcommand" -f -a "fetch" -d 'Fetch and upda complete -c innernet -n "__fish_use_subcommand" -f -a "uninstall" -d 'Uninstall an innernet network' complete -c innernet -n "__fish_use_subcommand" -f -a "down" -d 'Bring down the interface (equivalent to "wg-quick down ")' complete -c innernet -n "__fish_use_subcommand" -f -a "add-peer" -d 'Add a new peer' +complete -c innernet -n "__fish_use_subcommand" -f -a "rename-peer" -d 'Rename a peer' complete -c innernet -n "__fish_use_subcommand" -f -a "add-cidr" -d 'Add a new CIDR' complete -c innernet -n "__fish_use_subcommand" -f -a "delete-cidr" -d 'Delete a CIDR' complete -c innernet -n "__fish_use_subcommand" -f -a "disable-peer" -d 'Disable an enabled peer' @@ -56,6 +57,11 @@ complete -c innernet -n "__fish_seen_subcommand_from add-peer" -l auto-ip -d 'Au complete -c innernet -n "__fish_seen_subcommand_from add-peer" -l yes -d 'Bypass confirmation' complete -c innernet -n "__fish_seen_subcommand_from add-peer" -s h -l help -d 'Prints help information' complete -c innernet -n "__fish_seen_subcommand_from add-peer" -s V -l version -d 'Prints version information' +complete -c innernet -n "__fish_seen_subcommand_from rename-peer" -l name -d 'Name of peer to rename' +complete -c innernet -n "__fish_seen_subcommand_from rename-peer" -l new-name -d 'The new name of the peer' +complete -c innernet -n "__fish_seen_subcommand_from rename-peer" -l yes -d 'Bypass confirmation' +complete -c innernet -n "__fish_seen_subcommand_from rename-peer" -s h -l help -d 'Prints help information' +complete -c innernet -n "__fish_seen_subcommand_from rename-peer" -s V -l version -d 'Prints version information' complete -c innernet -n "__fish_seen_subcommand_from add-cidr" -l name -d 'The CIDR name (eg. "engineers")' complete -c innernet -n "__fish_seen_subcommand_from add-cidr" -l cidr -d 'The CIDR network (eg. "10.42.5.0/24")' complete -c innernet -n "__fish_seen_subcommand_from add-cidr" -l parent -d 'The CIDR parent name' diff --git a/doc/innernet.completions.powershell b/doc/innernet.completions.powershell index a0fe2a6..221736b 100644 --- a/doc/innernet.completions.powershell +++ b/doc/innernet.completions.powershell @@ -21,7 +21,8 @@ Register-ArgumentCompleter -Native -CommandName 'innernet' -ScriptBlock { $completions = @(switch ($command) { 'innernet' { [CompletionResult]::new('--backend', 'backend', [CompletionResultType]::ParameterName, 'Specify a WireGuard backend to use. If not set, innernet will auto-select based on availability') - [CompletionResult]::new('-v', 'v', [CompletionResultType]::ParameterName, 'v') + [CompletionResult]::new('-v', 'v', [CompletionResultType]::ParameterName, 'Verbose output, use -vv for even higher verbositude') + [CompletionResult]::new('--verbose', 'verbose', [CompletionResultType]::ParameterName, 'Verbose output, use -vv for even higher verbositude') [CompletionResult]::new('--no-routing', 'no-routing', [CompletionResultType]::ParameterName, 'Whether the routing should be done by innernet or is done by an external tool like e.g. babeld') [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Prints help information') [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Prints help information') @@ -34,6 +35,7 @@ Register-ArgumentCompleter -Native -CommandName 'innernet' -ScriptBlock { [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('disable-peer', 'disable-peer', [CompletionResultType]::ParameterValue, 'Disable an enabled peer') @@ -121,6 +123,16 @@ Register-ArgumentCompleter -Native -CommandName 'innernet' -ScriptBlock { [CompletionResult]::new('--version', 'version', [CompletionResultType]::ParameterName, 'Prints version information') break } + 'innernet;rename-peer' { + [CompletionResult]::new('--name', 'name', [CompletionResultType]::ParameterName, 'Name of peer to rename') + [CompletionResult]::new('--new-name', 'new-name', [CompletionResultType]::ParameterName, 'The new name of the peer') + [CompletionResult]::new('--yes', 'yes', [CompletionResultType]::ParameterName, 'Bypass confirmation') + [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Prints help information') + [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Prints help information') + [CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Prints version information') + [CompletionResult]::new('--version', 'version', [CompletionResultType]::ParameterName, 'Prints version information') + break + } 'innernet;add-cidr' { [CompletionResult]::new('--name', 'name', [CompletionResultType]::ParameterName, 'The CIDR name (eg. "engineers")') [CompletionResult]::new('--cidr', 'cidr', [CompletionResultType]::ParameterName, 'The CIDR network (eg. "10.42.5.0/24")') diff --git a/doc/innernet.completions.zsh b/doc/innernet.completions.zsh index 240da13..0a930ff 100644 --- a/doc/innernet.completions.zsh +++ b/doc/innernet.completions.zsh @@ -16,7 +16,8 @@ _innernet() { local context curcontext="$curcontext" state line _arguments "${_arguments_options[@]}" \ '--backend=[Specify a WireGuard backend to use. If not set, innernet will auto-select based on availability]: :(kernel userspace)' \ -'*-v[]' \ +'*-v[Verbose output, use -vv for even higher verbositude]' \ +'*--verbose[Verbose output, use -vv for even higher verbositude]' \ '--no-routing[Whether the routing should be done by innernet or is done by an external tool like e.g. babeld]' \ '-h[Prints help information]' \ '--help[Prints help information]' \ @@ -175,6 +176,18 @@ _arguments "${_arguments_options[@]}" \ ':interface:_files' \ && ret=0 ;; +(rename-peer) +_arguments "${_arguments_options[@]}" \ +'--name=[Name of peer to rename]' \ +'--new-name=[The new name of the peer]' \ +'--yes[Bypass confirmation]' \ +'-h[Prints help information]' \ +'--help[Prints help information]' \ +'-V[Prints version information]' \ +'--version[Prints version information]' \ +':interface:_files' \ +&& ret=0 +;; (add-cidr) _arguments "${_arguments_options[@]}" \ '--name=[The CIDR name (eg. "engineers")]' \ @@ -300,6 +313,7 @@ _innernet_commands() { "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" \ "disable-peer:Disable an enabled peer" \ @@ -440,6 +454,13 @@ _redeem_commands() { ) _describe -t commands 'redeem commands' commands "$@" } +(( $+functions[_innernet__rename-peer_commands] )) || +_innernet__rename-peer_commands() { + local commands; commands=( + + ) + _describe -t commands 'innernet rename-peer commands' commands "$@" +} (( $+functions[_innernet__set-listen-port_commands] )) || _innernet__set-listen-port_commands() { local commands; commands=( diff --git a/server/Cargo.toml b/server/Cargo.toml index 8c8012c..0d492ad 100644 --- a/server/Cargo.toml +++ b/server/Cargo.toml @@ -6,7 +6,7 @@ license = "MIT" name = "server" publish = false readme = "README.md" -version = "1.3.0" +version = "1.3.1" [[bin]] name = "innernet-server" diff --git a/shared/Cargo.toml b/shared/Cargo.toml index 6c9d560..b870b3c 100644 --- a/shared/Cargo.toml +++ b/shared/Cargo.toml @@ -4,7 +4,7 @@ edition = "2018" license = "MIT" name = "shared" publish = false -version = "1.3.0" +version = "1.3.1" [dependencies] colored = "2.0" diff --git a/wgctrl-rs/Cargo.toml b/wgctrl-rs/Cargo.toml index 9997259..6fb0cad 100644 --- a/wgctrl-rs/Cargo.toml +++ b/wgctrl-rs/Cargo.toml @@ -7,7 +7,7 @@ license = "LGPL-2.1-or-later" name = "wgctrl" publish = false readme = "../README.md" -version = "1.3.0" +version = "1.3.1" [dependencies] base64 = "0.13" diff --git a/wgctrl-sys/Cargo.toml b/wgctrl-sys/Cargo.toml index 44bb1e8..c11632e 100644 --- a/wgctrl-sys/Cargo.toml +++ b/wgctrl-sys/Cargo.toml @@ -7,7 +7,7 @@ name = "wgctrl-sys" publish = false readme = "../README.md" repository = "https://gitlab.com/K900/wgctrl-rs" -version = "1.3.0" +version = "1.3.1" [dependencies] libc = "0.2"