Commit Graph

184 Commits

Author SHA1 Message Date
Jason A. Donenfeld b20702bfa3 extract-keys: respect compat directives
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-02-20 21:55:44 +01:00
Jason A. Donenfeld 6448d5557c wg-quick: unquote fwmark for bash 4.3
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-02-14 11:41:56 +01:00
Jason A. Donenfeld f60ceb76e6 wg-quick: set LC_ALL for consistent regex
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-02-13 21:55:18 +01:00
Jason A. Donenfeld c8472e2dab socket: enable setting of fwmark
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-02-13 21:55:18 +01:00
Jason A. Donenfeld ef29165cde socket: general ephemeral ports instead of name-based ports
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-02-13 21:55:17 +01:00
Jason A. Donenfeld cf2cb85a08 wg-quick: support v6 dual stack
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-02-13 21:55:17 +01:00
Jason A. Donenfeld 3606898d23 wg: remove key for any empty file
Rather than just using /dev/null to mean key removal, match on any empty
file, so that this interface is cross platform.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-02-07 12:21:22 +01:00
Jason A. Donenfeld 666623a82e wg: setconf should remove existing psk
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-02-07 12:21:22 +01:00
Jason A. Donenfeld 4586e14749 wg-quick: recommend using resolvconf in exclusive mode
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-01-19 00:07:31 +01:00
Jason A. Donenfeld db4f06d118 wg: man: recommend correct port
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-01-15 22:22:45 +01:00
Jason A. Donenfeld 1d20912898 wg-quick: parse IPv6 endpoints correctly
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-01-15 13:01:06 +01:00
Jason A. Donenfeld 035a649641 wg-quick: better removal of suppress_prefix rule
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-01-11 00:29:58 +01:00
Jason A. Donenfeld 396dc76a04 Update copyright
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-01-10 06:36:19 +01:00
Jason A. Donenfeld f43b43376b uapi: use sockaddr union instead of sockaddr_storage
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-01-10 06:29:24 +01:00
Jason A. Donenfeld 48f7c3522a uapi: use flag instead of C bitfield for portability
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-01-10 05:36:43 +01:00
Jason A. Donenfeld 12904a1095 wg: ipc: read from socket incrementally
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-01-10 05:36:43 +01:00
Jason A. Donenfeld e92e0dca14 wg: error on short ret reads
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-01-10 05:36:43 +01:00
Jason A. Donenfeld 16060516bb wg-quick: enforce good permissions
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-01-09 00:22:21 +01:00
Jason A. Donenfeld bf5d24eca4 wg: add installation note for distros
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-01-05 19:41:23 +01:00
Christian Hesse d2f244b136 wg: remove DESTDIR for autodetection
DESTDIR is always empty, no need to check anything there. Check the main
system instead.

Signed-off-by: Christian Hesse <mail@eworm.de>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-01-05 02:30:20 +01:00
Jason A. Donenfeld 6b940830e9 wg: add systemd unit and auto-detection
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-01-05 02:30:20 +01:00
Jason A. Donenfeld 7c202eb5fc wg: add makefile instructions
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-01-05 02:30:20 +01:00
Jason A. Donenfeld e975597e72 wg: add wg-quick
This is based on wg-config, but is even easier to use, and now makes
our full tools suite.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-01-05 02:30:20 +01:00
Jason A. Donenfeld bf158a73fe wg: add bash completion for wg(8)
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-01-04 07:15:11 +01:00
Jason A. Donenfeld fd9e737c72 contrib: slight ncat tweak
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-01-03 06:06:59 +01:00
Jason A. Donenfeld ae82dcfed3 wg: syscall.h should actually be sys/syscall.h
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-12-30 17:53:05 +01:00
Jason A. Donenfeld 87abf354f1 wg-config: use ip rules instead of tungate
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-12-30 17:50:19 +01:00
Jason A. Donenfeld 09c726a72f external-tests: update to latest
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-12-25 21:01:06 +01:00
Tomasz Torcz f3a1f15186 wg: rename 'bandwidth' to 'transfer' in output
'bandwidth' is a measure of speed, but wg's output shows only the
number of bytes transferred. Thus 'transfer' is a better label.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-12-23 22:22:08 +01:00
Jason A. Donenfeld f4cf3ae124 wg-config: cleanups
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-12-23 21:09:23 +01:00
Jason A. Donenfeld a488f1b084 wg: do not use AI_ADDRCONFIG
Some people run wg(8) using hard coded v6 addresses before interfaces
have v6 addresses, causing getaddrinfo to fail. Since AI_ADDRCONFIG
doesn't actualy change the sorting, but just the queries made, we don't
really need AI_ADDRCONFIG anyway, since we're always only taking the
first result.

