aboutsummaryrefslogtreecommitdiffstatshomepage
Commit message (Collapse)AuthorAgeFilesLines
* winipcfg: cleanup netsh error reportingJason A. Donenfeld2020-11-271-7/+6
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* conf: separate out migration and print errorsJason A. Donenfeld2020-11-273-77/+90
| | | | 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>
* go-patches: force PIE mode on armJason A. Donenfeld2020-11-2711-10/+54
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* mod: bumpJason A. Donenfeld2020-11-272-14/+13
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* fetcher: delay load anything with transitive dependencies outside of knowndllsJason A. Donenfeld2020-11-272-1/+4
| | | | | | | | | | | | | | | | It looks like advapi32.dll loads cryptbase.dll because RtlGenRandom is forwarded to it, and cryptbase.dll isn't in knowndlls. So, even though we haven't done anything wrong by importing advapi32.dll statically, the surprising forwarding behavior means that this is a disaster. At the same time, some UI-related system modules wind up calling loadlibraryex with default arguments, so again, even though linking to things like user32.dll and such statically is fine, microsoft is doing the wrong thing inside of them. Work around the first issue by loading advapi32.dll (and others, just for good measure) delayed, and work around the latter by gimping the dll search path. Reported-by: Stefan Kanthak <stefan.kanthak@nexgo.de> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* manager: move legacy store from confJason A. Donenfeld2020-11-274-12/+6
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* conf: rework migration flows around a single Save()Jason A. Donenfeld2020-11-275-22/+15
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* conf: when migrating, write out reserialized configJason A. Donenfeld2020-11-271-3/+4
| | | | | | This catches encoding gotchas earlier. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* conf: open temporary file with read sharingJason A. Donenfeld2020-11-271-1/+1
| | | | | | | | | The reason we do the rename-in-place temporary file situation is to allow reads to be complete once renamed. But the rename takes place before the filehandle is closed, so make sure that the handle is opened with read sharing, in case this races. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* conf: do exponential back off for sharing violation in hotfolderJason A. Donenfeld2020-11-274-13/+41
| | | | | | | | | | | | | | | | | Windows gives us notifications about writes to files in a directory, but it does not give us notifications on when file handles are closed and when we can expect to be able to grab a handle to it; this would be racey at best. So, there always exists a race between the writer's last call to WriteFile() and its eventual CloseHandle(). Work around this by implementing a basic exponential back off of retrying the open call. While we're at it, clean up the "file already exists" logic to remove a basic toctou situation, and switch to using random temp file names in order to handle better the case of saving a new file from two different administrators at once. Reported-by: Jim Salter <jim@jrs-s.net> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* docs: fix /0 -> /1 in netquirkJason A. Donenfeld2020-11-271-1/+1
| | | | | Reported-by: Jim Salter <jim@jrs-s.net> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* fetcher: use formally verified cryptoJason A. Donenfeld2020-11-273-1042/+2257
| | | | | | Cleaner, better vetted, faster. Based on fiat. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* version: bumpv0.3.1Jason A. Donenfeld2020-11-231-1/+1
| | | | | | So early? Yes. The firewall issue was an unacceptable regression. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* firewall: add allow rule for tunnel service process even when no blocking is requiredJason A. Donenfeld2020-11-233-39/+43
| | | | | | | This is essential for allowing incoming connections. Reported-by: /u/Julien_Madagascar on Reddit Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* mod: bumpJason A. Donenfeld2020-11-232-4/+4
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* docs: trim double backtick and header levelJason A. Donenfeld2020-11-232-2/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* version: bumpv0.3Jason A. Donenfeld2020-11-231-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* docs: mention that the uninstaller will nuke knobsJason A. Donenfeld2020-11-231-1/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* docs: clarify group membership search algorithmJason A. Donenfeld2020-11-231-2/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* manager: styleJason A. Donenfeld2020-11-231-1/+0
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* manager: cleanup pipes on failureJason A. Donenfeld2020-11-231-0/+16
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* docs: move to docs subdirectoryJason A. Donenfeld2020-11-237-101/+134
| | | | 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>
* tunnel: set %WIREGUARD_INTERFACE_NAME% instead of expanding %iJason A. Donenfeld2020-11-222-3/+4
| | | | | | | | While this diverges from wg-quick(8), it's also much more Windows-friendly, considering that % is the prefix for expanding environment variables in cmd.exe. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* build: use newer version of go in makefileJason A. Donenfeld2020-11-221-1/+1
| | | | | | This reflects the recent changes to build.bat. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* go-patches: add back hires windows timer patchesJason A. Donenfeld2020-11-2210-19/+529
| | | | | | | | This adds back the high resolution timer patches, but with the addition of Alex's recent fix to branch to the old code in the event that 0x28(%gs) is zeroed out. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* docs: remove highlighting from cmd examples in readmeJason A. Donenfeld2020-11-221-9/+9
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* docs: add networking quirks descriptionJason A. Donenfeld2020-11-222-0/+34
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* docs: add enterprise usage summaryJason A. Donenfeld2020-11-222-0/+94
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* l18n: regenerate indexJason A. Donenfeld2020-11-2216-2596/+1703
| | | | | | We'll soon squash this into new translations from crowdin. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: update headersJason A. Donenfeld2020-11-22114-114/+114
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* version: unify architecture string handlingJason A. Donenfeld2020-11-225-63/+57
| | | | | | | Always report native architecture and use "x86" instead of "386" for all identification strings, except when explicitly stating the Go verison. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* conf: always use 64-bit registry view on 64-bit machinesJason A. Donenfeld2020-11-221-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* manager: allow multiple tunnels if admin knob allows itJason A. Donenfeld2020-11-222-25/+39
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* tunnel: enable {Pre,Post}{Up,Down} scripts gated behind admin knobJason A. Donenfeld2020-11-2210-12/+169
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* conf: allow administrators to add and remove configs easilyJason A. Donenfeld2020-11-225-22/+78
| | | | | | | | | | We loosen the permissions a little bit while tightening the restrictions on encrypted files. This should allow administrators to easily drop unencrypted files into Data\Configurations\ and get them encrypted and made read-only, while also allowing them to delete unwanted configurations. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* manager: move IPC notification to go routine per clientJason A. Donenfeld2020-11-221-2/+15
| | | | 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-2212-36/+178
| | | | | | | | | | | | | | | | | 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>
* tunnel: only enable DNS blocking for 0/0 configsJason A. Donenfeld2020-11-224-40/+29
| | | | | | This lets people use split tunnel DNS for the more common case. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* installer: remove admin knobs in cleanupJason A. Donenfeld2020-11-221-0/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* installer: force modal if KB2921916 is missingJason A. Donenfeld2020-11-221-7/+19
| | | | | | | | This goes against user choice, but it's also required to get Windows 7 users upgrading again. Reported-by: /u/tarakan1983 on Reddit Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* installer: remove memmemJason A. Donenfeld2020-11-201-116/+8
| | | | | | | There's only one 'h' in the search string, so the efficiency is about the same. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* version: bumpv0.2.3Jason A. Donenfeld2020-11-191-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* manager: don't serialize a nil tunnelJason A. Donenfeld2020-11-191-0/+3
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui: add status icon to context menuJason A. Donenfeld2020-11-191-0/+4
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* build: bump golang version to 1.15.5Jason A. Donenfeld2020-11-199-27/+27
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui: re-add systray popup menu tunnel list, but behind submenu if too bigJason A. Donenfeld2020-11-193-40/+199
| | | | | | | | This partially reverts commit 851704a761461270eae5b9aaf26711c5527bbc44, but moves the menu into a submenu if there are more than 10 tunnels, suggested by "FatComputerGuy" on reddit. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* locales: sync with crowdinJason A. Donenfeld2020-11-1816-1571/+4415
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* updater: remove obsolete syscall stubJason A. Donenfeld2020-11-181-8/+0
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>