aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/embeddable-dll-service (follow)
Commit message (Collapse)AuthorAgeFilesLines
* overlay: stub out crypto/rand FIPS140 garbageHEADmasterJason A. Donenfeld2026-09-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Go crypto library used to be simple and nice and an example of how to do things well. Unfortunately, the addition of FIPS140 to it has brought disgusting enterprise patterns and gummed up the code. One place this really comes out is in the insane infrastructure behind the RNG. It really only should be calling the system random functions and nothing more. But in contemporary Go, simply calling into the RNG brings along with it in the binary: - A bizarre voodoo magic userspace entropy collector - A specialized SHA384 implementation for said entropy collector - An AES implementation - An AES-NI accelerated AES implementation - A CTR implementation for AES - A GCM implementation for AES - Some CPU detection code - An implementation of some FIPS-specified DRBG algorithm - An HMAC implementation - A SHA256 implementation - An AVX2-accelerated SHA256 implementation - A SHA3 implementation (including cSHAKE) - An AVX2-accelerated SHA3 implementation - A SHA512 implementation - Some generic XOR-bytes routines - The actual syscall wrappers for getting random numbers Obviously this is completely insane. There's a tangled mess of components including eachother, a disorganized patchwork of FIPS code and BoringCrypto code and enterprisey API hooks and self checks and auto-included initializers. It seems like a mess of a library these days. So, here we beat down this madness by using a Go build overlay to replace various parts of the crypto library with stub functions. This is pretty nasty. But at least it compiles out some of this junk. I'm trying to fix this upstream in the meanwhile [1], and so we'll see what comes of that. Link: https://github.com/golang/go/issues/81639 Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* build: restore separate Go directory on WindowsJason A. Donenfeld2026-09-221-2/+2
| | | | | | Keep the Go toolchain under .deps\go to match the Linux build layout. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: use crypto/ecdh for X25519Jason A. Donenfeld2026-09-221-4/+7
| | | | | | | Use crypto/ecdh directly, because the old x/crypto 25519 library was wrapping it. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: rand.Read never errorsJason A. Donenfeld2026-09-221-4/+1
| | | | | | Part of the API contract, apparently. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* embeddable-dll-service: csharp: fix allowed IP layoutJason A. Donenfeld2026-09-201-1/+8
| | | | | | | | The CIDR byte follows the 16-byte address and two-byte address family, placing it at offset 18. Add the missing flags field at offset 20 and its Remove flag to match the native structure. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: raise min windows version to 10Jason A. Donenfeld2026-03-212-14/+4
| | | | | | | | | | | | | | | Since we're also bumping the PE subsystem header to 10.0, this means we need a _load_config with the proper flags. So there's some work to be done here. This also means bumping LLVM and Go builds. In the case of Go, the patch is still pending: https://go-review.googlesource.com/c/go/+/756680 , so it's a custom build. Remove lots of compatibility code and hacks. Also update the installer to display a useful message. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: bump dateJason A. Donenfeld2026-03-1810-10/+10
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* build: make code signing method configurableSimon Rozman2024-10-171-2/+2
| | | | | | | | | | Existing code signing was hard-coded to use a locally installed certificate (hardware security dongles included). However, signtool.exe is extensible to allow any kind of digest signing plugin with /dlib and /dmdf switches. This is used for cloud-based code signing (e.g. Microsoft Trusted Signing). Signed-off-by: Simon Rozman <simon@rozman.si>
* embeddable-dll-service: build: .gitignore outputsSimon Rozman2022-03-281-0/+4
| | | | Signed-off-by: Simon Rozman <simon@rozman.si>
* embeddable-dll-service: build: integrate tunnel.dll signingSimon Rozman2022-03-281-0/+7
| | | | Signed-off-by: Simon Rozman <simon@rozman.si>
* embeddable-dll-service: csharp: ensure double \0 terminationSimon Rozman2022-03-281-4/+1
| | | | Signed-off-by: Simon Rozman <simon@rozman.si>
* embeddable-dll-service: correctness in READMESimon Rozman2022-03-281-2/+3
| | | | Signed-off-by: Simon Rozman <simon@rozman.si>
* global: bump dateJason A. Donenfeld2022-01-0610-10/+10
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: apply gofumptJason A. Donenfeld2021-12-091-6/+5
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* embeddable-dll-service: update for new wgnt APIJason A. Donenfeld2021-10-272-8/+4
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* embeddable-dll-service: remove named pipe mention from READMEJason A. Donenfeld2021-10-161-2/+0
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: prefer WireGuardNT over wireguard-go/WintunJason A. Donenfeld2021-09-121-14/+1
| | | | | | Also remove Wintun driver on startup. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* embeddable-dll-service: csharp: fix type conversionsJason A. Donenfeld2021-08-142-3/+3
| | | | | | | | | | ADDRESS_FAMILY is a u16, not a u32. C# promotes a ushort to an int, not to a short, so ntohl was being called instead of ntohs. Fix this with explicit casts. Reported-by: Neutron <dotneutron@protonmail.ch> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* embeddable-dll-service: csharp: specify stdcall, not cdeclJason A. Donenfeld2021-08-131-3/+3
| | | | | | | wireguard.h uses the WINAPI macro, which is __stdcall, so mark these as such. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* embeddable-dll-service: allow falling back to wireguard-goJason A. Donenfeld2021-08-101-2/+14
| | | | | Requested-by: Dmitry Smirnov <dmitry.smirnov@netprotect.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* embeddable-dll-service: csharp: update for wgntJason A. Donenfeld2021-08-104-35/+316
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* embeddable-dll-service: use wgnt alwaysJason A. Donenfeld2021-08-093-8/+3
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* embeddable-dll-service: mention that you need dlls in right placeJason A. Donenfeld2021-08-092-4/+2
| | | | | Reported-by: Dmitry Smirnov <dmitry.smirnov@netprotect.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* driver: introduce new module for talking with kernel driverJason A. Donenfeld2021-08-021-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* embeddable-dll-service: .gitignore VS output foldersSimon Rozman2021-08-021-0/+3
| | | | Signed-off-by: Simon Rozman <simon@rozman.si>
* build: bump to go 1.17beta1Jason A. Donenfeld2021-06-182-2/+2
| | | | | | | Also, enable arm64 embeddable tunnel service building. Requested-by: Dmitry Smirnov <dmitry.smirnov@netprotect.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* embeddable-dll-service: correctness in READMEJason A. Donenfeld2021-05-051-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* embeddable-dll-service: update README docJason A. Donenfeld2021-05-051-6/+2
| | | | | | | We now pass a LPWSTR instead of a Go string. Reported-by: Fabrizio Carimati <wireguard@clodo.it> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* embeddable-dll-service: give dacl example for config directoryJason A. Donenfeld2021-02-261-2/+10
| | | | | | It's probably best to encourage people start out in the right direction. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* build: port to arm64Jason A. Donenfeld2021-02-181-21/+6
| | | | | | | | | | We build Go from modified-source with a bootstrap version, rather than shipping so many patches in this repo. This commit also removes the previous WOW hacks, and goes back to strictly forbidding WOW. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: bump copyright dateJason A. Donenfeld2021-02-012-2/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* manager: pipeline UAPI requestsJason A. Donenfeld2021-02-011-15/+15
| | | | | | This avoids the somewhat expensive pipe setup. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* embeddable-dll-service: add more robust example for .NET 5Jason A. Donenfeld2021-01-2114-110/+530
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* embeddable-dll-service: download gcc again, since clang does not work with cgoJason A. Donenfeld2021-01-041-1/+19
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* embeddable-dll-service: fix code block typesJason A. Donenfeld2021-01-042-22/+26
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: update headersJason A. Donenfeld2020-11-227-7/+7
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* build: opt-in to resource loading of wintun.dllJason A. Donenfeld2020-11-161-2/+0
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* winipcfg, embeddable-dll-service, wintrust: fix Go 1.15 checkptr violationsBrad Fitzpatrick2020-10-211-1/+1
| | | | | | | | | | Avoids "converted pointer straddles allocation" failures at runtime when building binaries in race mode with Go 1.15, which enables checkptr: https://golang.org/doc/go1.15#windows Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com> [Jason: Note Go 1.16/1.17 todo item.] Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* embeddable-dll-service: acquire pointer reference before atomic incrementJason A. Donenfeld2019-12-111-2/+9
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* embeddable-dll-service: add all functionality to ringloggerJason A. Donenfeld2019-10-312-23/+211
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* build: go 1.13 now passes correct os version to ldJason A. Donenfeld2019-10-281-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* build: tsaware is implicit in modern goJason A. Donenfeld2019-10-261-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* build: enable aslr and depJason A. Donenfeld2019-10-251-1/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* embeddable-dll-service: use on-demand activation instead of autoJason A. Donenfeld2019-10-101-1/+1
| | | | | | | This prevents this from coming back after boot, since we probably want it tied to the parent process. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* embeddable-dll-service: do not marshall go stringsJason A. Donenfeld2019-10-092-14/+4
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* embeddable-dll-service: add key generation function to replace bcryptJason A. Donenfeld2019-10-063-109/+27
| | | | | | | | BCrypt is Win10+ and kind of clunky to use. The tunnel.dll binary has this code in it anyway, so doing it there doesn't actually increase the size of the binary. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* embeddable-dll-service: add csharp example codeJason A. Donenfeld2019-10-066-0/+545
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* embeddable-dll-service: add basic outline for embedding wireguardJason A. Donenfeld2019-09-233-0/+108
This allows people to embed WireGuard inside other apps as a service. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>