Reported-by: Benedikt Morbach <benedikt.morbach@googlemail.com>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-12-23 21:09:23 +01:00
Jason A. Donenfeld b5415c0b65 wg: allowed-ips is easier to parse with spaces instead of ", "
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-12-23 21:09:23 +01:00
Jason A. Donenfeld 50e1f58fde wg-config: cleanup ip parsing
This also sorts routes by cidr.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-12-23 21:09:23 +01:00
Jason A. Donenfeld 187bf98339 wg: fix latest-handshake typo in documentation
Reported-by: Dan Lüdtke <mail@danrl.com>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-12-16 06:35:58 +01:00
Jason A. Donenfeld f03aea7574 contrib: add wg-config
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-12-09 21:31:11 +01:00
Jason A. Donenfeld 9707e5d6af wg: warn about clock going backward
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-11-29 20:56:41 +01:00
Jason A. Donenfeld 16a6972bb6 headers: cleanup notices
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-11-21 01:00:07 +01:00
Jason A. Donenfeld 3338bb11e8 wg: chill modern gcc out
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-11-05 21:45:12 +01:00
Jason A. Donenfeld ff52c3e3a4 qemu: move build outside of kernel dir to avoid kernel's make clean
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-11-05 13:22:55 +01:00
Jason A. Donenfeld a97901e4fd wg: abstract pkg-config to PKG_CONFIG
Distros like Exherbo have multitarget setups with toolnames prefixed by
the arch.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-11-02 11:50:52 +01:00
Jason A. Donenfeld 971c792ba9 wg: everybody hates automatic stripping
I happen to like it, but package managers don't. The GNU standard [1]
says there should be a separate install-strip target. I don't like
duplicating code like that. So, instead, I'll just remove stripping all
together.

[1] https://www.gnu.org/prep/standards/html_node/Standard-Targets.html

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-11-02 11:49:07 +01:00
Jason A. Donenfeld 17aa3e35c6 git: organize ignore files
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-09-29 19:31:22 +02:00
Jason A. Donenfeld 8a57a2cefb Rework headers and includes
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-09-29 19:25:30 +02:00
Jason A. Donenfeld 967ea8c712 wg: allow multiple AllowedIPs invocations
It turns out this is a somewhat natural thing to do in config files.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-08-30 04:35:51 +02:00
Jason A. Donenfeld cb8be29c18 examples: add key extractor
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-08-26 04:52:50 +02:00
Jason A. Donenfeld 62fe72133c examples: add nat-hole-punching
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-08-24 15:47:31 +02:00
Jason A. Donenfeld aae568937e tests: use makefile and expand greatly
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-08-08 15:44:42 +02:00
Jason A. Donenfeld 822ae991d8 persistent-keepalive: change range to [1,65535]
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-08-08 14:05:37 +02:00
Jason A. Donenfeld e938263886 wg: use correct headers in ipc
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-08-02 02:55:43 +02:00
Jason A. Donenfeld db69cc7119 wg: do not show private keys in pretty output
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2016-08-02 02:55:43 +02:00