From 6be3e61074b6762c88d13a292b21cd78e681418f Mon Sep 17 00:00:00 2001 From: Jake McGinty Date: Mon, 6 Dec 2021 02:35:18 +0900 Subject: [PATCH] meta: release v1.5.2 --- Cargo.lock | 10 ++-- README.md | 4 +- client/Cargo.toml | 2 +- doc/innernet-server.8 | 19 +++++-- doc/innernet-server.8.gz | Bin 764 -> 814 bytes doc/innernet-server.completions.bash | 18 +++++- doc/innernet-server.completions.elvish | 4 ++ doc/innernet-server.completions.fish | 2 + doc/innernet-server.completions.powershell | 4 ++ doc/innernet-server.completions.zsh | 4 ++ doc/innernet.8 | 14 ++++- doc/innernet.8.gz | Bin 990 -> 1037 bytes doc/innernet.completions.bash | 62 ++++++++++++++++++--- doc/innernet.completions.elvish | 19 +++++++ doc/innernet.completions.fish | 15 +++++ doc/innernet.completions.powershell | 19 +++++++ doc/innernet.completions.zsh | 32 +++++++++-- server/Cargo.toml | 2 +- shared/Cargo.toml | 2 +- wireguard-control-sys/Cargo.toml | 2 +- wireguard-control/Cargo.toml | 4 +- 21 files changed, 203 insertions(+), 35 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9d92325..9eb8a02 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -163,7 +163,7 @@ dependencies = [ [[package]] name = "client" -version = "1.5.1" +version = "1.5.2" dependencies = [ "anyhow", "colored", @@ -973,7 +973,7 @@ dependencies = [ [[package]] name = "server" -version = "1.5.1" +version = "1.5.2" dependencies = [ "anyhow", "bytes", @@ -1006,7 +1006,7 @@ dependencies = [ [[package]] name = "shared" -version = "1.5.1" +version = "1.5.2" dependencies = [ "anyhow", "atty", @@ -1389,7 +1389,7 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "wireguard-control" -version = "1.5.1" +version = "1.5.2" dependencies = [ "base64", "curve25519-dalek", @@ -1401,7 +1401,7 @@ dependencies = [ [[package]] name = "wireguard-control-sys" -version = "1.5.1" +version = "1.5.2" dependencies = [ "bindgen", "cc", diff --git a/README.md b/README.md index f02447f..54a4838 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.1 client +cargo install --git https://github.com/tonarino/innernet --tag v1.5.2 client # to install innernet-server: -cargo install --git https://github.com/tonarino/innernet --tag v1.5.1 server +cargo install --git https://github.com/tonarino/innernet --tag v1.5.2 server ``` Note that you'll be responsible for updating manually. diff --git a/client/Cargo.toml b/client/Cargo.toml index e572805..6e733aa 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.1" +version = "1.5.2" [[bin]] name = "innernet" diff --git a/doc/innernet-server.8 b/doc/innernet-server.8 index c1ba262..fa7f94c 100644 --- a/doc/innernet-server.8 +++ b/doc/innernet-server.8 @@ -1,25 +1,32 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.48.5. -.TH INNERNET-SERVER "8" "November 2021" "innernet-server 1.5.1" "System Administration Utilities" +.TH INNERNET-SERVER "8" "December 2021" "innernet-server 1.5.2" "System Administration Utilities" .SH NAME -innernet-server \- manual page for innernet-server 1.5.1 +innernet-server \- manual page for innernet-server 1.5.2 .SH DESCRIPTION -innernet\-server 1.5.1 +innernet\-server 1.5.2 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 +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: 1420 for IPv4 and 1400 for IPv6) +Specify the desired MTU for your interface (default: 1420 for IPv4 and 1400 for +IPv6) .TP \fB\-h\fR, \fB\-\-help\fR Prints help information diff --git a/doc/innernet-server.8.gz b/doc/innernet-server.8.gz index 8a9c152b52c792b76bb002d815f43be02bf5bad1..2435d6e7d911205a291ff27063dd79ac19ea29d8 100644 GIT binary patch literal 814 zcmV+}1JV2+iwFo-_^e?718HtbBVJK3??w1%waSc zBwv5R{3%J{Yw~UQ4j^%`WfqpG&@hJ_@*S*Du6q?za2?;=#vkJ-owNMKlUs*P_{w``P1^xJClYU!oZ6grEv|2X_i^(E848J{O1Rr&&7(#8G5WHjoJ2X}kmA>^U+X_S@s zS+~f_*#(3n8CsQMnRU4^dvi zrO4mn%(_ZvU88F!)RL&8A1ib#-?A0L!3}n$Ye{NB;98+qP18a@BHOr0M)=E7ghuGJ zmLSC|Mi?(+$XSk(pC-;(@rsIv`VZ&3C|zSAN@9W^!r)`g4CUPi{S<49F(f4@?P#{{ zqAg@Aqy$zw?O#%2;Rt3);#x&)!-QnH*WV7>_Plzad;xe~YimU=5jITLXpf-_pU&7d zEAXsim8(P1^xqcj`^C{x(HuteMG)^!*IvQYkdipyeUtk7rgs%?B-70eb&ZqfDtIFD zeEQI4Tb<6_@2a2C)DWo+t4s8Rs=|)7sPCsJ8n~tC3Gm=K$9f^R%07x&;Wm0O=+}nP zzHE;>6N0r8$~q=xG)3Z3sGQtE<0V89p!|rs07HXB<3%ML-K;I6zQ?ezNE37`D44;( z9h4fS{uz4P>~9d{ekXkggXHKl7PcXr4Xn^w|IO6<%?;AfWjHUz1_@o~#6?5m@9l@^H;#T&)hGr40MrVSr~m)} literal 764 zcmV; z_9xJ|Z9rqFw^+>4K>NDgqO(v$qtG=ink|J}g!b`tZygrU;e}AbI;teJf|(OiIDxhi z#pw$SJA;1oJ44n4>ZD{6Hf)Ko&<6fmBrx>)X?K#0r^#qo6J?*Tb)Y&r4Y}5a3q`M8 za{_&K+N>?TbeckAmUf=|chp}p{*&>26iTHZaG%Z|yQ9INGweMafK|#vr{gGFJZ8D4JM#*i#PX-As5t5YL8 zAtkWVX|IID+!4%@b+n4umI=w`ey)3X=eS^{ba$}!K=}dizR}i-xkT79S)x6ru6#LT zH!R1G^TrEThNkKF)Uel!qot-f45qVSioGtqGf0pHall1gx^>gO4mXnV_J&mB6uGV= z-!4zpR#fQ?!vy>K9;M}>5*iw(tS3^sbM{`6?+kR&{%z~)A5oDB#+ u`r|a+iZ-x7YyE$bK5TBVhF*l{rPv~&%Q +.IP +[default: /etc/innernet] +.HP +\fB\-d\fR, \fB\-\-data\-dir\fR +.IP +[default: /var/lib/innernet] +.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 diff --git a/doc/innernet.8.gz b/doc/innernet.8.gz index 68af19696923fc3ba3733a1239f0a9b3f23c8a69..c9dfec0f05a89041602b2247d2f0559c97934d05 100644 GIT binary patch literal 1037 zcmV+o1oHbIiwFo-_^e?718Ht3q)Lj-np)%3x{16UY4H+EqA?{{p6B;{7R4+YyZ=Xl0*W@s<%z;Fta=>o>nVf^?H zES}>89^)UQzW`zjM`mDy3JYeD!|DyTDD(cFDY)s~e(infMZLu{#FNQrJ{c{b^R)w= zA!fK=VFCT?{tfMgBD_LNkT1PH9VBnY;vNQkFO)ErxP?}*v_c9i&~&0+@(h!~cofyp zvB%MYgS5o2Ulpbt5Z_14Igjwab{V=R`349bzsGn6swQ;(yr2Jx1bb-+ME*qwMFYP zq7SG{V79uHq%j1p6*{fePwuL1>SGcg{-#PPQiIi6f)qOh>}`6mVk?xqeff%IJ5=1q zU#&y*NsgIV6C3;z1wNImpu2;E(+HKK2k{z|wqTHIQwMVtQUWV2Wo1xeW(j7fIY`3n zz=UKgr{g!MpC{TmpnL^*$+ah~G!ll-b#-oT``6who*i!K^*Ehe*C&5pG&gSBwRfFBE}Ce-dG*A8>x=~|w#Ujo_ZxDl%^sTx-o`$}!+D64y24^*ANmcs)Ml4^ zFq-HGt-U2whzrB0JF07kVdwi@xfO2$2nUtpNCiKr@cb-LW{l26P@IpKI<+~XiDQpQ zQ??aHl|dVLO632rA-$GQl_mbBPggr{3YHJxG;7kX<3L5(>B2?{$-wK!3oDqwTb#e9 zwkiatU}#HruymS*-Ijd8!VI?Q@MK=j(LH^Tk2nQ}#3^oz_tn~UfVnx}{) HkO%+(R5=A= literal 990 zcmV<410nn$iwFpP<&0qf18Ht%r~U!IwcaSUy8MosJjN@e+Dpd(fNe zJr--M;O6S)n)X5wUZEw(mw^)`Z^mK)LtY3aj3sWN6|Ag~!U{CKXplU^bT}DDEi~-| z9a=L9CEFn6x`Ow#9y1yz4~uxdjAzs6Og)553RD)Xc1(_>wV>ZYS343|ta6s2p|Fw! zdaGpkG`=H$;(5pSGV=!{ukezr?jL58$#6P)4S+`FAkXtC&F|CxKFt@G;Fq+)YOM{D z$aDS-ThO&FYkLVbtpmuRe3ZCH1zWM%Qa%G(*qURev8X|D5(ABaH$z{{DVk$2Fp-d>sw$)mK6gvbQYzDAqYn1%-@HNYJsJL_YTeJS| zT}VpIL{4n*OH}w&vx?3R2CfDa>Hy*#l(t}yVsD)}2q}TpmZCB!F|!0S)O^$;Y|n&b zYu6`l@WL@?wX}E9&H?2sz)Pu(5o?LCXR=0f2SMdCTbYtd`+DkpVQcR={l9nG<&C2u z$2m-vD_@B>T~}R;z~|%faD97o=#W3py2z0B4BSZH<6TpBUFsWi>3Z2%CS??df2xtfLsx-Jt6XfnB{j_<8mqeS z69Am?shOhk&^gB2)@5{GxlXIgkSwV)CcBhf`rOndcTB<++HOJ8##ktkx>eFJ@Ju<{ zY#Tkg?C^&wNOjW%-^g4(K?A)gMLv`><3 z7mUBPmft^Jcsj;;+IQYWL(ZEN`>j(}s91rGe&IJ{(yBc+6Z{nW5RVqYPr4Nr8~w;{ z$fQ-f*n`qUKWObWp+a03Mz^Cmb`*C0zALxlodZG87>-r2g9gvf9A(DnOoWc}{?bkD zL^N^i0cnbz_|Zgg3Ook#H*5&+#HNW7|IpXf&Z~mv131l^wC^}jQFOYpQ9^Ct`^Ps{ zP=VJtdwR>NN^o+P23M)6%F(P5g??;D;jE(ZNA< M{~PGSweSZ306kRpKmY&$ diff --git a/doc/innernet.completions.bash b/doc/innernet.completions.bash index dae137f..d4149d0 100644 --- a/doc/innernet.completions.bash +++ b/doc/innernet.completions.bash @@ -86,13 +86,29 @@ _innernet() { case "${cmd}" in innernet) - opts=" -v -h -V --verbose --no-routing --help --version --backend --mtu install show up fetch uninstall down add-peer rename-peer add-cidr delete-cidr list-cidrs disable-peer enable-peer add-association delete-association list-associations set-listen-port override-endpoint completions help redeem list" + opts=" -v -h -V -c -d --verbose --no-routing --help --version --config-dir --data-dir --backend --mtu install show up fetch uninstall down add-peer rename-peer add-cidr delete-cidr list-cidrs disable-peer enable-peer add-association delete-association list-associations set-listen-port override-endpoint completions help redeem list" if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in + --config-dir) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --data-dir) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -d) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; --backend) COMPREPLY=($(compgen -W "kernel userspace" -- "${cur}")) return 0 @@ -285,7 +301,7 @@ _innernet() { return 0 ;; innernet__fetch) - opts=" -h -V --no-write-hosts --help --version --hosts-path " + opts=" -h -V --no-write-hosts --no-nat-traversal --no-nat-candidates --help --version --hosts-path --exclude-nat-candidates " if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -296,6 +312,10 @@ _innernet() { COMPREPLY=($(compgen -f "${cur}")) return 0 ;; + --exclude-nat-candidates) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; *) COMPREPLY=() ;; @@ -319,7 +339,7 @@ _innernet() { return 0 ;; innernet__install) - opts=" -d -h -V --no-write-hosts --default-name --delete-invite --help --version --hosts-path --name " + opts=" -d -h -V --no-write-hosts --default-name --delete-invite --no-nat-traversal --no-nat-candidates --help --version --hosts-path --name --exclude-nat-candidates " if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -334,6 +354,10 @@ _innernet() { COMPREPLY=($(compgen -f "${cur}")) return 0 ;; + --exclude-nat-candidates) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; *) COMPREPLY=() ;; @@ -387,13 +411,21 @@ _innernet() { return 0 ;; innernet__override__endpoint) - opts=" -u -h -V --unset --help --version " + opts=" -u -h -V -e --unset --yes --help --version --endpoint " if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in + --endpoint) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -e) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; *) COMPREPLY=() ;; @@ -402,7 +434,7 @@ _innernet() { return 0 ;; innernet__redeem) - opts=" -d -h -V --no-write-hosts --default-name --delete-invite --help --version --hosts-path --name " + opts=" -d -h -V --no-write-hosts --default-name --delete-invite --no-nat-traversal --no-nat-candidates --help --version --hosts-path --name --exclude-nat-candidates " if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -417,6 +449,10 @@ _innernet() { COMPREPLY=($(compgen -f "${cur}")) return 0 ;; + --exclude-nat-candidates) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; *) COMPREPLY=() ;; @@ -448,13 +484,21 @@ _innernet() { return 0 ;; innernet__set__listen__port) - opts=" -u -h -V --unset --help --version " + opts=" -u -h -V -l --unset --yes --help --version --listen-port " if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in + --listen-port) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -l) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; *) COMPREPLY=() ;; @@ -493,7 +537,7 @@ _innernet() { return 0 ;; innernet__up) - opts=" -d -h -V --daemon --no-write-hosts --help --version --interval --hosts-path " + opts=" -d -h -V --daemon --no-write-hosts --no-nat-traversal --no-nat-candidates --help --version --interval --hosts-path --exclude-nat-candidates " if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -508,6 +552,10 @@ _innernet() { COMPREPLY=($(compgen -f "${cur}")) return 0 ;; + --exclude-nat-candidates) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; *) COMPREPLY=() ;; diff --git a/doc/innernet.completions.elvish b/doc/innernet.completions.elvish index e987e20..5d5d9df 100644 --- a/doc/innernet.completions.elvish +++ b/doc/innernet.completions.elvish @@ -15,6 +15,10 @@ edit:completion:arg-completer[innernet] = [@words]{ } completions = [ &'innernet'= { + cand -c 'c' + cand --config-dir 'config-dir' + cand -d 'd' + cand --data-dir 'data-dir' cand --backend 'Specify a WireGuard backend to use. If not set, innernet will auto-select based on availability' cand --mtu 'Specify the desired MTU for your interface (default: 1420 for IPv4 and 1400 for IPv6)' cand -v 'Verbose output, use -vv for even higher verbositude' @@ -48,10 +52,13 @@ edit:completion:arg-completer[innernet] = [@words]{ &'innernet;install'= { cand --hosts-path 'The path to write hosts to' cand --name 'Set a specific interface name' + cand --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' cand --no-write-hosts 'Don''t write to any hosts files' cand --default-name 'Use the network name inside the invitation as the interface name' cand -d 'Delete the invitation after a successful install' cand --delete-invite 'Delete the invitation after a successful install' + cand --no-nat-traversal 'Don''t attempt NAT traversal. Note that this still will report candidates unless you also specify to exclude all NAT candidates' + cand --no-nat-candidates 'Don''t report any candidates to coordinating server. Shorthand for --exclude-nat-candidates ''0.0.0.0/0''' cand -h 'Prints help information' cand --help 'Prints help information' cand -V 'Prints version information' @@ -70,9 +77,12 @@ edit:completion:arg-completer[innernet] = [@words]{ &'innernet;up'= { cand --interval 'Keep fetching the latest peer list at the specified interval in seconds. Valid only in daemon mode' cand --hosts-path 'The path to write hosts to' + cand --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' cand -d 'Enable daemon mode i.e. keep the process running, while fetching the latest peer list periodically' cand --daemon 'Enable daemon mode i.e. keep the process running, while fetching the latest peer list periodically' cand --no-write-hosts 'Don''t write to any hosts files' + cand --no-nat-traversal 'Don''t attempt NAT traversal. Note that this still will report candidates unless you also specify to exclude all NAT candidates' + cand --no-nat-candidates 'Don''t report any candidates to coordinating server. Shorthand for --exclude-nat-candidates ''0.0.0.0/0''' cand -h 'Prints help information' cand --help 'Prints help information' cand -V 'Prints version information' @@ -80,7 +90,10 @@ edit:completion:arg-completer[innernet] = [@words]{ } &'innernet;fetch'= { cand --hosts-path 'The path to write hosts to' + cand --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' cand --no-write-hosts 'Don''t write to any hosts files' + cand --no-nat-traversal 'Don''t attempt NAT traversal. Note that this still will report candidates unless you also specify to exclude all NAT candidates' + cand --no-nat-candidates 'Don''t report any candidates to coordinating server. Shorthand for --exclude-nat-candidates ''0.0.0.0/0''' cand -h 'Prints help information' cand --help 'Prints help information' cand -V 'Prints version information' @@ -178,16 +191,22 @@ edit:completion:arg-completer[innernet] = [@words]{ cand --version 'Prints version information' } &'innernet;set-listen-port'= { + cand -l 'The listen port you''d like to set for the interface' + cand --listen-port 'The listen port you''d like to set for the interface' cand -u 'Unset the local listen port to use a randomized port' cand --unset 'Unset the local listen port to use a randomized port' + cand --yes 'Bypass confirmation' cand -h 'Prints help information' cand --help 'Prints help information' cand -V 'Prints version information' cand --version 'Prints version information' } &'innernet;override-endpoint'= { + cand -e 'The listen port you''d like to set for the interface' + cand --endpoint 'The listen port you''d like to set for the interface' cand -u 'Unset an existing override to use the automatic endpoint discovery' cand --unset 'Unset an existing override to use the automatic endpoint discovery' + cand --yes 'Bypass confirmation' cand -h 'Prints help information' cand --help 'Prints help information' cand -V 'Prints version information' diff --git a/doc/innernet.completions.fish b/doc/innernet.completions.fish index 3685870..0c93dff 100644 --- a/doc/innernet.completions.fish +++ b/doc/innernet.completions.fish @@ -1,3 +1,5 @@ +complete -c innernet -n "__fish_use_subcommand" -s c -l config-dir +complete -c innernet -n "__fish_use_subcommand" -s d -l data-dir complete -c innernet -n "__fish_use_subcommand" -l backend -d 'Specify a WireGuard backend to use. If not set, innernet will auto-select based on availability' -r -f -a "kernel userspace" complete -c innernet -n "__fish_use_subcommand" -l mtu -d 'Specify the desired MTU for your interface (default: 1420 for IPv4 and 1400 for IPv6)' complete -c innernet -n "__fish_use_subcommand" -s v -l verbose -d 'Verbose output, use -vv for even higher verbositude' @@ -26,9 +28,12 @@ complete -c innernet -n "__fish_use_subcommand" -f -a "completions" -d 'Generate complete -c innernet -n "__fish_use_subcommand" -f -a "help" -d 'Prints this message or the help of the given subcommand(s)' complete -c innernet -n "__fish_seen_subcommand_from install" -l hosts-path -d 'The path to write hosts to' complete -c innernet -n "__fish_seen_subcommand_from install" -l name -d 'Set a specific interface name' +complete -c innernet -n "__fish_seen_subcommand_from install" -l exclude-nat-candidates -d 'Exclude one or more CIDRs from NAT candidate reporting. ex. --exclude-nat-candidates \'0.0.0.0/0\' would report no candidates' complete -c innernet -n "__fish_seen_subcommand_from install" -l no-write-hosts -d 'Don\'t write to any hosts files' complete -c innernet -n "__fish_seen_subcommand_from install" -l default-name -d 'Use the network name inside the invitation as the interface name' complete -c innernet -n "__fish_seen_subcommand_from install" -s d -l delete-invite -d 'Delete the invitation after a successful install' +complete -c innernet -n "__fish_seen_subcommand_from install" -l no-nat-traversal -d 'Don\'t attempt NAT traversal. Note that this still will report candidates unless you also specify to exclude all NAT candidates' +complete -c innernet -n "__fish_seen_subcommand_from install" -l no-nat-candidates -d 'Don\'t report any candidates to coordinating server. Shorthand for --exclude-nat-candidates \'0.0.0.0/0\'' complete -c innernet -n "__fish_seen_subcommand_from install" -s h -l help -d 'Prints help information' complete -c innernet -n "__fish_seen_subcommand_from install" -s V -l version -d 'Prints version information' complete -c innernet -n "__fish_seen_subcommand_from show" -s s -l short -d 'One-line peer list' @@ -37,12 +42,18 @@ complete -c innernet -n "__fish_seen_subcommand_from show" -s h -l help -d 'Prin complete -c innernet -n "__fish_seen_subcommand_from show" -s V -l version -d 'Prints version information' complete -c innernet -n "__fish_seen_subcommand_from up" -l interval -d 'Keep fetching the latest peer list at the specified interval in seconds. Valid only in daemon mode' complete -c innernet -n "__fish_seen_subcommand_from up" -l hosts-path -d 'The path to write hosts to' +complete -c innernet -n "__fish_seen_subcommand_from up" -l exclude-nat-candidates -d 'Exclude one or more CIDRs from NAT candidate reporting. ex. --exclude-nat-candidates \'0.0.0.0/0\' would report no candidates' complete -c innernet -n "__fish_seen_subcommand_from up" -s d -l daemon -d 'Enable daemon mode i.e. keep the process running, while fetching the latest peer list periodically' complete -c innernet -n "__fish_seen_subcommand_from up" -l no-write-hosts -d 'Don\'t write to any hosts files' +complete -c innernet -n "__fish_seen_subcommand_from up" -l no-nat-traversal -d 'Don\'t attempt NAT traversal. Note that this still will report candidates unless you also specify to exclude all NAT candidates' +complete -c innernet -n "__fish_seen_subcommand_from up" -l no-nat-candidates -d 'Don\'t report any candidates to coordinating server. Shorthand for --exclude-nat-candidates \'0.0.0.0/0\'' complete -c innernet -n "__fish_seen_subcommand_from up" -s h -l help -d 'Prints help information' complete -c innernet -n "__fish_seen_subcommand_from up" -s V -l version -d 'Prints version information' complete -c innernet -n "__fish_seen_subcommand_from fetch" -l hosts-path -d 'The path to write hosts to' +complete -c innernet -n "__fish_seen_subcommand_from fetch" -l exclude-nat-candidates -d 'Exclude one or more CIDRs from NAT candidate reporting. ex. --exclude-nat-candidates \'0.0.0.0/0\' would report no candidates' complete -c innernet -n "__fish_seen_subcommand_from fetch" -l no-write-hosts -d 'Don\'t write to any hosts files' +complete -c innernet -n "__fish_seen_subcommand_from fetch" -l no-nat-traversal -d 'Don\'t attempt NAT traversal. Note that this still will report candidates unless you also specify to exclude all NAT candidates' +complete -c innernet -n "__fish_seen_subcommand_from fetch" -l no-nat-candidates -d 'Don\'t report any candidates to coordinating server. Shorthand for --exclude-nat-candidates \'0.0.0.0/0\'' complete -c innernet -n "__fish_seen_subcommand_from fetch" -s h -l help -d 'Prints help information' complete -c innernet -n "__fish_seen_subcommand_from fetch" -s V -l version -d 'Prints version information' complete -c innernet -n "__fish_seen_subcommand_from uninstall" -s h -l help -d 'Prints help information' @@ -87,10 +98,14 @@ complete -c innernet -n "__fish_seen_subcommand_from delete-association" -s h -l complete -c innernet -n "__fish_seen_subcommand_from delete-association" -s V -l version -d 'Prints version information' complete -c innernet -n "__fish_seen_subcommand_from list-associations" -s h -l help -d 'Prints help information' complete -c innernet -n "__fish_seen_subcommand_from list-associations" -s V -l version -d 'Prints version information' +complete -c innernet -n "__fish_seen_subcommand_from set-listen-port" -s l -l listen-port -d 'The listen port you\'d like to set for the interface' complete -c innernet -n "__fish_seen_subcommand_from set-listen-port" -s u -l unset -d 'Unset the local listen port to use a randomized port' +complete -c innernet -n "__fish_seen_subcommand_from set-listen-port" -l yes -d 'Bypass confirmation' complete -c innernet -n "__fish_seen_subcommand_from set-listen-port" -s h -l help -d 'Prints help information' complete -c innernet -n "__fish_seen_subcommand_from set-listen-port" -s V -l version -d 'Prints version information' +complete -c innernet -n "__fish_seen_subcommand_from override-endpoint" -s e -l endpoint -d 'The listen port you\'d like to set for the interface' complete -c innernet -n "__fish_seen_subcommand_from override-endpoint" -s u -l unset -d 'Unset an existing override to use the automatic endpoint discovery' +complete -c innernet -n "__fish_seen_subcommand_from override-endpoint" -l yes -d 'Bypass confirmation' complete -c innernet -n "__fish_seen_subcommand_from override-endpoint" -s h -l help -d 'Prints help information' complete -c innernet -n "__fish_seen_subcommand_from override-endpoint" -s V -l version -d 'Prints version information' complete -c innernet -n "__fish_seen_subcommand_from completions" -s h -l help -d 'Prints help information' diff --git a/doc/innernet.completions.powershell b/doc/innernet.completions.powershell index 4a1f131..746a1fc 100644 --- a/doc/innernet.completions.powershell +++ b/doc/innernet.completions.powershell @@ -20,6 +20,10 @@ Register-ArgumentCompleter -Native -CommandName 'innernet' -ScriptBlock { $completions = @(switch ($command) { 'innernet' { + [CompletionResult]::new('-c', 'c', [CompletionResultType]::ParameterName, 'c') + [CompletionResult]::new('--config-dir', 'config-dir', [CompletionResultType]::ParameterName, 'config-dir') + [CompletionResult]::new('-d', 'd', [CompletionResultType]::ParameterName, 'd') + [CompletionResult]::new('--data-dir', 'data-dir', [CompletionResultType]::ParameterName, 'data-dir') [CompletionResult]::new('--backend', 'backend', [CompletionResultType]::ParameterName, 'Specify a WireGuard backend to use. If not set, innernet will auto-select based on availability') [CompletionResult]::new('--mtu', 'mtu', [CompletionResultType]::ParameterName, 'Specify the desired MTU for your interface (default: 1420 for IPv4 and 1400 for IPv6)') [CompletionResult]::new('-v', 'v', [CompletionResultType]::ParameterName, 'Verbose output, use -vv for even higher verbositude') @@ -54,10 +58,13 @@ Register-ArgumentCompleter -Native -CommandName 'innernet' -ScriptBlock { 'innernet;install' { [CompletionResult]::new('--hosts-path', 'hosts-path', [CompletionResultType]::ParameterName, 'The path to write hosts to') [CompletionResult]::new('--name', 'name', [CompletionResultType]::ParameterName, 'Set a specific interface name') + [CompletionResult]::new('--exclude-nat-candidates', 'exclude-nat-candidates', [CompletionResultType]::ParameterName, 'Exclude one or more CIDRs from NAT candidate reporting. ex. --exclude-nat-candidates ''0.0.0.0/0'' would report no candidates') [CompletionResult]::new('--no-write-hosts', 'no-write-hosts', [CompletionResultType]::ParameterName, 'Don''t write to any hosts files') [CompletionResult]::new('--default-name', 'default-name', [CompletionResultType]::ParameterName, 'Use the network name inside the invitation as the interface name') [CompletionResult]::new('-d', 'd', [CompletionResultType]::ParameterName, 'Delete the invitation after a successful install') [CompletionResult]::new('--delete-invite', 'delete-invite', [CompletionResultType]::ParameterName, 'Delete the invitation after a successful install') + [CompletionResult]::new('--no-nat-traversal', 'no-nat-traversal', [CompletionResultType]::ParameterName, 'Don''t attempt NAT traversal. Note that this still will report candidates unless you also specify to exclude all NAT candidates') + [CompletionResult]::new('--no-nat-candidates', 'no-nat-candidates', [CompletionResultType]::ParameterName, 'Don''t report any candidates to coordinating server. Shorthand for --exclude-nat-candidates ''0.0.0.0/0''') [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Prints help information') [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Prints help information') [CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Prints version information') @@ -78,9 +85,12 @@ Register-ArgumentCompleter -Native -CommandName 'innernet' -ScriptBlock { 'innernet;up' { [CompletionResult]::new('--interval', 'interval', [CompletionResultType]::ParameterName, 'Keep fetching the latest peer list at the specified interval in seconds. Valid only in daemon mode') [CompletionResult]::new('--hosts-path', 'hosts-path', [CompletionResultType]::ParameterName, 'The path to write hosts to') + [CompletionResult]::new('--exclude-nat-candidates', 'exclude-nat-candidates', [CompletionResultType]::ParameterName, 'Exclude one or more CIDRs from NAT candidate reporting. ex. --exclude-nat-candidates ''0.0.0.0/0'' would report no candidates') [CompletionResult]::new('-d', 'd', [CompletionResultType]::ParameterName, 'Enable daemon mode i.e. keep the process running, while fetching the latest peer list periodically') [CompletionResult]::new('--daemon', 'daemon', [CompletionResultType]::ParameterName, 'Enable daemon mode i.e. keep the process running, while fetching the latest peer list periodically') [CompletionResult]::new('--no-write-hosts', 'no-write-hosts', [CompletionResultType]::ParameterName, 'Don''t write to any hosts files') + [CompletionResult]::new('--no-nat-traversal', 'no-nat-traversal', [CompletionResultType]::ParameterName, 'Don''t attempt NAT traversal. Note that this still will report candidates unless you also specify to exclude all NAT candidates') + [CompletionResult]::new('--no-nat-candidates', 'no-nat-candidates', [CompletionResultType]::ParameterName, 'Don''t report any candidates to coordinating server. Shorthand for --exclude-nat-candidates ''0.0.0.0/0''') [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Prints help information') [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Prints help information') [CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Prints version information') @@ -89,7 +99,10 @@ Register-ArgumentCompleter -Native -CommandName 'innernet' -ScriptBlock { } 'innernet;fetch' { [CompletionResult]::new('--hosts-path', 'hosts-path', [CompletionResultType]::ParameterName, 'The path to write hosts to') + [CompletionResult]::new('--exclude-nat-candidates', 'exclude-nat-candidates', [CompletionResultType]::ParameterName, 'Exclude one or more CIDRs from NAT candidate reporting. ex. --exclude-nat-candidates ''0.0.0.0/0'' would report no candidates') [CompletionResult]::new('--no-write-hosts', 'no-write-hosts', [CompletionResultType]::ParameterName, 'Don''t write to any hosts files') + [CompletionResult]::new('--no-nat-traversal', 'no-nat-traversal', [CompletionResultType]::ParameterName, 'Don''t attempt NAT traversal. Note that this still will report candidates unless you also specify to exclude all NAT candidates') + [CompletionResult]::new('--no-nat-candidates', 'no-nat-candidates', [CompletionResultType]::ParameterName, 'Don''t report any candidates to coordinating server. Shorthand for --exclude-nat-candidates ''0.0.0.0/0''') [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Prints help information') [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Prints help information') [CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Prints version information') @@ -200,8 +213,11 @@ Register-ArgumentCompleter -Native -CommandName 'innernet' -ScriptBlock { break } 'innernet;set-listen-port' { + [CompletionResult]::new('-l', 'l', [CompletionResultType]::ParameterName, 'The listen port you''d like to set for the interface') + [CompletionResult]::new('--listen-port', 'listen-port', [CompletionResultType]::ParameterName, 'The listen port you''d like to set for the interface') [CompletionResult]::new('-u', 'u', [CompletionResultType]::ParameterName, 'Unset the local listen port to use a randomized port') [CompletionResult]::new('--unset', 'unset', [CompletionResultType]::ParameterName, 'Unset the local listen port to use a randomized port') + [CompletionResult]::new('--yes', 'yes', [CompletionResultType]::ParameterName, 'Bypass confirmation') [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Prints help information') [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Prints help information') [CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Prints version information') @@ -209,8 +225,11 @@ Register-ArgumentCompleter -Native -CommandName 'innernet' -ScriptBlock { break } 'innernet;override-endpoint' { + [CompletionResult]::new('-e', 'e', [CompletionResultType]::ParameterName, 'The listen port you''d like to set for the interface') + [CompletionResult]::new('--endpoint', 'endpoint', [CompletionResultType]::ParameterName, 'The listen port you''d like to set for the interface') [CompletionResult]::new('-u', 'u', [CompletionResultType]::ParameterName, 'Unset an existing override to use the automatic endpoint discovery') [CompletionResult]::new('--unset', 'unset', [CompletionResultType]::ParameterName, 'Unset an existing override to use the automatic endpoint discovery') + [CompletionResult]::new('--yes', 'yes', [CompletionResultType]::ParameterName, 'Bypass confirmation') [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Prints help information') [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Prints help information') [CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Prints version information') diff --git a/doc/innernet.completions.zsh b/doc/innernet.completions.zsh index 3816e19..53d77a5 100644 --- a/doc/innernet.completions.zsh +++ b/doc/innernet.completions.zsh @@ -15,6 +15,10 @@ _innernet() { local context curcontext="$curcontext" state line _arguments "${_arguments_options[@]}" \ +'-c+[]' \ +'--config-dir=[]' \ +'-d+[]' \ +'--data-dir=[]' \ '--backend=[Specify a WireGuard backend to use. If not set, innernet will auto-select based on availability]: :(kernel userspace)' \ '--mtu=[Specify the desired MTU for your interface (default: 1420 for IPv4 and 1400 for IPv6)]' \ '*-v[Verbose output, use -vv for even higher verbositude]' \ @@ -37,10 +41,13 @@ _innernet() { _arguments "${_arguments_options[@]}" \ '--hosts-path=[The path to write hosts to]' \ '(--default-name)--name=[Set a specific interface name]' \ +'*--exclude-nat-candidates=[Exclude one or more CIDRs from NAT candidate reporting. ex. --exclude-nat-candidates '\''0.0.0.0/0'\'' would report no candidates]' \ '(--hosts-path)--no-write-hosts[Don'\''t write to any hosts files]' \ '--default-name[Use the network name inside the invitation as the interface name]' \ '-d[Delete the invitation after a successful install]' \ '--delete-invite[Delete the invitation after a successful install]' \ +'--no-nat-traversal[Don'\''t attempt NAT traversal. Note that this still will report candidates unless you also specify to exclude all NAT candidates]' \ +'(--exclude-nat-candidates)--no-nat-candidates[Don'\''t report any candidates to coordinating server. Shorthand for --exclude-nat-candidates '\''0.0.0.0/0'\'']' \ '-h[Prints help information]' \ '--help[Prints help information]' \ '-V[Prints version information]' \ @@ -52,10 +59,13 @@ _arguments "${_arguments_options[@]}" \ _arguments "${_arguments_options[@]}" \ '--hosts-path=[The path to write hosts to]' \ '(--default-name)--name=[Set a specific interface name]' \ +'*--exclude-nat-candidates=[Exclude one or more CIDRs from NAT candidate reporting. ex. --exclude-nat-candidates '\''0.0.0.0/0'\'' would report no candidates]' \ '(--hosts-path)--no-write-hosts[Don'\''t write to any hosts files]' \ '--default-name[Use the network name inside the invitation as the interface name]' \ '-d[Delete the invitation after a successful install]' \ '--delete-invite[Delete the invitation after a successful install]' \ +'--no-nat-traversal[Don'\''t attempt NAT traversal. Note that this still will report candidates unless you also specify to exclude all NAT candidates]' \ +'(--exclude-nat-candidates)--no-nat-candidates[Don'\''t report any candidates to coordinating server. Shorthand for --exclude-nat-candidates '\''0.0.0.0/0'\'']' \ '-h[Prints help information]' \ '--help[Prints help information]' \ '-V[Prints version information]' \ @@ -93,20 +103,26 @@ _arguments "${_arguments_options[@]}" \ _arguments "${_arguments_options[@]}" \ '--interval=[Keep fetching the latest peer list at the specified interval in seconds. Valid only in daemon mode]' \ '--hosts-path=[The path to write hosts to]' \ +'*--exclude-nat-candidates=[Exclude one or more CIDRs from NAT candidate reporting. ex. --exclude-nat-candidates '\''0.0.0.0/0'\'' would report no candidates]' \ '-d[Enable daemon mode i.e. keep the process running, while fetching the latest peer list periodically]' \ '--daemon[Enable daemon mode i.e. keep the process running, while fetching the latest peer list periodically]' \ '(--hosts-path)--no-write-hosts[Don'\''t write to any hosts files]' \ +'--no-nat-traversal[Don'\''t attempt NAT traversal. Note that this still will report candidates unless you also specify to exclude all NAT candidates]' \ +'(--exclude-nat-candidates)--no-nat-candidates[Don'\''t report any candidates to coordinating server. Shorthand for --exclude-nat-candidates '\''0.0.0.0/0'\'']' \ '-h[Prints help information]' \ '--help[Prints help information]' \ '-V[Prints version information]' \ '--version[Prints version information]' \ -':interface:_files' \ +'::interface:_files' \ && ret=0 ;; (fetch) _arguments "${_arguments_options[@]}" \ '--hosts-path=[The path to write hosts to]' \ +'*--exclude-nat-candidates=[Exclude one or more CIDRs from NAT candidate reporting. ex. --exclude-nat-candidates '\''0.0.0.0/0'\'' would report no candidates]' \ '(--hosts-path)--no-write-hosts[Don'\''t write to any hosts files]' \ +'--no-nat-traversal[Don'\''t attempt NAT traversal. Note that this still will report candidates unless you also specify to exclude all NAT candidates]' \ +'(--exclude-nat-candidates)--no-nat-candidates[Don'\''t report any candidates to coordinating server. Shorthand for --exclude-nat-candidates '\''0.0.0.0/0'\'']' \ '-h[Prints help information]' \ '--help[Prints help information]' \ '-V[Prints version information]' \ @@ -245,8 +261,11 @@ _arguments "${_arguments_options[@]}" \ ;; (set-listen-port) _arguments "${_arguments_options[@]}" \ -'-u[Unset the local listen port to use a randomized port]' \ -'--unset[Unset the local listen port to use a randomized port]' \ +'-l+[The listen port you'\''d like to set for the interface]' \ +'--listen-port=[The listen port you'\''d like to set for the interface]' \ +'(-l --listen-port)-u[Unset the local listen port to use a randomized port]' \ +'(-l --listen-port)--unset[Unset the local listen port to use a randomized port]' \ +'--yes[Bypass confirmation]' \ '-h[Prints help information]' \ '--help[Prints help information]' \ '-V[Prints version information]' \ @@ -256,8 +275,11 @@ _arguments "${_arguments_options[@]}" \ ;; (override-endpoint) _arguments "${_arguments_options[@]}" \ -'-u[Unset an existing override to use the automatic endpoint discovery]' \ -'--unset[Unset an existing override to use the automatic endpoint discovery]' \ +'-e+[The listen port you'\''d like to set for the interface]' \ +'--endpoint=[The listen port you'\''d like to set for the interface]' \ +'(-e --endpoint)-u[Unset an existing override to use the automatic endpoint discovery]' \ +'(-e --endpoint)--unset[Unset an existing override to use the automatic endpoint discovery]' \ +'--yes[Bypass confirmation]' \ '-h[Prints help information]' \ '--help[Prints help information]' \ '-V[Prints version information]' \ diff --git a/server/Cargo.toml b/server/Cargo.toml index faf7f80..1168adf 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.1" +version = "1.5.2" [[bin]] name = "innernet-server" diff --git a/shared/Cargo.toml b/shared/Cargo.toml index cd0e1e4..e7b902b 100644 --- a/shared/Cargo.toml +++ b/shared/Cargo.toml @@ -4,7 +4,7 @@ edition = "2018" license = "MIT" name = "shared" publish = false -version = "1.5.1" +version = "1.5.2" [dependencies] anyhow = "1" diff --git a/wireguard-control-sys/Cargo.toml b/wireguard-control-sys/Cargo.toml index 815a4df..0606b26 100644 --- a/wireguard-control-sys/Cargo.toml +++ b/wireguard-control-sys/Cargo.toml @@ -6,7 +6,7 @@ license = "LGPL-2.1-or-later" name = "wireguard-control-sys" readme = "README.md" repository = "https://github.com/tonarino/innernet" -version = "1.5.1" +version = "1.5.2" [dependencies] libc = "0.2" diff --git a/wireguard-control/Cargo.toml b/wireguard-control/Cargo.toml index 2694f05..999637c 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.1" +version = "1.5.2" [dependencies] base64 = "0.13" @@ -15,7 +15,7 @@ hex = "0.4" libc = "0.2" [target.'cfg(target_os = "linux")'.dependencies] -wireguard-control-sys = { path = "../wireguard-control-sys", version = "1.5.1" } +wireguard-control-sys = { path = "../wireguard-control-sys", version = "1.5.2" } [target.'cfg(not(target_os = "linux"))'.dependencies] rand_core = "0.6"