meta: release v1.3.1

pull/103/head v1.3.1
Jake McGinty 2021-06-01 00:23:14 +09:00
parent b7f299c147
commit ba0b062ce9
22 changed files with 248 additions and 85 deletions

View File

@ -75,6 +75,7 @@ jobs:
build-rpm:
name: 'Build RPM packages'
continue-on-error: true
runs-on: ubuntu-latest
strategy:
matrix:

10
Cargo.lock generated
View File

@ -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",

View File

@ -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.

View File

@ -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"

View File

@ -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] <SUBCOMMAND>
.SS "FLAGS:"
innernet\-server [OPTIONS] <SUBCOMMAND>
.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 <backend>
Specify a WireGuard backend to use. If not set, innernet will auto\-select based on
availability [default: kernel] [possible values: kernel, userspace]
.TP
\fB\-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 <backend>
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)

Binary file not shown.

View File

@ -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 <interface> "
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
--name)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--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 <interface> "
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then

View File

@ -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")'

View File

@ -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'

View File

@ -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")')

View File

@ -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=(

View File

@ -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 <backend>
.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 <interface>")
.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 <interface>")
.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)

Binary file not shown.

View File

@ -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 <interface> "
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
--name)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--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 <interface> "
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then

View File

@ -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 <interface>")'
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")'

View File

@ -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 <interface>")'
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'

View File

@ -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 <interface>")')
[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")')

View File

@ -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 <interface>")" \
"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=(

View File

@ -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"

View File

@ -4,7 +4,7 @@ edition = "2018"
license = "MIT"
name = "shared"
publish = false
version = "1.3.0"
version = "1.3.1"
[dependencies]
colored = "2.0"

View File

@ -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"

View File

@ -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"