Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | memmod: fix import loading function usage | Jason A. Donenfeld | 2020-11-27 | 3 | -26/+4 |
| | | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> | ||||
* | wintun: load from filesystem by default | Jason A. Donenfeld | 2020-11-11 | 3 | -39/+109 |
| | | | | | | | | We let people loading this from resources opt in via: go build -tags load_wintun_from_rsrc Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> | ||||
* | global: switch to using %w instead of %v for Errorf | Jason A. Donenfeld | 2020-11-07 | 4 | -24/+24 |
| | | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> | ||||
* | wintun: ring management moved to wintun.dll | Simon Rozman | 2020-11-07 | 3 | -128/+108 |
| | | | | | Signed-off-by: Simon Rozman <simon@rozman.si> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> | ||||
* | wintun: load wintun.dll from RCDATA resource | Simon Rozman | 2020-11-07 | 17 | -1/+1575 |
| | | | | | Signed-off-by: Simon Rozman <simon@rozman.si> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> | ||||
* | wintun: migrate to wintun.dll API | Simon Rozman | 2020-11-07 | 24 | -3701/+151 |
| | | | | | | | | Rather than having every application using Wintun driver reinvent the wheel, the Wintun device/adapter/interface management has been moved from wireguard-go to wintun.dll deployed with Wintun itself. Signed-off-by: Simon Rozman <simon@rozman.si> | ||||
* | tun/wintun/registry: fix Go 1.15 race/checkptr failure | Brad Fitzpatrick | 2020-10-21 | 1 | -1/+1 |
| | | | | | | Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com> [Jason: ran go mod tidy.] Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> | ||||
* | global: update header comments and modules | Jason A. Donenfeld | 2020-05-02 | 19 | -19/+19 |
| | | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> | ||||
* | wintun: make remaining HWID comparisons case insensitive | Simon Rozman | 2020-05-02 | 1 | -2/+19 |
| | | | | | | | | | | | | | | | | | c85e4a410f27986a2967a49c0155633c716bf3ca introduced preliminary HWID checking to speed up Wintun adapter enumeration. However, all HWID are case insensitive by Windows convention. Furthermore, a device might have multiple HWIDs. When DevInfo's DeviceRegistryProperty(SPDRP_HARDWAREID) method returns []string, all strings returned should be checked against given hardware ID. This issue was discovered when researching Wintun and wireguard-go on Windows 10 ARM64. The Wintun adapter was created using devcon.exe utility with "wintun" hardware ID, causing wireguard-go fail to enumerate the adapter properly. Signed-off-by: Simon Rozman <simon@rozman.si> | ||||
* | setupapi: extend struct size constant definitions for arm(64) | Simon Rozman | 2020-05-02 | 2 | -0/+4 |
| | | | | Signed-off-by: Simon Rozman <simon@rozman.si> | ||||
* | wintun: split error message for create vs open namespace. | Avery Pennarun | 2020-05-02 | 1 | -1/+4 |
| | | | | Signed-off-by: Avery Pennarun <apenwarr@tailscale.com> | ||||
* | wintun: manage ring memory manually | Jason A. Donenfeld | 2019-11-22 | 1 | -4/+24 |
| | | | | | It's large and Go's garbage collector doesn't deal with it especially well. | ||||
* | global: fix a few typos courtesy of codespell | Jonathan Tooker | 2019-10-22 | 1 | -1/+1 |
| | | | | Signed-off-by: Jonathan Tooker <jonathan.tooker@netprotect.com> | ||||
* | namespaceapi: remove tasteless comment | Jason A. Donenfeld | 2019-10-21 | 1 | -1/+1 |
| | |||||
* | wintun: normalize variable names for their types | Jason A. Donenfeld | 2019-10-17 | 1 | -72/+72 |
| | |||||
* | wintun: quickly ignore non-Wintun devices | Avery Pennarun | 2019-10-17 | 1 | -0/+18 |
| | | | | | | | | | Some devices take ~2 seconds to enumerate on Windows if we try to get their instance name. The hardware id property, on the other hand, is available right away. Signed-off-by: Avery Pennarun <apenwarr@gmail.com> [zx2c4: inlined this to where it makes sense, reused setupapi const] | ||||
* | wintun: expose version | Jason A. Donenfeld | 2019-10-08 | 1 | -1/+29 |
| | |||||
* | mod: bump versions | Jason A. Donenfeld | 2019-10-04 | 6 | -6/+6 |
| | |||||
* | winpipe: use x/sys/windows instead of syscall | Jason A. Donenfeld | 2019-09-16 | 1 | -3/+2 |
| | |||||
* | wintun: use correct length for security attributes | Jason A. Donenfeld | 2019-09-16 | 1 | -1/+1 |
| | |||||
* | namespaceapi: AddSIDToBoundaryDescriptor modifies the handle | Jason A. Donenfeld | 2019-09-05 | 1 | -2/+2 |
| | |||||
* | wintun: take mutex first always | Jason A. Donenfeld | 2019-09-01 | 1 | -9/+9 |
| | | | | This prevents an ABA deadlock with setupapi's internal locks. | ||||
* | wintun: consider abandoned mutexes as released | Jason A. Donenfeld | 2019-09-01 | 1 | -1/+1 |
| | |||||
* | wintun: put mutex into private namespace | Jason A. Donenfeld | 2019-08-30 | 3 | -26/+99 |
| | |||||
* | namespaceapi: fix mistake | Jason A. Donenfeld | 2019-08-30 | 2 | -4/+4 |
| | |||||
* | namespaceapi: initial version | Simon Rozman | 2019-08-30 | 3 | -0/+207 |
| | | | | Signed-off-by: Simon Rozman <simon@rozman.si> | ||||
* | wintun: take mutex so that deletion uses the right name | Jason A. Donenfeld | 2019-08-30 | 1 | -9/+70 |
| | |||||
* | wintun: move ring constants into module | Jason A. Donenfeld | 2019-08-29 | 2 | -2/+99 |
| | |||||
* | wintun: delete all interfaces is not used anymore | Jason A. Donenfeld | 2019-08-29 | 1 | -9/+0 |
| | |||||
* | wintun: Wintun->Interface | Jason A. Donenfeld | 2019-08-29 | 1 | -27/+26 |
| | |||||
* | wintun: keep reference to pool in wintun object | Jason A. Donenfeld | 2019-08-29 | 1 | -7/+9 |
| | |||||
* | wintun: introduce adapter pools | Simon Rozman | 2019-08-29 | 1 | -21/+45 |
| | | | | | | This makes wintun package reusable for non-WireGuard applications. Signed-off-by: Simon Rozman <simon@rozman.si> | ||||
* | wintun: simplify rename logic | Jason A. Donenfeld | 2019-08-28 | 1 | -5/+4 |
| | |||||
* | wintun: give better errors when ndis interface listing fails | Jason A. Donenfeld | 2019-08-28 | 1 | -2/+2 |
| | |||||
* | wintun: also check for numbered suffix and friendly name | Jason A. Donenfeld | 2019-08-28 | 1 | -9/+22 |
| | |||||
* | wintun: upgrade deleting all interfaces and make it reusable | Simon Rozman | 2019-08-28 | 1 | -4/+29 |
| | | | | | | | | | | | DeleteAllInterfaces() didn't check if SPDRP_DEVICEDESC == "WireGuard Tunnel". It deleted _all_ Wintun adapters, not just WireGuard's. Furthermore, the DeleteAllInterfaces() was upgraded into a new function called DeleteMatchingInterfaces() for selectively deletion. This will be used by WireGuard to clean stale Wintun adapters. Signed-off-by: Simon Rozman <simon@rozman.si> | ||||
* | wintun: cleanup earlier | Jason A. Donenfeld | 2019-08-27 | 1 | -19/+20 |
| | |||||
* | wintun: rename duplicate adapters instead of ourselves | Jason A. Donenfeld | 2019-08-27 | 4 | -0/+118 |
| | |||||
* | wintun: match suffix numbers | Jason A. Donenfeld | 2019-08-26 | 1 | -1/+8 |
| | |||||
* | wintun: make description consistent across fields | Jason A. Donenfeld | 2019-08-24 | 1 | -12/+9 |
| | |||||
* | wintun: try multiple names until one isn't a duplicate | Jason A. Donenfeld | 2019-08-22 | 1 | -4/+12 |
| | |||||
* | wintun: use nci.dll directly instead of buggy netshell | Jason A. Donenfeld | 2019-08-21 | 5 | -84/+102 |
| | |||||
* | wintun: set friendly a bit better | Jason A. Donenfeld | 2019-08-20 | 1 | -22/+10 |
| | | | | | This is still wrong, but NETSETUPPKEY_Driver_FriendlyName seems a bit tricky to use. | ||||
* | wintun: also set friendly name after setting interface name | Jason A. Donenfeld | 2019-08-19 | 1 | -8/+23 |
| | |||||
* | wintun: defer requires unique variable | Jason A. Donenfeld | 2019-08-19 | 1 | -33/+22 |
| | |||||
* | wintun: set adapter description name | Jason A. Donenfeld | 2019-08-19 | 1 | -0/+24 |
| | |||||
* | wintun: merge opening device registry key | Simon Rozman | 2019-08-02 | 1 | -21/+15 |
| | | | | | | | | | This also introduces waiting for key to appear on initial access. See if this resolves the issue caused by HDD power-up delay resulting in failure to create the adapter. Signed-off-by: Simon Rozman <simon@rozman.si> | ||||
* | wintun: simplify checking reboot requirement | Simon Rozman | 2019-08-02 | 1 | -18/+7 |
| | | | | | | We never checked checkReboot() reported error anyway. Signed-off-by: Simon Rozman <simon@rozman.si> | ||||
* | wintun: refactor `err == nil` error checking | Simon Rozman | 2019-08-02 | 2 | -133/+166 |
| | | | | Signed-off-by: Simon Rozman <simon@rozman.si> | ||||
* | wintun: handle error for deadgwdetect | Jason A. Donenfeld | 2019-08-02 | 1 | -2/+3 |
| |