aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/main.go (follow)
Commit message (Collapse)AuthorAgeFilesLines
* global: bump dateJason A. Donenfeld2022-01-061-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: interface{} -> anyJason A. Donenfeld2021-12-161-4/+4
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: apply gofumptJason A. Donenfeld2021-12-091-2/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* manager: cleanup legacy wintunJason A. Donenfeld2021-10-291-0/+1
| | | | | | | | | | It's not good to leave cruft around from the upgrade case when people want to uninstall, so we remove wintun in the uninstaller manually (without the help of wintun.dll, which we no longer ship). But also, so that we can eventually drop that code, we also remove it opportunistically when the manager starts. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* manager: use pre-seeded fastrandn instead of math.randJason A. Donenfeld2021-10-281-10/+0
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* manager: delay boottime updates and simplifyJason A. Donenfeld2021-10-271-0/+10
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ringlogger: allow tailing to stdoutJason A. Donenfeld2021-10-261-3/+3
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: remove wireguard-go/Wintun implementationJason A. Donenfeld2021-10-161-8/+3
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* manager: use newer wireguard-go APIsJason A. Donenfeld2021-10-121-8/+7
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* driver: use new APIJason A. Donenfeld2021-10-051-8/+4
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* manager: do both wgnt and wintun cleanupsJason A. Donenfeld2021-08-091-6/+5
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* driver: break encapsulation and pass timestamp to ringloggerJason A. Donenfeld2021-08-081-1/+5
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* driver: introduce new module for talking with kernel driverJason A. Donenfeld2021-08-021-2/+12
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* main: log CLI to stderr/stdoutJason A. Donenfeld2021-06-181-38/+40
| | | | | | | | If stderr is available, log to stderr. Otherwise, log to stdout. Otherwise, fallback to message box GUI prompts for error strings. Requested-by: Andrew Burkett <burkett.andrew@gmail.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* build: port to arm64Jason A. Donenfeld2021-02-181-5/+0
| | | | | | | | | | 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-011-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* main: restrict dll search pathJason A. Donenfeld2020-11-271-0/+4
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* main: do not display message when user presses 'no'Jason A. Donenfeld2020-11-231-2/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: update headersJason A. Donenfeld2020-11-221-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* manager: allow S-1-5-32-556 users to launch a limited UIJason A. Donenfeld2020-11-221-4/+14
| | | | | | | | | | | | | | | | | I still have serious security reservations about this, both conceptually -- should users be allowed to do this stuff? -- and pratically -- there are issues with this implementation that need some examination. TODO: - Is that registry key a secure path? Should we double check it? - Are we leaking handles to the unpriv'd process from the manager? Audit this too. - IPC notifications are blocking. Should we move this to a go routine to mitigate DoS potential? - Is GOB deserialization secure? Can an NCO user crash or RCE the manager? Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* mod: bump x/sys for IsWow64Process2Jason A. Donenfeld2020-11-161-19/+3
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* main: check for x86 emulation on armJason A. Donenfeld2020-11-161-5/+38
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* main: only do Wow64 check on ARMJason A. Donenfeld2020-11-131-0/+4
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* main: add command line adapter cleanupJason A. Donenfeld2020-11-131-0/+25
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* updater: allow updating from the command lineJason A. Donenfeld2020-04-051-0/+39
| | | | | | | | | The administrator user may run `wireguard.exe /update`, which will check for updates and install it if available. A log file may be written using `wireguard.exe /update path\to\log\file.txt`. Requested-by: Elliot Saba <staticfloat@gmail.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* l18n: add stub for cross platformJason A. Donenfeld2020-03-151-2/+0
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* l18n: add French translation stubSimon Rozman2020-03-151-1/+1
| | | | Signed-off-by: Simon Rozman <simon@rozman.si>
* l18n: add Japanese translation stubSimon Rozman2020-03-151-1/+1
| | | | Signed-off-by: Simon Rozman <simon@rozman.si>
* l18n: add Slovenian translationSimon Rozman2020-03-151-1/+1
| | | | Signed-off-by: Simon Rozman <simon@rozman.si>
* l18n: add localization supportSimon Rozman2020-03-151-18/+20
| | | | | | | | | | | | | | | | | | | | | Revise the messages to make them localizable. Note: The log messages are not marked for localization. Probably, we want to keep log files in English for easier global troubleshooting. Having a user run `go generate` requires a valid and up-to-date Go environment. Rather than instructing users how to setup the environment correctly, the `go generate` was integrated into build.bat. This reuses the Go building environment downloaded and prepared by build.bat to provide controllable and consistent result. Use `make generate` on Linux. As the zgotext.go output varies for GOARCH=386 and amd64, one had to be chosen to provide stable output. The former is the first one to build in build.bat. Signed-off-by: Simon Rozman <simon@rozman.si>
* mod: bump versionsJason A. Donenfeld2019-09-271-2/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: use SECURITY_DESCRIPTOR apis from x/sys/windowsJason A. Donenfeld2019-09-231-6/+3
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* manager: adjust for wintun api changesJason A. Donenfeld2019-08-301-29/+0
| | | | | | | Also get rid of the "Local Area Connection" hack and "/wintun /deleteall". Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* main: display localized "Administrators" group nameSimon Rozman2019-08-301-4/+8
| | | | Signed-off-by: Simon Rozman <simon@rozman.si>
* elevate: check for desktop admin ownershipJason A. Donenfeld2019-08-301-0/+11
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* elevate: use more strict check for admin groupJason A. Donenfeld2019-08-301-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* tunnel: move Run into own module to reduce file sizeJason A. Donenfeld2019-08-241-2/+3
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* elevate: move service/token into proper moduleJason A. Donenfeld2019-08-051-3/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* elevate: do not show UAC prompt for frictionless UXJason A. Donenfeld2019-08-051-1/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* main: cleanup info printingJason A. Donenfeld2019-06-131-4/+6
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* main: add wintun cleanup helperJason A. Donenfeld2019-06-101-0/+30
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* main: update usage infoSimon Rozman2019-06-071-1/+1
| | | | Signed-off-by: Simon Rozman <simon@rozman.si>
* tunnel: retain SeLoadDriverPrivilegeJason A. Donenfeld2019-06-071-1/+1
| | | | | | This is a big loss. We'll need to revisit this. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: several helpers are now upstreamJason A. Donenfeld2019-05-271-9/+8
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* service: split into tunnel and managerJason A. Donenfeld2019-05-201-10/+11
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui: drop permissionsJason A. Donenfeld2019-05-151-0/+4
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* service: clean up token manglingJason A. Donenfeld2019-05-141-21/+4
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: use tab after //sysJason A. Donenfeld2019-05-141-3/+3
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: regroup all importsJason A. Donenfeld2019-05-141-4/+5
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ringlogger: add a basic CLI log dumping commandJason A. Donenfeld2019-05-081-0/+15
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>