aboutsummaryrefslogtreecommitdiffstatshomepage
Commit message (Collapse)AuthorAgeFilesLines
* locales: update translations from crowdinHEADmasterJason A. Donenfeld3 days42-10613/+28268
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* l18n: promote out.gotext.json to messages.gotext.jsonJason A. Donenfeld3 days2-1/+7
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* l18n: configuration separator fallbacksJason A. Donenfeld13 days1-2/+2
| | | | | | | For languages that don't translate these, don't emit the place holder in this ugly way. Instead fallback to ", " and " ". Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* manager: tear down the event reader on partial decode failureJason A. Donenfeld13 days1-12/+12
| | | | | | | | | | | gob is positional; continue on a half-read value leaves the decoder mid-payload, and the next iteration reads what follows as if it were a new NotificationType. Return on any Decode error and let the pipe close take down the reader. The empty-tunnel-name check has to move below all four field decodes for the same reason, or it desyncs the stream just like the failure path used to. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* manager: tidy up leak and dead lock-thread defer in session loopJason A. Donenfeld13 days1-2/+6
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* conf: flush file buffers before atomically renaming into placeJason A. Donenfeld13 days1-0/+1
| | | | | | | | | | NTFS journals the rename's metadata change but does not journal user data. Without an explicit flush a power loss between the cache manager publishing the rename and writing back the file's pages can leave the destination at its final name with zero or partial contents, while the prior file is gone. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* manager: skip the handle list attribute when no handles are suppliedJason A. Donenfeld13 days1-3/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* version: skip certs whose CertificatePolicies fail to decodeJason A. Donenfeld13 days1-2/+2
| | | | | | | | | A per-cert decode failure shouldn't abort the whole enumeration: just continue to the next cert. As a side effect, the next CertEnumCertificatesInStore call frees this cert via its predecessor-free contract, so no explicit free is needed either. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* main: pass fatal arguments to log.Fatal individuallyJason A. Donenfeld13 days1-1/+1
| | | | | | | | Without the splat the appended slice is passed as a single argument to log.Fatal, which renders it as "[Error: <err>]" with the brackets and the leading slice formatting visible in the console output. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ringlogger: read shared counters atomicallyJason A. Donenfeld13 days1-11/+12
| | | | | | | | | The writer publishes nextIndex and timeNs via atomic ops, but WriteTo and FollowFromCursor used to memcpy the entire mapping and then read those fields plain, which is a race. Drop the megabyte snapshot and use matching atomic loads. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* conf: keep retrying when the config-directory watcher fails to startJason A. Donenfeld13 days1-2/+6
| | | | | | | | | | | | The watcher's setup is guarded by sync.Once, which is consumed the moment the goroutine is spawned. If tunnelConfigurationsDirectory or FindFirstChangeNotification fails on the first attempt the goroutine exits, but every subsequent RegisterStoreChangeCallback sees the Once already done and skips the spawn, so changes are silently never reported again. Retry these initial failures on the existing startover loop instead of bailing out. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* memmod: prune loaded address ranges on freeJason A. Donenfeld13 days1-0/+8
| | | | | | | | | | | | The RtlPcToFileHeader hook consults loadedAddressRanges to identify PCs that belong to manually-loaded modules. Entries were appended during LoadLibrary but never removed when the module was freed, so once the underlying allocation was returned to the OS and possibly reused, the hook would still claim those PCs as ours and substitute in a sentinel address, breaking unwind metadata lookup for whatever legitimate module ended up at that range. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui: raise: exit cleanly when the event hook cannot be installedJason A. Donenfeld13 days1-3/+6
| | | | | | | | | | | | | | Falling through to the message pump after SetWinEventHook failure wedges the secondary process forever, since the hook is the only thing that would ever post WM_QUIT or signal the existing window. GetMessage's -1 error return was also being treated as a normal message and dispatched on uninitialised MSG state. Bail out with os.Exit on the SetWinEventHook failure path, and on the message loop translate WM_QUIT (m==0) and the GetMessage error (m<0) into real exit codes so ExitProcess does not see them through a signed cast that lands on 0xFFFFFFFF. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* tunnel: mtumonitor: serialize change callbacksJason A. Donenfeld13 days1-0/+5
| | | | | | | | The route-change and interface-change callbacks run on separate threads from the IP Helper notification pool and both touch the same lastLUID/lastIndex/lastMTU state. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* memmod: delete the function table on freeJason A. Donenfeld13 days1-1/+9
| | | | | | | | RtlAddFunctionTable keeps a kernel-side pointer into the in-image RUNTIME_FUNCTION array. Without a matching RtlDeleteFunctionTable, freeing codeBase via VirtualFree leaves that pointer dangling. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* memmod: distinguish no-exports from no-named-exportsJason A. Donenfeld13 days1-1/+1
| | | | | | | | The two checks collapsed into one || meant the second error message was unreachable. Drop NumberOfNames from the first check so both diagnostics are reachable for their respective cases. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* updater: drain the entire response when fetching version listJason A. Donenfeld13 days1-4/+3
| | | | | | | | | WinHTTP can short-read across TLS or HTTP chunk boundaries, so a single Read may truncate the signed file list. Signify verification catches it, but the user sees a spurious update-check failure instead of a successful fetch. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* manager: release driver adapter on tunnel stopJason A. Donenfeld13 days2-0/+6
| | | | | | | | | | | | | | | releaseDriverAdapter was only called from the RuntimeConfig error path, so a cleanly-running tunnel never had its cached *Adapter dropped from the map. The finalizer attached in OpenAdapter couldn't reach it, and the kernel handle leaked. A restart of the same tunnel then kept hitting stale-handle errors against the surviving cache entry. Fix this by calling releaseDriverAdapter from tunneltracker on every TunnelStopped transition, and closing the adapter inside releaseDriverAdapter under the per-adapter lock. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* conf: don't strip '#' from PreUp/PreDown/PostUp/PostDown valuesJason A. Donenfeld13 days1-12/+16
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* conf: reject reserved names with any extensionJason A. Donenfeld13 days1-11/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ringlogger: don't pass argv as format stringJason A. Donenfeld13 days1-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* version: bump to 1.1v1.1Jason A. Donenfeld2026-05-071-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* tunnel: create DNS registry key if it doesn't existJason A. Donenfeld2026-05-071-1/+1
| | | | | | | This fixes a bit of a race with interface attachment on old Windows builds. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* build: bump wireguard-nt to 1.1Jason A. Donenfeld2026-05-072-2/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* updater,fetcher: disable HTTP/3Jason A. Donenfeld2026-05-062-10/+4
| | | | | | | We had reports of it failing. Reported-by: Ben Yoder <byoder@moltzconstructors.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* conf: prevent directory traversal on bare tunnel namesJason A. Donenfeld2026-05-031-0/+3
| | | | | | | Not really reachable, but still this seems wrong not to check. DeleteName checks it. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* installer: reduce windows 7 disappointment emailJason A. Donenfeld2026-04-221-0/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* version: bump to 1.0.1v1.0.1Jason A. Donenfeld2026-04-201-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* build: use crlf line endings on bat filesJason A. Donenfeld2026-04-201-0/+2
| | | | | Reported-by: Frank Rochlitzer <f.rochlitzer@b3-it.de> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* build: bump to go 1.26.2Jason A. Donenfeld2026-04-202-2/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: regenerate syscall code from latest x/sys/windows wrapperJason A. Donenfeld2026-04-203-57/+57
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* locales: update translations from crowdinJason A. Donenfeld2026-04-209-933/+4623
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* mod: bump for walk fixJason A. Donenfeld2026-04-202-20/+20
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* installer: make sure we can delete files after killing processesJason A. Donenfeld2026-04-191-17/+62
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* installer: don't follow reparse points when computing file IDsJason A. Donenfeld2026-04-191-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* driver: remove wintun legacy cleanupJason A. Donenfeld2026-04-193-53/+0
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* version: bumpv1.0Jason A. Donenfeld2026-04-181-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* build: bump wireguard-nt to 1.0Jason A. Donenfeld2026-04-182-2/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: format codeJason A. Donenfeld2026-04-162-6/+6
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ringlogger: close file on Truncate failureJason A. Donenfeld2026-04-161-0/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* memmod: be more resilient toward weird PE filesJason A. Donenfeld2026-04-161-8/+34
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* service: make use of errors.As instead of type assertionJason A. Donenfeld2026-04-161-4/+6
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui: nil-check CurrentTunnel in item-activated handlerJason A. Donenfeld2026-04-161-1/+5
| | | | | | Happens in a Go routine when things might have changed. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui: register visibility handler after pages are createdJason A. Donenfeld2026-04-161-8/+9
| | | | | | | It's a bit weird to register this handler with a callback that touches things that aren't even initialized at this point. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui: fix scope syntax highlightingJason A. Donenfeld2026-04-161-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui: break out of ticker loops properlyJason A. Donenfeld2026-04-162-19/+27
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui: print correct error when unable to enumerate tunnelsJason A. Donenfeld2026-04-161-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui: set hidden keys for limited UIJason A. Donenfeld2026-04-161-2/+8
| | | | | | Otherwise we can't figure out which peers to remove. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* elevate: restore FullDllName struct directly instead of via RtlInitUnicodeStringJason A. Donenfeld2026-04-161-2/+2
| | | | | | This is more robust. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* elevate: default lpDirectory to the program's directoryJason A. Donenfeld2026-04-161-0/+3
| | | | | | Seems like defaulting to CWD is a bad idea. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>