summaryrefslogtreecommitdiffhomepage
path: root/tun/tun_windows.go
AgeCommit message (Collapse)Author
2021-01-07tun: make customization of WintunPool and requested GUID more obviousJason A. Donenfeld
Persnickety consumers can now do: func init() { tun.WintunPool, _ = wintun.MakePool("Flurp") tun.WintunStaticRequestedGUID, _ = windows.GUIDFromString("{5ae2716f-0b3e-4dc4-a8b5-48eba11a6e16}") } Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-11-25wintun: log when reboot is suggested by WindowsSimon Rozman
Which really shouldn't happen. But it is a useful information for troubleshooting. Signed-off-by: Simon Rozman <simon@rozman.si>
2020-11-25wintun: keep original error when Wintun session start failsSimon Rozman
Signed-off-by: Simon Rozman <simon@rozman.si>
2020-11-07global: switch to using %w instead of %v for ErrorfJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-11-07wintun: ring management moved to wintun.dllSimon Rozman
Signed-off-by: Simon Rozman <simon@rozman.si> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-11-07wintun: migrate to wintun.dll APISimon Rozman
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>
2020-05-02global: update header comments and modulesJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-01-07tun: windows: serialize write callsJason A. Donenfeld
2019-11-22wintun: manage ring memory manuallyJason A. Donenfeld
It's large and Go's garbage collector doesn't deal with it especially well.
2019-10-17tun: match windows CreateTUN signature to the Linux variantAvery Pennarun
Signed-off-by: Avery Pennarun <apenwarr@gmail.com> [zx2c4: fix default value]
2019-10-08wintun: expose versionJason A. Donenfeld
2019-09-08tun: windows: unify error message formatJason A. Donenfeld
2019-08-30wintun: take mutex so that deletion uses the right nameJason A. Donenfeld
2019-08-29wintun: move ring constants into moduleJason A. Donenfeld
2019-08-29wintun: Wintun->InterfaceJason A. Donenfeld
2019-08-29wintun: introduce adapter poolsSimon Rozman
This makes wintun package reusable for non-WireGuard applications. Signed-off-by: Simon Rozman <simon@rozman.si>
2019-08-24wintun: make description consistent across fieldsJason A. Donenfeld
2019-08-19tun: windows: don't spin unless we really need itJason A. Donenfeld
2019-08-03tun: windows: spin for only a millisecond/80Jason A. Donenfeld
Performance stays the same as before.
2019-07-23tun: windows: styleJason A. Donenfeld
2019-07-22tun: windows: close event handle on shutdownJason A. Donenfeld
2019-07-19tun: windows: get rid of retry logicJason A. Donenfeld
Things work fine on Windows 8.
2019-07-19tun: windows: use specific IOCTL codeJason A. Donenfeld
2019-07-18tun: windows: open file at startup timeJason A. Donenfeld
2019-07-18tun: windows: silently drop packet when ring is fullJason A. Donenfeld
2019-07-18tun: windows: switch to NDIS device objectJason A. Donenfeld
2019-07-18tun: windows: spin for a bit before falling back to event objectJason A. Donenfeld
2019-07-17tun: windows: implement ring buffersSimon Rozman
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-07-05tun: windows: registration of write buffer no longer requiredJason A. Donenfeld
2019-07-05tun: windows: decrease alignment to 4Jason A. Donenfeld
2019-07-04tun: windows: delay initial writeJason A. Donenfeld
Otherwise we provoke Wintun 0.3.
2019-07-01tun: windows: packetNum is unusedJason A. Donenfeld
2019-06-26tun: windows: inform wintun of maximum buffer length for writesJason A. Donenfeld
2019-06-18tun: windows: never retry open on Windows 10Jason A. Donenfeld
2019-06-14tun: remove TUN prefix from types to reduce stutter elsewhereMatt Layher
Signed-off-by: Matt Layher <mdlayher@gmail.com>
2019-06-10wintun: fix comments and remove hwnd paramJason A. Donenfeld
This now looks more idiomatic.
2019-06-10wintun: allow controlling GUIDJason A. Donenfeld
2019-06-06global: fixup TODO comment spacingJason A. Donenfeld
2019-06-06wintun: simplify DeleteInterface method signatureSimon Rozman
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-06-05tun: windows: obsolete 256 packets per exchange buffer limitationSimon Rozman
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-05-31tun: windows: mitigate infinite loop in Flush()Jason A. Donenfeld
It's possible that for whatever reason, we keep returning EOF, resulting in repeated close/open/write operations, except with empty packets.
2019-05-26wintun: remove extra /Jason A. Donenfeld
2019-05-24wintun: revise GetInterface()Simon Rozman
- Make foreign interface found error numeric to ease condition detection. - Update GetInterface() documentation. - Make tun.CreateTUN() quit when foreign interface found before attempting to create a Wintun interface with a duplicate name. Creation is futile. Signed-off-by: Simon Rozman <simon@rozman.si>
2019-05-22setupapi: trim "Get" from gettersSimon Rozman
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-05-17wintun: don't try to flush interface, but rather deleteJason A. Donenfeld
2019-05-17wintun: make certain methods privateJason A. Donenfeld
2019-05-17wintun: change acronyms to uppercaseSimon Rozman
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-05-10wintun: add LUID accessorJason A. Donenfeld
2019-05-10wintun: wait for interface registry key on device creationSimon Rozman
By using RegNotifyChangeKeyValue(). Also disable dead gateway detection. Signed-off-by: Simon Rozman <simon@rozman.si>
2019-05-03wintun: work around GetInterface staleness bugJason A. Donenfeld