Commit Graph

132 Commits (70e36369b41539a9da85ffd3d07462f24faf4e5f)

Author SHA1 Message Date
Ryo Kawaguchi 3c69de4e4e
Add a new client / server command to rename CIDR (#310)
* Add a new client / server command to rename CIDR.

* Add a docker test case

* Apply suggestions from code review

Co-authored-by: Matěj Laitl <matej@laitl.cz>
Co-authored-by: Jake McGinty <me@jakebot.org>

---------

Co-authored-by: Matěj Laitl <matej@laitl.cz>
Co-authored-by: Jake McGinty <me@jakebot.org>
2024-04-23 06:12:36 +09:00
Saber Haj Rabiee 15602388f6
fix nightly build (#304)
* fix nightly build

* update toml dep in server for consistency

* cargo update

* fix clippy errors
2024-04-19 00:09:23 +09:00
Brian Schwind 4fb77f8eda
Report wireguard endpoint as a candidate when an endpoint override is in place (#305)
* Use our Endpoints type alias

* Add the recent wireguard endpoint to NAT candidates if a peer has an endpoint override

* Simplify logic in the inject_endpoints() function

Co-authored-by: Matěj Laitl <matej@laitl.cz>

* Specify mock wireguard endpoints for developer 1 and 2 in the test data

* Add a test for verifying the wireguard endpoint is returned in the list of NAT candidates

* Remove FromStr usage

* Appease clippy

---------

Co-authored-by: Matěj Laitl <matej@laitl.cz>
2024-04-03 13:45:52 +09:00
Linus Kendall aa1ac515e8
Add CLI parameters for disable/enable peer (#248)
* Add CLI parameters for disable/enable peer

Fixes tonarino/innernet#214.

* Formatting

* Remove redundant clones

* Require name for yes param

Yes param only makes sense if name is provided.

* Formatting
2024-01-15 22:43:00 +01:00
Brian Schwind 489f505f67
meta: release v1.6.1 (#295)
Co-authored-by: straylight-annex-portal <tonari@straylight-annex-portal>
2023-12-27 12:42:31 +09:00
Matěj Laitl 8d058c8d87
meta: release v1.6.0 (ran on Linux) (#270)
* meta: release v1.6.0

* README: update release steps
2023-06-14 10:49:16 +02:00
Matěj Laitl c629e01076
meta: add Brian, Ryo, Matěj as authors, canonicalize Jake's email (#267)
* meta: add Brian, Ryo, Matěj as authors, canonicalize Jake's email

Follow-up to #252.

* Also update shared/Cargo.toml

Co-authored-by: Jake McGinty <me@jakebot.org>

---------

Co-authored-by: Jake McGinty <me@jakebot.org>
2023-06-06 12:21:11 +09:00
Jake McGinty 33cee129d1
Various dependency updates (#265)
* update netlink-*, toml, clap, other small dependencies
* switch back to x25519-dalek from curve25519-dalek
2023-06-01 01:25:46 -05:00
Jake McGinty ebeac3db76 migrate from lazy_static to once_cell across project 2023-05-30 11:24:40 +02:00
Jake McGinty b4df350b1c meta: update jake's email address 2023-04-15 08:45:11 +02:00
Matěj Laitl 0dc92de722 Auto-apply clippy lint fixes from Rust 1.67 2023-02-05 03:13:54 +09:00
Matěj Laitl 2859684864 cargo clippy --fix --all-targets (clippy 1.66)
This is exclusively (if I look correctly) redundant referencing.
2023-01-03 22:42:50 +01:00
Jake McGinty eac6071d7a meta: release v1.5.5 2022-09-23 23:16:35 -05:00
Jake McGinty f36eb301ce server: fix clippy nit in linux-only code 2022-09-23 23:07:57 -05:00
Jake McGinty b39b77aa5a meta: appease clippy 2022-09-23 23:43:33 -04:00
Jake McGinty 1fb5874527 meta: appease clippy 2022-08-10 16:39:09 -06:00
Jakob-Niklas See 15594d4458
server: Implement disable-peer and enable-peer commands (#226)
* client: Update enable_or_disable_peer exit message to be more accurate

* server: Implement disable-peer and enable-peer commands

* server: Immediately apply enable- and disable-peer to device
2022-08-11 06:13:55 +09:00
Jake McGinty 047660733b server: add link in comment for rusqlite musl workaround 2022-08-10 14:21:11 -06:00
P Stark 0fb0ac7ab1
server: statically link to sqlite3 when targeting musl (#231)
- fix #228
- the musl libc is used on Alpine, a minimal linux distribution commonly
  used in docker images. It's also used on OpenWRT which might be of
  interest to innernet.
2022-08-11 05:16:31 +09:00
Matěj Laitl 144c2f654e Fix clippy warnings
Especially https://rust-lang.github.io/rust-clippy/master/index.html#format_push_string was a bit
more involved, review requested.
2022-08-01 10:57:11 +02:00
Matěj Laitl 986a47fab3 Update sqlite dependencies + cargo update
Let's see if that helps with #228.
2022-08-01 10:57:11 +02:00
Jon Prentice 43a9d51091
Added missing --yes flag to innernet-server uninstall command (#221) 2022-05-20 11:02:17 +09:00
Jake McGinty a6c918a581 meta: release v1.5.4 2022-03-16 18:17:37 +09:00
Jake McGinty be8786a11c meta: release v1.5.4-beta.5 2022-03-15 11:15:56 +09:00
Jake McGinty e544391303 meta: update dependencies 2022-03-15 10:47:52 +09:00
Jake McGinty 3bfd81d8ed meta: release v1.5.4-beta.4 2022-02-18 10:57:22 +09:00
Jake McGinty 123977be34 meta: cargo update 2022-02-17 09:53:59 +09:00
Jake McGinty c4c34d5c10 wireguard-control: {generate => get}_public() 2022-02-04 17:56:18 -06:00
Jake McGinty 80a070baae meta: release v1.5.4-beta.3 2022-02-05 04:18:39 +09:00
Jake McGinty c7a2f7391c meta: release v1.5.4-beta.2 2022-02-03 01:50:39 +09:00
Jake McGinty f7df6bab01 meta: release v1.5.4-beta.1 2022-02-01 14:04:11 +09:00
Jake McGinty a77cbb4f49
meta: switch from ipnetwork to ipnet (#193) 2022-02-01 14:01:21 +09:00
Jake McGinty b6ce16bc00
server: add better validation to the associations endpoint (#194) 2022-02-01 13:53:31 +09:00
Jake McGinty 4715cd0c87 meta: release v1.5.3 2022-02-01 04:56:11 +09:00
Jake McGinty 49aaa3907a meta: cargo update 2022-02-01 04:27:24 +09:00
Jake McGinty 050ce1362a meta: fix new cargo clippy warnings 2022-02-01 04:20:21 +09:00
Jake McGinty 4000d84648 meta: release v1.5.3-beta.5 2022-01-22 18:08:31 +00:00
Jake McGinty 16ac280807 meta: release v1.5.3-beta.4 2022-01-18 15:56:36 +09:00
Jake McGinty b53376b9c8 meta: release v1.5.3-beta.3 2022-01-18 15:19:53 +09:00
Jake McGinty ce23bbdf63 meta: release v1.5.3-beta.2 2022-01-12 16:31:31 -06:00
Jake McGinty b15b541669 meta: release v1.5.3-beta.1 2022-01-11 14:18:19 -06:00
Matěj Laitl 1b260823f9
client, server systemd units: make Restart=always truly respected (#184)
Surprisingly, Restart=always may not _always_ restart the unit if it restarts too fast.

Set a combination of options which should make systemd truly restart innernet always.
See https://unix.stackexchange.com/q/289629/352972.

The `RestartSec=60` is the main and important one which would prevent systemd from ever failing
to restart innernet in the default settings (because with it it would never exceed the default
limit of 5 restarts in 10 seconds).

`StartLimitIntervalSec=0` option is a complementary one for explicitly disabling the logic, and
may be removed from this PR if deemed unnecessary.
2022-01-12 04:58:28 +09:00
Jake McGinty 0423e78683 server: cargo fmt 2022-01-11 01:54:59 -06:00
Jake McGinty 5c72592069 meta: rust edition 2018 -> 2021 2022-01-11 01:54:43 -06:00
Jake McGinty 8dd11977af meta: structopt 0.3 -> clap 3 2022-01-11 01:51:32 -06:00
Jake McGinty 6be3e61074 meta: release v1.5.2 2021-12-06 02:35:18 +09:00
Jake McGinty ae2c554b23
{client, server}: make config/data directories configurable (#172)
* client: allow config/data dirs to be changed

* server: allow config/data dirs to be changed

* meta: cargo clippy & cargo fmt

* shared: use const for Duration instead of lazy_static
2021-11-15 18:11:13 +09:00
Jake McGinty d7c491c8f3 client: granular control over NAT traversal
added to `innernet {up,fetch,install}`:

  --no-nat-traversal: Doesn't attempt NAT traversal
    (prevents long time delays in execution of command)

  --exclude-nat-candidates: Exclude a list of CIDRs from being
    considered candidates

  --no-nat-candidates: Don't report NAT candidates.
    (shorthand for '--exclude-nat-candidates 0.0.0.0/0')

Closes #160
2021-11-12 14:42:10 +09:00
Jake McGinty 9a59ac3094 meta: release v1.5.1 2021-11-11 18:42:21 +09:00
Jake McGinty 991c6435c1 client: wait after updating interface before attempting NAT traversal
otherwise, the server-reported IP itself won't have time to check
if a handshake succeeds or not.
2021-11-11 18:34:31 +09:00