aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/contrib (follow)
Commit message (Collapse)AuthorAgeFilesLines
* reresolve-dns: use $EPOCHSECONDS instead of $(date +%s)Jason A. Donenfeld2022-01-041-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* embeddable-wg-library: add named wg_endpoint unionMikael Magnusson2021-10-221-5/+7
| | | | | | | | Define wg_endpoint as a named union to allow users of the emeddable library to use the type in function arguments, variables etc. Signed-off-by: Mikael Magnusson <mikma@users.sourceforge.net> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* contrib/launchd: fix xml syntax errorHangbin Liu2021-05-171-1/+1
| | | | | | | | | | | | | The current plist xml gets error "DOCTYPE improperly terminated" with xml syntax checker[1]. The example in apple doc[2] also doesn't have semicolon at the end of DOCTYPE line. [1] https://www.w3schools.com/xml/xml_validator.asp [2] https://opensource.apple.com/source/launchd/launchd-257/launchd/doc/HOWTO.html Fixes: b30e74b5956a ("wg-quick: darwin: support being called from launchd") Signed-off-by: Hangbin Liu <liuhangbin@gmail.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* sticky-sockets: do not use SO_REUSEADDRJason A. Donenfeld2020-12-181-8/+0
| | | | | | This makes little sense for unicast UDP sockets. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* embeddable-wg-library: sync latest from netlink.hJason A. Donenfeld2020-10-291-32/+35
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* wg-quick: support dns search domainsJason A. Donenfeld2020-05-092-7/+10
| | | | | | | If DNS= has an IP in it, treat it as a DNS server. If DNS= has a non-IP in it, treat it as a DNS search domain. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* highlighter: insist on 256-bit keys, not 257-bit or 258-bitJason A. Donenfeld2020-04-031-1/+22
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* embeddable-wg-library: use newer string_listJason A. Donenfeld2020-02-032-58/+42
| | | | | | This ports 1d2d6200b8ff517db0f7530645180df3cc4afa74. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* extract-{handshakes,keys}: rework for upstream kernelJason A. Donenfeld2020-02-014-16/+6
| | | | | | | Now that WireGuard has been upstreamed and the repos split, we have to look elsewhere for these headers. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: bump copyrightJason A. Donenfeld2020-01-0226-26/+26
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* dns-hatchet: adjust path for new repo layoutJason A. Donenfeld2019-12-261-1/+1
| | | | | Reported-by: Joe Doss <joe@solidadmin.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: fix up spellingJosh Soref2019-12-121-2/+2
| | | | | Signed-off-by: Josh Soref <jsoref@gmail.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* reresolve-dns: remove invalid anchors on regex matchJason A. Donenfeld2019-11-271-1/+1
| | | | | Reported-by: Conrad Meyer <cem@freebsd.org> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* wg-quick: darwin: support being called from launchdJason A. Donenfeld2019-06-242-0/+37
| | | | | | | | This causes wg-quick up to wait for the monitor to exit before it exits, so that launchd can correctly wait on it. Reported-by: Cameron Palmer <cameron@promon.no> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* wg: genkey: account for short reads of /dev/urandomJason A. Donenfeld2019-02-281-6/+11
| | | | | | | | | | | Apparently Haiku has a misbehaving /dev/urandom. While we're at it, simplify the function signature to completely succeed or completely fail and make sure the caller checks the result. Reported-by: Alexander von Gluck IV <kallisti5@unixzen.com> Nitpicked-by: Aaron Jones <aaronmdjones@gmail.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* highlighter: when subtracting char, cast to unsignedJason A. Donenfeld2019-01-311-2/+2
| | | | | | Windows. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* netlink: use __kernel_timespec for handshake timeJason A. Donenfeld2019-01-231-1/+7
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* contrib: introduce simple highlighter libraryJason A. Donenfeld2019-01-238-0/+904
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: normalize -> clampJason A. Donenfeld2019-01-232-6/+6
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* keygen-html: bring back pure javascript implementationJason A. Donenfeld2019-01-236-139/+186
| | | | | | | | | This reverts commit 9d5baf7d1d14ca7eb0852b41566330259229d489. BenoƮt Viguier has proofs that values will stay well within 2^53. We also have an improved carry function that's much simpler. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: update copyrightJason A. Donenfeld2019-01-0723-23/+23
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* makefile: use immediate expansion and use correct template patternsJason A. Donenfeld2018-12-182-0/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* embeddable-wg-library: do not warn on unrecognized netlink attributesJason A. Donenfeld2018-12-071-15/+1
| | | | | | This is a follow up of bcf8684c9ec90fe0d283a67d1654d05fb3eae019. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: various formatting tweeksJason A. Donenfeld2018-11-131-25/+25
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* keygen-html: add missing glue macroJason A. Donenfeld2018-11-061-0/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* wg: don't fail if a netlink interface dump is inconsistentJason A. Donenfeld2018-10-131-2/+9
| | | | | | | | | | | Netlink returns NLM_F_DUMP_INTR if the set of all tunnels changed during the dump. That's unfortunate, but is pretty common on busy systems that are adding and removing tunnels all the time. Rather than retrying, potentially indefinitely, we just work with the partial results. Reported-by: Robert Gerus <ar@is-a.cat> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: rename struct wireguard_ to struct wg_Jason A. Donenfeld2018-10-081-5/+5
| | | | | | | This required a bit of pruning of our christmas trees. Suggested-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* netlink: do not stuff index into nla typeJason A. Donenfeld2018-10-081-5/+4
| | | | | | | | It's not used for anything, and LKML doesn't like the type being used as an index value. Suggested-by: Eugene Syromiatnikov <esyr@redhat.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* crypto: clean up remaining .h->.cJason A. Donenfeld2018-10-071-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* crypto: make constant naming scheme consistentJason A. Donenfeld2018-09-251-2/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: put SPDX identifier on its own lineJason A. Donenfeld2018-09-2010-20/+20
| | | | | | | The kernel has very specific rules correlating file type with comment type, and also SPDX identifiers can't be merged with other comments. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* crypto: import zincJason A. Donenfeld2018-09-031-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* embeddable-wg-library: do not left shift negative numbersJason A. Donenfeld2018-07-241-7/+2
| | | | | | Otherwise we incur undefined behavior. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* dns-hatchet: apply resolv.conf's selinux context to new resolv.confJason A. Donenfeld2018-06-171-0/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* wg: encoding: add missing static array constraintsJason A. Donenfeld2018-06-062-3/+3
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* wg: constanter time encodingJason A. Donenfeld2018-05-311-7/+7
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ncat-client-server: do not always call sudo and use env bashJason A. Donenfeld2018-05-221-2/+3
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* dns-hatchet: update pathsJason A. Donenfeld2018-05-161-1/+1
| | | | | Suggested-by: Martin Hauke <mardnh@gmx.de> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ncat-client-server: add wg-quick variantJason A. Donenfeld2018-05-152-4/+37
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* embeddable-wg-library: zero attribute paddingJason A. Donenfeld2018-05-031-0/+4
| | | | | See: http://git.netfilter.org/libmnl/commit/?id=37c876b55a2c00424ccda5a300ab5fdec1d88b22 Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* keygen-html: add zip file exampleJason A. Donenfeld2018-05-021-3/+127
| | | | | | A little bit more JavaScript for easy copy&pasting. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* contrib: add extract-handshakes kprobe exampleJason A. Donenfeld2018-03-045-0/+175
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Revert "contrib: keygen-html: rewrite in pure javascript"Jason A. Donenfeld2018-03-025-187/+129
| | | | | | | | | This reverts commit e5203543a674453ce1e0cbbcb234d3308762fe65. As swanky as it is to have a really short file, it's hard to justify and makes me nervous. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* contrib: keygen-html: rewrite in pure javascriptJason A. Donenfeld2018-03-025-129/+187
| | | | | | | Emscripten is too cumbersome. This code here is much slower, but it's shorter and simpler. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* contrib: embedded-wg-library: add key generation functionsJason A. Donenfeld2018-03-023-2/+205
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* contrib: embedded-wg-library: add ability to add and del interfacesJason A. Donenfeld2018-02-213-3/+109
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* contrib: add embeddable wireguard libraryJason A. Donenfeld2018-02-176-0/+1671
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* wg: allow in-line commentsJason A. Donenfeld2018-02-171-2/+3
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* external-tests: update go versionJason A. Donenfeld2018-02-151-2/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* keygen-html: fix up copyrightJason A. Donenfeld2018-02-021-4/+0
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>