aboutsummaryrefslogtreecommitdiffstats
path: root/tun/wintun (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* wintun: introduce adapter poolsSimon Rozman2019-08-291-21/+45
| | | | | | This makes wintun package reusable for non-WireGuard applications. Signed-off-by: Simon Rozman <simon@rozman.si>
* wintun: simplify rename logicJason A. Donenfeld2019-08-281-5/+4
|
* wintun: give better errors when ndis interface listing failsJason A. Donenfeld2019-08-281-2/+2
|
* wintun: also check for numbered suffix and friendly nameJason A. Donenfeld2019-08-281-9/+22
|
* wintun: upgrade deleting all interfaces and make it reusableSimon Rozman2019-08-281-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 earlierJason A. Donenfeld2019-08-271-19/+20
|
* wintun: rename duplicate adapters instead of ourselvesJason A. Donenfeld2019-08-274-0/+118
|
* wintun: match suffix numbersJason A. Donenfeld2019-08-261-1/+8
|
* wintun: make description consistent across fieldsJason A. Donenfeld2019-08-241-12/+9
|
* wintun: try multiple names until one isn't a duplicateJason A. Donenfeld2019-08-221-4/+12
|
* wintun: use nci.dll directly instead of buggy netshellJason A. Donenfeld2019-08-215-84/+102
|
* wintun: set friendly a bit betterJason A. Donenfeld2019-08-201-22/+10
| | | | | This is still wrong, but NETSETUPPKEY_Driver_FriendlyName seems a bit tricky to use.
* wintun: also set friendly name after setting interface nameJason A. Donenfeld2019-08-191-8/+23
|
* wintun: defer requires unique variableJason A. Donenfeld2019-08-191-33/+22
|
* wintun: set adapter description nameJason A. Donenfeld2019-08-191-0/+24
|
* wintun: merge opening device registry keySimon Rozman2019-08-021-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 requirementSimon Rozman2019-08-021-18/+7
| | | | | | We never checked checkReboot() reported error anyway. Signed-off-by: Simon Rozman <simon@rozman.si>
* wintun: refactor `err == nil` error checkingSimon Rozman2019-08-022-133/+166
| | | | Signed-off-by: Simon Rozman <simon@rozman.si>
* wintun: handle error for deadgwdetectJason A. Donenfeld2019-08-021-2/+3
|
* wintun: get interface path properly with cfgmgrJason A. Donenfeld2019-07-234-30/+93
|
* wintun: simplify resolution of dev nodeJason A. Donenfeld2019-07-231-13/+10
|
* wintun: enable sharing of pnp nodeJason A. Donenfeld2019-07-221-1/+1
|
* tun: windows: get rid of retry logicJason A. Donenfeld2019-07-191-5/+9
| | | | Things work fine on Windows 8.
* tun: windows: switch to NDIS device objectJason A. Donenfeld2019-07-181-5/+0
|
* wintun: calculate path of NDIS device object symbolic linkJason A. Donenfeld2019-07-181-0/+20
|
* tun: windows: never retry open on Windows 10Jason A. Donenfeld2019-06-181-1/+1
|
* wintun: increase registry timeoutJason A. Donenfeld2019-06-111-1/+1
|
* wintun: add helper for cleaning upJason A. Donenfeld2019-06-101-9/+82
|
* wintun: simplify error matching and remove dumb commentsJason A. Donenfeld2019-06-101-19/+4
|
* wintun: fix comments and remove hwnd paramJason A. Donenfeld2019-06-101-119/+50
| | | | This now looks more idiomatic.
* setupapi: add SetDeviceRegistryPropertyString descriptionSimon Rozman2019-06-101-1/+2
| | | | Signed-off-by: Simon Rozman <simon@rozman.si>
* setupapi: unify ERROR_INSUFFICIENT_BUFFER handlingSimon Rozman2019-06-101-58/+32
| | | | Signed-off-by: Simon Rozman <simon@rozman.si>
* wintun: allow controlling GUIDJason A. Donenfeld2019-06-101-1/+20
|
* setupapi: add DeviceInstanceID()Jason A. Donenfeld2019-06-103-0/+41
|
* global: fixup TODO comment spacingJason A. Donenfeld2019-06-061-4/+4
|
* wintun: guid functions are upstreamJason A. Donenfeld2019-06-065-117/+11
|
* wintun: simplify DeleteInterface method signatureSimon Rozman2019-06-061-56/+77
| | | | Signed-off-by: Simon Rozman <simon@rozman.si>
* wintun: don't run HrRenameConnection in separate threadJason A. Donenfeld2019-06-051-3/+2
| | | | | It's very slow, but unfortunately we haven't a choice. NLA needs this to have completed.
* setupapi, wintun: replace syscall with golang.org/x/sys/windowsSimon Rozman2019-06-044-36/+32
| | | | Signed-off-by: Simon Rozman <simon@rozman.si>
* wintun: set DI_QUIETINSTALL flag for GUI-less device managementSimon Rozman2019-06-041-3/+26
| | | | Signed-off-by: Simon Rozman <simon@rozman.si>
* setupapi: define PropChangeParams structSimon Rozman2019-06-041-1/+20
| | | | | | | This structure is required for calling DIF_PROPERTYCHANGE installer class. Signed-off-by: Simon Rozman <simon@rozman.si>
* wintun: revise GetInterface()Simon Rozman2019-05-241-3/+4
| | | | | | | | | | | - 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>
* wintun: never return nil, nilJason A. Donenfeld2019-05-231-1/+1
|
* setupapi: trim "Get" from gettersSimon Rozman2019-05-224-52/+52
| | | | Signed-off-by: Simon Rozman <simon@rozman.si>
* wintun: don't try to flush interface, but rather deleteJason A. Donenfeld2019-05-171-9/+0
|
* wintun: make certain methods privateJason A. Donenfeld2019-05-171-23/+38
|
* global: regroup all importsJason A. Donenfeld2019-05-141-1/+1
|
* wintun: registry: fix nitsJason A. Donenfeld2019-05-111-17/+20
|
* wintun: registry: revise value readingSimon Rozman2019-05-112-67/+82
| | | | | | | | | | | | | | - Make getStringValueRetry() reusable for reading any value type. This merges code from GetIntegerValueWait(). - expandString() >> toString() and extend to support REG_MULTI_SZ (to return first value of REG_MULTI_SZ). Furthermore, doing our own UTF-16 to UTF-8 conversion works around a bug in windows/registry's GetStringValue() non-zero terminated string handling. - Provide toInteger() analogous to toString() - GetStringValueWait() tolerates and reads REG_MULTI_SZ too now. It returns REG_MULTI_SZ[0], making GetFirstStringValueWait() redundant. Signed-off-by: Simon Rozman <simon@rozman.si>
* wintun: call HrRenameConnection in another threadJason A. Donenfeld2019-05-101-2/+3
|