Commit Graph

342 Commits (950be7d1417fd7ca7d702b36afd0cf9f7fe83ce5)

Author SHA1 Message Date
Tianon Gravi 072ac4bf96
client: fix minor typo ("exhuasted") (#155) 2021-09-18 13:16:27 +09:00
Jake McGinty 1b983d636d meta: release v1.5.0 2021-09-17 14:18:09 +09:00
Jake McGinty 9b1315b079 meta: release v1.5.0-beta.5 2021-09-16 02:00:03 +09:00
Jake McGinty b7b50d0156 release.sh: make sure wireguard-control-sys version is synced 2021-09-16 01:59:52 +09:00
Matěj Laitl 72353ed7a9
Clippy all targets (#153)
* Fix clippy lints in tests

* CI: let clippy lint also tests

They deserve equal clippy love, right? :)
2021-09-15 23:47:24 +09:00
Jake McGinty 4265a1fbf1 docker-tests: speed up tests, combine client and server into one image 2021-09-15 22:57:48 +09:00
Jake McGinty 74eda56cbe docker-tests: remove cargo-chef from image (broke build) 2021-09-15 22:05:59 +09:00
Jake McGinty dff3b4d4ee wireguard-control: update wireguard-control-sys version 2021-09-15 21:35:21 +09:00
Jake McGinty ae89e06655 meta: make clippy happy 2021-09-15 21:18:04 +09:00
Jake McGinty cacd80b283 server: prompt for listen port before endpoint
also fix a logic bug if user cancels port selection in client
when trying to override endpoint.

fixes #148
2021-09-15 20:43:40 +09:00
Jake McGinty 4fa689d400 meta: rename wgctrl to wireguard-control
in preparation for publishing on crates.io
2021-09-15 12:43:20 +09:00
Jake McGinty 454e5458c1 meta: release v1.5.0-beta.4 2021-09-14 23:18:30 +09:00
Jake McGinty f774a5f97c client: print endpoint reported by wireguard, not server
thanks again @strohel :)
2021-09-14 23:12:12 +09:00
Jake McGinty b179a62a22 client: always show yourself as 'conneted' to avoid confusion 2021-09-14 22:49:08 +09:00
Jake McGinty dcdaefd1ff meta: release v1.5.0-beta.3 2021-09-14 22:34:08 +09:00
Jake McGinty 7ceebccbfa client: fix logical inverse in is_recently_connected indicator
thanks @strohel!!
2021-09-14 22:33:49 +09:00
Jake McGinty 2a640fd9b2 meta: release v1.5.0-beta.2 2021-09-14 17:59:48 +09:00
Jake McGinty ecdfd7f6d2 meta: cargo update 2021-09-14 17:58:22 +09:00
Jake McGinty 62821d5bdf client: update hosts even when you're the only peer on the network
Fixes #144
2021-09-14 17:57:07 +09:00
Jake McGinty dbb499a848 meta: release v1.5.0-beta.1 2021-09-14 17:26:46 +09:00
Jake McGinty c4d41b805a release.sh: support latest cargo-release 2021-09-14 17:26:11 +09:00
Jake McGinty c94d9d2c03 shared: fix chmod in InterfaceConfig 2021-09-14 17:16:16 +09:00
Jake McGinty cf3510918a
server: report local candidates for peers to connect (#151)
Before, only clients would report local addresses for NAT traversal. Servers should too! This will be helpful in common situations when the server is run inside the same LAN as other peers, and there's no NAT hairpinning enabled (or possible) on the router.

closes #146
2021-09-14 15:48:27 +09:00
Fabian Affolter df877d2de8
Add section about the removal of networks (#142) 2021-09-14 12:27:34 +09:00
tommie 120ac7d6b1
add "wireguard" as a recommended dependency for Debian. (#149)
It's very likely a user will want at least wireguard-dkms, and having
the userspace tools might be useful in an emergency. This metapackage
draws in both.

For automated installations in e.g. containers, use

    apt install --no-install-recommends

to avoid installing recommended packages.
2021-09-14 12:27:10 +09:00
Jake McGinty d4822afc98 meta: cargo clippy & fmt 2021-09-14 12:24:04 +09:00
Jake McGinty b395f7f736 wgctrl-rs(userspace): fix linux build 2021-09-13 02:17:44 +09:00
Jake McGinty b3d2d7f2eb wgctrl-rs(userspace): remove subtle as dependency 2021-09-13 02:15:47 +09:00
Jake McGinty c652a8f799 wgctrl-rs: no longer expose bytes of Key publicly 2021-09-13 02:05:57 +09:00
Jake McGinty fa52dade2e wgctrl-rs(userspace): use curve25519-dalek directly instead of x25519-dalek
This removes our need to use a forked version that had an updated rand dependency
2021-09-13 02:00:29 +09:00
Jake McGinty c618d7949b meta: cargo update && cargo fmt 2021-09-13 00:48:49 +09:00
Jake McGinty 42eb0a7589 client: wait for newline for uninstall
fixes #145
2021-09-13 00:46:06 +09:00
Jake McGinty 2a5a820bc2 client: create new data stores with 600 permissions
fixes #147
2021-09-13 00:43:53 +09:00
Jake McGinty 3689b068a2 shared: create dirs with 700 permissions
Closes #150
2021-09-13 00:43:27 +09:00
Jake McGinty f715689540 shared(wg): remove leftover debug println on macOS
Closes #143
2021-09-12 20:34:02 +09:00
Jake McGinty 22203e63d0 server: addd ipv6 tests as feature flag alongside ipv4 2021-09-05 23:50:09 +09:00
Jake McGinty 9c5380c7f8 client, server: forbid using reserved IPv6 anycast addresses as unicast
Previously, we treated all IPv6 addresses as assignable, but that causes
problems with setups that expect the first address in a subnet to be the
router anycast address.

Note that this does not fix existing innernet networks, and those
experiencing this problem are advised to revised to recreate their
network after this fix has been merged. Sorry for the annoyance.

Fixes #131
2021-09-05 23:50:09 +09:00
Jake McGinty 20a07cf8fd client: don't show Linux instructions outside of linux
fixes #128
2021-09-05 16:37:58 +09:00
Jake McGinty b7de9cdc47
fix SQLite bug when migrating database from 1 to 2 (#136) 2021-09-02 02:25:34 +09:00
Jake McGinty 8903604caa
NAT traversal: ICE-esque candidate selection (#134)
This change adds the ability for peers to report additional candidate endpoints for other peers to attempt connections with outside of the endpoint reported by the coordinating server.

While not a complete solution to the full spectrum of NAT traversal issues (TURN-esque proxying is still notably missing), it allows peers within the same NAT to connect to each other via their LAN addresses, which is a win nonetheless. In the future, more advanced candidate discovery could be used to punch through additional types of NAT cone types as well.

Co-authored-by: Matěj Laitl <matej@laitl.cz>
2021-09-01 18:58:46 +09:00
Jake McGinty fd06b8054d shared(types): better self-documenting REJECT_AFTER_TYPE... type 2021-08-10 15:51:51 +09:00
Matěj Laitl eb90cc53a5
Fix clippy warnings, add clippy to CI (#127)
* Tidy code a bit thanks to clippy

Clippy 1.54 newly detects some redundant constructs, that's nice.

sort_unstable() should yield exact same results as sort() for `Vec<&str>`
and could be faster, clippy says.

* Add clippy to CI
2021-08-09 20:35:42 +09:00
Jake McGinty e97eb737a4
shared(PeerDiff): refactor struct and update peer endpoints only when handshake failed
The past behavior of clients was to, on every fetch from the server, update each of its peer's endpoints with the one reported from the server. While this wasn't a problem on certain types of NATs to help with holepunching, in some situations it caused previously working connections to no longer work (when one peer had a port-restricted or symmetric cone type NAT).
2021-08-05 09:38:14 +09:00
Jake McGinty b169435355 meta: release v1.4.1 2021-08-03 01:26:38 +09:00
Jake McGinty 89f2e813cf client(install): fix install check failure when /var/run/wireguard doesn't exist 2021-08-03 00:44:06 +09:00
Jake McGinty 82325509db meta: cargo clippy & fmt 2021-08-02 23:10:20 +09:00
Jake McGinty 61b055c44b client(install): bail if WireGuard interface with same name exists
Closes #113
2021-08-02 23:07:45 +09:00
Jake McGinty 40e8ca68f9
wgctrl-rs(userspace): gracefully handle stale `.name` files on macOS
* wgctrl-rs(userspace): clean stale namefiles on starting up interface

Fixes #114

* wgctrl-rs(userspace): check connectability of interface socket in enumerate()
2021-08-02 22:12:29 +09:00
Jake McGinty bbfb11e175 meta: cargo update & clippy fixes 2021-07-27 14:14:50 +09:00
Jake McGinty 26b962bea0 client: add debug info for peer endpoint changes on update 2021-07-15 15:54:31 +09:00