1
0
mirror of https://github.com/tonarino/innernet.git synced 2026-04-26 20:02:40 +02:00
Commit Graph

164 Commits

Author SHA1 Message Date
Marek Bernat a5518014f8 Fix rustdoc lints (#383) 2026-02-27 00:04:20 +09:00
Štěpán Mikéska e7f05db9c1 Add CLI option for a custom host suffix (#373)
* client, server:  option for custom host suffixes

* shared: Better wording in the doc

* client, shared: nits and formatting

* shared: underscore to dash in option name

---------

Co-authored-by: Štěpán Mikéska <stepan@nesp.im>
2025-11-27 09:19:11 +01:00
Marek Bernat 368ca55319 meta: release v1.7.1 (#372) 2025-11-10 17:26:58 +09:00
Brian Schwind 54f0630ff7 Properly filter out loopback links (#370)
* Properly filter out loopback links

* Tell clippy to shut up
2025-11-07 17:24:12 +09:00
Marek Bernat b35d243126 Use interact_text() to work around an initial text bug (#359) 2025-08-13 13:33:53 +00:00
Marek Bernat f0f4130472 meta: release v1.7.0 (#361) 2025-08-13 19:08:54 +09:00
Matěj Laitl a8c4874f9a Prepare for the release, publishing all packages (#360)
* Fix README links in client, server

* Make all crates publishable: fill metadata, publish = true

* hostsfile: sync version, specify version when depending on it

* publicip: add innernet- prefix, sync version, depend on version

* shared: add innernet- prefix, depend on version

* wireguard-control: depend on version

* netlink-request: depend on version

* Update release script and documentation

* Update README to install using crates.io

We could also simplify release.sh, removing the last occurrence of `perl`.

* Update README.md

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

---------

Co-authored-by: Marek Bernat <mbernat@users.noreply.github.com>
2025-08-13 09:58:51 +02:00
Marek Bernat facbc9585c Workaround for prefilled prompts (#357) 2025-08-12 17:04:00 +09:00
Marek Bernat 687f0a8198 Add a /user/capabilities endpoint with server capabilities (#353) 2025-08-08 18:17:49 +09:00
Ryo Kawaguchi 125bdc5693 Support override-endpoint with an unspecified IP address (#315)
Co-authored-by: Marek Bernat <mbernat@users.noreply.github.com>
2025-08-08 08:38:08 +00:00
Brian Schwind a3cd437a3e Periodically write a hostfile on the innernet server when running the 'serve' command (#336) 2025-08-07 14:45:58 +00:00
Jake McGinty 1c99755bb9 publicip: use quad9 resolver instead of cloudflare (#337)
* publicip: use quad9 resolver instead of cloudflare

* Add reference to Quad9 addresses

Co-authored-by: Jen Tak <jentak@hey.com>

* update comments and prompt text

---------

Co-authored-by: Jen Tak <jentak@hey.com>
2025-08-07 12:03:17 +09:00
alpn 5912c14c1a Add support for OpenBSD (#347)
* platform: add initial placeholders for OpenBSD support

* platform: implement wg device enumeration for OpenBSD

* rename and move new_peer_info()  -> PeerInfo::new()

* platform: implement get_by_name() for OpenBSD

* platform/OpenBSD: clean up imports

* platform/OpenBSD: implement apply()

* platform/OpenBSD: implement delete_interface()

* platform/OpenBSD: implement wg::set_addr(), wg::set_up()

* platform/OpenBSD: handle DeviceUpdate::replace_peers and
PeerConfigBuilder::remove_me

* platform/OpenBSD: rename Backend::KernelOpenBSD -> Backend::OpenBSD

* platform/OpenBSD: fix setting default backend to Backend::OpenBSD

* platform/OpenBSD: add a simple test

* remove unused imports

* increase the timeout duration for API requests by the client

* rustfmt

* clippy: use Error::other(_) instead of Error::new(ErrorKind::Other, _)
see - https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error

* rustfmt

* platform/OpenBSD: add missing command status check

* Cargo.toml: restrict nix dependency to OpenBSD platform

* device: rename PeerInfo::new() -> PeerInfo::from_public_key()

* platform/OpenBSD: adjust default path values for data_dir

* client: adjust api agent timeout and document reason

* cargo fmt

* shared: refactor Error::new(ErrorKind::Other,) -> Error::other()

* cargo fmt --all

* simplify #[cfg] directives + formatting
2025-08-05 12:08:44 +02:00
Matěj Laitl 05b3a6aea9 Fix clippy 1.88 lints (inline variable formatting) (#350) 2025-07-09 13:32:04 +02:00
Matěj Laitl 5b8a7334e1 Fix clippy 1.83 warnings (elide lifetimes, use non_exhaustive) (#326)
* Fix clippy 1.83 warnings (elite lifetimes, use non_exhaustive)

* Use a newer version of libclang (#339)

---------

Co-authored-by: Brian Schwind <brianmschwind@gmail.com>
2025-03-13 13:55:21 +09:00
Florian Badie b2e414984e Update netlink-packet-route to 0.21 (#324)
Fixes: https://github.com/tonarino/innernet/issues/303
2024-10-24 09:42:39 +02:00
refi64 dbac0dc530 hostsfile: Copy the SELinux context to the temp file before overwrite (#273)
* hostsfile: Copy the SELinux context to the temp file before overwrite

On SELinux-enabled systems, /etc/hosts has a different type `net_conf_t`
than the other files in /etc, so the temporary file that overwrites it
ends up with the wrong context, resulting in many system services
becoming unable to access the file. To fix this, manually look up the
context /etc/hosts has and copy it to the temporary file before
the rename.

In order to avoid depending on libselinux on systems that don't use it,
this support is gated behind the new "selinux" feature. It *is*
installed and enabled in the Dockerfile, however, in order to ensure
that it still builds.

* Appease clippy

* Add info about selinux feature to README.md

* Remove unused ClientError struct

* Reformatted & repositioned and improved doc about selinux

---------

Co-authored-by: Brian Schwind <brianmschwind@gmail.com>
Co-authored-by: Jürgen Botz <jurgen@botz.org>
2024-07-01 10:16:43 +09:00
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
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 b385ec6549 Fix clippy 1.72 and 1.73 lints (#289)
Classic PR of mine.
2023-10-16 09:22:53 +02:00
Matěj Laitl b90024d3d3 Update netlink ecosystem packages (#281)
Should fix https://github.com/tonarino/innernet/issues/280

Co-authored-by: Jake McGinty <me@jakebot.org>
2023-08-19 11:00:02 +00: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
Brian Schwind 0057a703ff Turn ChangeString into a PeerChange enum (#263)
* Turn ChangeString into a PeerChange enum, don't print NAT traversal reattempt as a modification

* Remove the ChangeString type

* Fix a stupid copy-paste error
2023-06-01 12:11:31 +09:00
Jake McGinty ebeac3db76 migrate from lazy_static to once_cell across project 2023-05-30 11:24:40 +02:00
Matěj Laitl 0dc92de722 Auto-apply clippy lint fixes from Rust 1.67 2023-02-05 03:13:54 +09:00
Jake McGinty eac6071d7a meta: release v1.5.5 2022-09-23 23:16:35 -05:00
Jake McGinty eb5b5370df meta: cargo update 2022-09-23 23:38:23 -04:00
Jake McGinty e98c0659ef meta: cargo fmt 2022-08-10 16:40:32 -06:00
Jake McGinty 1fb5874527 meta: appease clippy 2022-08-10 16:39:09 -06:00
Jake McGinty c9dbeefaaa shared: update nix to 0.24 2022-08-10 16:30:45 -06:00
Jake McGinty 55671ec80a meta: cargo update 2022-08-10 15:58:46 -06:00
Richard Schneider ca22927558 External endpoint IP prompt change (#222)
* Change phrasing of external IP address prompt

* Remove println! call in ask_endpoint
2022-08-11 06:16:12 +09:00
Ali MJ Al-Nasrawy df3b4ae78f avoid a rustc bug
context: https://github.com/rust-lang/rust/pull/98835
2022-08-01 13:43:43 +02: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 bb6bac3964 meta: cargo fmt 2022-03-15 11:07:05 +09:00
Jake McGinty 5e645ef9f5 shared: set default mtu of 1280 2022-03-15 11:01:26 +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 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 9ba864be56 meta: cargo fmt 2022-02-05 04:18:05 +09:00
Jake McGinty 83e0750cde client: set default MTU to 1412 for all interfaces
Since peer endpoints can be either IPv4 or IPv6, it doesn't make sense
to specify a default MTU that could only work with IPv4 based on only
the server's endpoint.

Setting to 1412 instead of 1420 in order to accomodate PPPoE peers,
which should fit most internet situations.
2022-02-05 04:15:28 +09:00
Jake McGinty c7a2f7391c meta: release v1.5.4-beta.2 2022-02-03 01:50:39 +09:00
Jake McGinty 6d26385ba3 client: re-attempt NAT traversal on all unconnected peers (#195)
fixes #173
2022-02-03 01:49:51 +09:00
Jake McGinty f7df6bab01 meta: release v1.5.4-beta.1 2022-02-01 14:04:11 +09:00