diff --git a/Cargo.lock b/Cargo.lock index ef3a664..a48557f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -137,7 +137,7 @@ dependencies = [ [[package]] name = "client" -version = "1.5.4" +version = "1.5.5" dependencies = [ "anyhow", "clap", @@ -632,7 +632,7 @@ dependencies = [ [[package]] name = "netlink-request" -version = "1.5.4" +version = "1.5.5" dependencies = [ "netlink-packet-core", "netlink-packet-generic", @@ -905,7 +905,7 @@ dependencies = [ [[package]] name = "server" -version = "1.5.4" +version = "1.5.5" dependencies = [ "anyhow", "bytes", @@ -940,7 +940,7 @@ dependencies = [ [[package]] name = "shared" -version = "1.5.4" +version = "1.5.5" dependencies = [ "anyhow", "atty", @@ -1310,7 +1310,7 @@ checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" [[package]] name = "wireguard-control" -version = "1.5.4" +version = "1.5.5" dependencies = [ "base64", "curve25519-dalek", diff --git a/README.md b/README.md index cfd7e78..5f63ea0 100644 --- a/README.md +++ b/README.md @@ -214,10 +214,10 @@ brew install tonarino/innernet/innernet ```sh # to install innernet: -cargo install --git https://github.com/tonarino/innernet --tag v1.5.4 client +cargo install --git https://github.com/tonarino/innernet --tag v1.5.5 client # to install innernet-server: -cargo install --git https://github.com/tonarino/innernet --tag v1.5.4 server +cargo install --git https://github.com/tonarino/innernet --tag v1.5.5 server ``` Note that you'll be responsible for updating manually. diff --git a/client/Cargo.toml b/client/Cargo.toml index dfe8686..4e63c7f 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.5.4" +version = "1.5.5" [[bin]] name = "innernet" diff --git a/doc/innernet-server.8 b/doc/innernet-server.8 index f75c756..79c2dff 100644 --- a/doc/innernet-server.8 +++ b/doc/innernet-server.8 @@ -1,9 +1,9 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.1. -.TH INNERNET-SERVER "8" "March 2022" "innernet-server 1.5.4" "System Administration Utilities" +.\" 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" .SH NAME -innernet-server \- manual page for innernet-server 1.5.4 +innernet-server \- manual page for innernet-server 1.5.5 .SH DESCRIPTION -innernet\-server 1.5.4 +innernet\-server 1.5.5 Jake McGinty A server to coordinate innernet networks. .SS "USAGE:" @@ -40,7 +40,9 @@ new Create a new network .TP uninstall -Permanently uninstall a created network, rendering it unusable. Use with care +Permanently uninstall a created network, rendering it unusable. Use with +.IP +care .TP serve Serve the coordinating server for an existing network @@ -48,6 +50,12 @@ Serve the coordinating server for an existing network add\-peer Add a peer to an existing network .TP +disable\-peer +Disable an enabled peer +.TP +enable\-peer +Enable a disabled peer +.TP rename\-peer Rename an existing peer .TP diff --git a/doc/innernet-server.8.gz b/doc/innernet-server.8.gz index 59e3b46..3062d2b 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 720d6c9..5a3f3f2 100644 --- a/doc/innernet-server.completions.bash +++ b/doc/innernet-server.completions.bash @@ -24,6 +24,12 @@ _innernet-server() { delete-cidr) cmd+="__delete__cidr" ;; + disable-peer) + cmd+="__disable__peer" + ;; + enable-peer) + cmd+="__enable__peer" + ;; help) cmd+="__help" ;; @@ -46,7 +52,7 @@ _innernet-server() { case "${cmd}" in innernet__server) - opts="-h -V -c -d --help --version --config-dir --data-dir --no-routing --backend --mtu new uninstall serve add-peer rename-peer add-cidr delete-cidr completions help" + opts="-h -V -c -d --help --version --config-dir --data-dir --no-routing --backend --mtu new uninstall serve add-peer disable-peer enable-peer rename-peer add-cidr delete-cidr completions help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -69,7 +75,7 @@ _innernet-server() { return 0 ;; --backend) - COMPREPLY=($(compgen -W "" -- "${cur}")) + COMPREPLY=($(compgen -W "kernel userspace" -- "${cur}")) return 0 ;; --mtu) @@ -179,6 +185,34 @@ _innernet-server() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; + innernet__server__disable__peer) + opts="-h --help " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + innernet__server__enable__peer) + opts="-h --help " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; innernet__server__help) opts="..." if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then @@ -253,7 +287,7 @@ _innernet-server() { fi case "${prev}" in --backend) - COMPREPLY=($(compgen -W "" -- "${cur}")) + COMPREPLY=($(compgen -W "kernel userspace" -- "${cur}")) return 0 ;; --mtu) @@ -268,7 +302,7 @@ _innernet-server() { return 0 ;; innernet__server__uninstall) - opts="-h --help " + opts="-h --yes --help " if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 diff --git a/doc/innernet-server.completions.elvish b/doc/innernet-server.completions.elvish index f3967dc..8f54c62 100644 --- a/doc/innernet-server.completions.elvish +++ b/doc/innernet-server.completions.elvish @@ -33,6 +33,8 @@ set 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 disable-peer 'Disable an enabled peer' + cand enable-peer 'Enable a disabled peer' cand rename-peer 'Rename an existing peer' cand add-cidr 'Add a new CIDR to an existing network' cand delete-cidr 'Delete a CIDR' @@ -49,6 +51,7 @@ set edit:completion:arg-completer[innernet-server] = {|@words| cand --help 'Print help information' } &'innernet-server;uninstall'= { + cand --yes 'Bypass confirmation' cand -h 'Print help information' cand --help 'Print help information' } @@ -71,6 +74,14 @@ set edit:completion:arg-completer[innernet-server] = {|@words| cand -h 'Print help information' cand --help 'Print help information' } + &'innernet-server;disable-peer'= { + cand -h 'Print help information' + cand --help 'Print help information' + } + &'innernet-server;enable-peer'= { + cand -h 'Print help information' + cand --help 'Print help information' + } &'innernet-server;rename-peer'= { cand --name 'Name of peer to rename' cand --new-name 'The new name of the peer' diff --git a/doc/innernet-server.completions.fish b/doc/innernet-server.completions.fish index b5577d9..a86e300 100644 --- a/doc/innernet-server.completions.fish +++ b/doc/innernet-server.completions.fish @@ -9,6 +9,8 @@ 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 "disable-peer" -d 'Disable an enabled peer' +complete -c innernet-server -n "__fish_use_subcommand" -f -a "enable-peer" -d 'Enable a disabled peer' 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' @@ -20,6 +22,7 @@ complete -c innernet-server -n "__fish_seen_subcommand_from new" -l external-end complete -c innernet-server -n "__fish_seen_subcommand_from new" -l listen-port -d 'Port to listen on (for the WireGuard interface)' -r complete -c innernet-server -n "__fish_seen_subcommand_from new" -l auto-external-endpoint -d 'Auto-resolve external endpoint' complete -c innernet-server -n "__fish_seen_subcommand_from new" -s h -l help -d 'Print help information' +complete -c innernet-server -n "__fish_seen_subcommand_from uninstall" -l yes -d 'Bypass confirmation' complete -c innernet-server -n "__fish_seen_subcommand_from uninstall" -s h -l help -d 'Print help information' complete -c innernet-server -n "__fish_seen_subcommand_from serve" -l backend -d 'Specify a WireGuard backend to use. If not set, innernet will auto-select based on availability' -r -f -a "{kernel ,userspace }" complete -c innernet-server -n "__fish_seen_subcommand_from serve" -l mtu -d 'Specify the desired MTU for your interface (default: 1280)' -r @@ -34,6 +37,8 @@ complete -c innernet-server -n "__fish_seen_subcommand_from add-peer" -l invite- complete -c innernet-server -n "__fish_seen_subcommand_from add-peer" -l auto-ip -d 'Auto-assign the peer the first available IP within the CIDR' complete -c innernet-server -n "__fish_seen_subcommand_from add-peer" -l yes -d 'Bypass confirmation' complete -c innernet-server -n "__fish_seen_subcommand_from add-peer" -s h -l help -d 'Print help information' +complete -c innernet-server -n "__fish_seen_subcommand_from disable-peer" -s h -l help -d 'Print help information' +complete -c innernet-server -n "__fish_seen_subcommand_from enable-peer" -s h -l help -d 'Print help information' complete -c innernet-server -n "__fish_seen_subcommand_from rename-peer" -l name -d 'Name of peer to rename' -r complete -c innernet-server -n "__fish_seen_subcommand_from rename-peer" -l new-name -d 'The new name of the peer' -r complete -c innernet-server -n "__fish_seen_subcommand_from rename-peer" -l yes -d 'Bypass confirmation' diff --git a/doc/innernet-server.completions.powershell b/doc/innernet-server.completions.powershell index d1d916e..e28b189 100644 --- a/doc/innernet-server.completions.powershell +++ b/doc/innernet-server.completions.powershell @@ -36,6 +36,8 @@ 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('disable-peer', 'disable-peer', [CompletionResultType]::ParameterValue, 'Disable an enabled peer') + [CompletionResult]::new('enable-peer', 'enable-peer', [CompletionResultType]::ParameterValue, 'Enable a disabled peer') [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') @@ -54,6 +56,7 @@ Register-ArgumentCompleter -Native -CommandName 'innernet-server' -ScriptBlock { break } 'innernet-server;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') break @@ -79,6 +82,16 @@ Register-ArgumentCompleter -Native -CommandName 'innernet-server' -ScriptBlock { [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information') break } + 'innernet-server;disable-peer' { + [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information') + [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information') + break + } + 'innernet-server;enable-peer' { + [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information') + [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information') + break + } 'innernet-server;rename-peer' { [CompletionResult]::new('--name', 'name', [CompletionResultType]::ParameterName, 'Name of peer to rename') [CompletionResult]::new('--new-name', 'new-name', [CompletionResultType]::ParameterName, 'The new name of the peer') diff --git a/doc/innernet-server.completions.zsh b/doc/innernet-server.completions.zsh index 1747495..43bdfd4 100644 --- a/doc/innernet-server.completions.zsh +++ b/doc/innernet-server.completions.zsh @@ -48,6 +48,7 @@ _arguments "${_arguments_options[@]}" \ ;; (uninstall) _arguments "${_arguments_options[@]}" \ +'--yes[Bypass confirmation]' \ '-h[Print help information]' \ '--help[Print help information]' \ ':interface:' \ @@ -78,6 +79,20 @@ _arguments "${_arguments_options[@]}" \ ':interface:' \ && ret=0 ;; +(disable-peer) +_arguments "${_arguments_options[@]}" \ +'-h[Print help information]' \ +'--help[Print help information]' \ +':interface:' \ +&& ret=0 +;; +(enable-peer) +_arguments "${_arguments_options[@]}" \ +'-h[Print help information]' \ +'--help[Print help information]' \ +':interface:' \ +&& ret=0 +;; (rename-peer) _arguments "${_arguments_options[@]}" \ '--name=[Name of peer to rename]:NAME: ' \ @@ -132,6 +147,8 @@ _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' \ +'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' \ @@ -160,6 +177,16 @@ _innernet-server__delete-cidr_commands() { local commands; commands=() _describe -t commands 'innernet-server 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__enable-peer_commands] )) || +_innernet-server__enable-peer_commands() { + local commands; commands=() + _describe -t commands 'innernet-server enable-peer commands' commands "$@" +} (( $+functions[_innernet-server__help_commands] )) || _innernet-server__help_commands() { local commands; commands=() diff --git a/doc/innernet.8 b/doc/innernet.8 index 638104b..a552535 100644 --- a/doc/innernet.8 +++ b/doc/innernet.8 @@ -1,9 +1,9 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.1. -.TH INNERNET "8" "March 2022" "innernet 1.5.4" "System Administration Utilities" +.\" 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" .SH NAME -innernet \- manual page for innernet 1.5.4 +innernet \- manual page for innernet 1.5.5 .SH DESCRIPTION -innernet 1.5.4 +innernet 1.5.5 Jake McGinty A client to manage innernet network interfaces. .SS "USAGE:" diff --git a/doc/innernet.8.gz b/doc/innernet.8.gz index 67d23e6..c6483fb 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 5a22750..d25d6c2 100644 --- a/doc/innernet.completions.bash +++ b/doc/innernet.completions.bash @@ -102,7 +102,7 @@ _innernet() { return 0 ;; --backend) - COMPREPLY=($(compgen -W "" -- "${cur}")) + COMPREPLY=($(compgen -W "kernel userspace" -- "${cur}")) return 0 ;; --mtu) diff --git a/netlink-request/Cargo.toml b/netlink-request/Cargo.toml index d583b7c..0235e31 100644 --- a/netlink-request/Cargo.toml +++ b/netlink-request/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "netlink-request" -version = "1.5.4" +version = "1.5.5" edition = "2021" [target.'cfg(target_os = "linux")'.dependencies] diff --git a/server/Cargo.toml b/server/Cargo.toml index 7bd1ec7..555ae48 100644 --- a/server/Cargo.toml +++ b/server/Cargo.toml @@ -6,7 +6,7 @@ license = "MIT" name = "server" publish = false readme = "README.md" -version = "1.5.4" +version = "1.5.5" [[bin]] name = "innernet-server" diff --git a/shared/Cargo.toml b/shared/Cargo.toml index c6d8cd5..3ecad0d 100644 --- a/shared/Cargo.toml +++ b/shared/Cargo.toml @@ -4,7 +4,7 @@ edition = "2021" license = "MIT" name = "shared" publish = false -version = "1.5.4" +version = "1.5.5" [dependencies] anyhow = "1" diff --git a/wireguard-control/Cargo.toml b/wireguard-control/Cargo.toml index dc26585..e914da3 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.4" +version = "1.5.5" [dependencies] base64 = "0.13"