aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ui (follow)
Commit message (Collapse)AuthorAgeFilesLines
* global: update headersJason A. Donenfeld2020-11-2214-14/+14
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* version: unify architecture string handlingJason A. Donenfeld2020-11-221-1/+1
| | | | | | | 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>
* tunnel: enable {Pre,Post}{Up,Down} scripts gated behind admin knobJason A. Donenfeld2020-11-222-3/+26
| | | | 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-224-5/+23
| | | | | | | | | | | | | | | | | 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-221-1/+1
| | | | | | This lets people use split tunnel DNS for the more common case. 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>
* ui: re-add systray popup menu tunnel list, but behind submenu if too bigJason A. Donenfeld2020-11-191-34/+192
| | | | | | | | 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>
* ui: do not show <nil> as reason when importing empty zipJason A. Donenfeld2020-11-161-0/+3
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* build: llvm doesnt like dashesJason A. Donenfeld2020-11-161-0/+0
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui: use resource numbers instead of resource indicesJason A. Donenfeld2020-11-165-10/+10
| | | | | | | | | This makes it stable between Windows versions. HOWEVER! We're still using "1" instead of SHIDI_SHIELD_INTERNAL, because the latter is named instead of numbered. This is a TODO item. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui: remove systray popup menu tunnel listJason A. Donenfeld2020-11-161-178/+55
| | | | | | | | | | Should user have a huge list of tunnels, the menu becomes impossible to navigate. In the absence of any better idea, how to make the popup menu usable in such tunnel quantities, the tunnel activation via systray popup menu was removed, and instead we have a single deactivate button. Signed-off-by: Simon Rozman <simon@rozman.si> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: switch to using %w instead of %v for ErrorfJason A. Donenfeld2020-11-133-5/+5
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* syntax: port to goSimon Rozman2020-11-137-1159/+1014
| | | | | | | | | Arm has no CGo support, so port the syntax editor C code to Go and hope that it's fast enough. This is a pretty literal/unsafe translation from the C. Signed-off-by: Simon Rozman <simon@rozman.si> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* build: work with llvm-rc and use numbered iconsJason A. Donenfeld2020-11-131-2/+2
| | | | | | | It's hard to keep these stable between resource compilers, so just use numbers, and roll with 7 to match rsrc/walk. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* syntax: skip highlights if too many spansJason A. Donenfeld2020-06-091-5/+9
| | | | | | | | The rich text control is slow, so keep in plain text if there's too many. Suggested-by: Simon Rozman <simon@rozman.si> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: go fmtJason A. Donenfeld2020-06-081-2/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* syntax: update to latest from wireguard-tools, for dns search domainsJason A. Donenfeld2020-06-053-11/+12
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* syntax: insist on 256-bit keys, not 257-bit or 258-bitJason A. Donenfeld2020-04-041-2/+23
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui: update copyright dateJason A. Donenfeld2020-03-151-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* l18n: add localization supportSimon Rozman2020-03-1512-144/+159
| | | | | | | | | | | | | | | | | | | | | 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>
* ui: reduce iteration nesting when removing old tunnelsSimon Rozman2020-02-231-13/+6
| | | | Signed-off-by: Simon Rozman <simon@rozman.si>
* ui: remove trailing ā€¦ from file dialog titlesSimon Rozman2019-12-112-3/+3
| | | | | | This is Microsoft Windows general convention. Signed-off-by: Simon Rozman <simon@rozman.si>
* syntax: disable events when highlightingJason A. Donenfeld2019-12-111-0/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui: use unicode ā€¦Jason A. Donenfeld2019-10-285-16/+16
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui: more accurate listview icon drawingJason A. Donenfeld2019-10-281-18/+16
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui: if we're raised before initiation, spin the queues a bitJason A. Donenfeld2019-10-271-0/+6
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui: fix configuration editbox accessibility nameSimon Rozman2019-10-261-2/+16
| | | | | | | RichEdit controls without a label report their name as "RichEdit Control" and the Dynamic Annotation cannot override this. Signed-off-by: Simon Rozman <simon@rozman.si>
* ui: allow (Shift+)Tab to move focus to sibling controls in RichEditSimon Rozman2019-10-261-0/+8
| | | | | | | | | | | With RTF control consuming Tab and Enter keystrokes, there was no way to create or edit a tunnel using keyboard only. This was a major concern for accessibility. Should user want to explicitly insert \t into configuration, one can use Ctrl+Tab, paste it, or use Alt+09 (on numeric keyboard). Signed-off-by: Simon Rozman <simon@rozman.si>
* ui: do not scroll list view horizontallyJason A. Donenfeld2019-10-241-0/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui: fix classic theme drawing with gross hackJason A. Donenfeld2019-10-241-46/+73
| | | | | | | | | | Classic theme won't draw transparent images. But new theme erases the text if we draw ourselves, and we want the OS to draw the text so that we have better accessibility. Support both by hacking classic theme with a zero-sized transparent image for the indentation, while using the transparent image normally for new theme. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui: use native styling on list viewJason A. Donenfeld2019-10-241-44/+52
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui: remove unused structJason A. Donenfeld2019-10-041-6/+0
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui: annotate controlsSimon Rozman2019-10-043-0/+6
| | | | | | | | | | | | | | Regarding interface and peer info text boxes: The read-only edit boxes containing interface and peer status and information were read as "<value> read-only multiline" by NVDA screen reader. The read-only edit boxes that serve the informative purpose only must be annotated as ROLE_SYSTEM_STATICTEXT instead of edit box-inherited ROLE_SYSTEM_TEXT role. Regarding logo image in about dialog: NVDA reads "unknown" when reading the dialog without this patch. Signed-off-by: Simon Rozman <simon@rozman.si>
* ui: always show manage page on tray clickJason A. Donenfeld2019-09-271-4/+2
| | | | | | | | It's confusing if it only does this when the window is not already visible. Reported-by: Kai Haberzettl <khaberz@gmail.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui: don't show more than one about boxJason A. Donenfeld2019-09-271-18/+29
| | | | | Reported-by: Kai Haberzettl <khaberz@gmail.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* mod: bump versionsJason A. Donenfeld2019-09-271-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* manager: switch to vanilla gob from rpc to remove reflection bloatJason A. Donenfeld2019-09-231-2/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: use SECURITY_DESCRIPTOR apis from x/sys/windowsJason A. Donenfeld2019-09-232-4/+3
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui: do not use tray object when nilJason A. Donenfeld2019-09-131-3/+7
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui: fix popup menu placement in syntaxeditSimon Rozman2019-09-131-3/+4
| | | | | | | When pop-up menu is invoked using keyboard, the coordinates are (-1,-1). However, LOWORD/HIWORD return (65535, 65535). Signed-off-by: Simon Rozman <simon@rozman.si>
* ui: cleanupSimon Rozman2019-09-131-1/+0
| | | | Signed-off-by: Simon Rozman <simon@rozman.si>
* ui: syntax: support Shift+Ins pasting tooSimon Rozman2019-09-051-5/+5
| | | | Signed-off-by: Simon Rozman <simon@rozman.si>
* ui: syntax: xor colors with backgroundSimon Rozman2019-09-051-1/+8
| | | | | | | | | | This makes syntax highlighting retain text contrast on black background (e.g. high-contrast mode) Maybe using a smarter arithmetic than XOR could be used to retain errors in red. They turn cyan on black background now. Signed-off-by: Simon Rozman <simon@rozman.si>
* ui: fix log view alternating row high-contrast theme switching issueSimon Rozman2019-09-051-9/+7
| | | | Signed-off-by: Simon Rozman <simon@rozman.si>
* ui: do not initialize in global init()Jason A. Donenfeld2019-09-051-4/+10
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui: add gridlines to logJason A. Donenfeld2019-09-051-0/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui: fix dot-gray.svg iconSimon Rozman2019-09-051-1/+1
| | | | | | | | | | | | | 1. The ImageMagick convert has issues with upsampling. The icon was resized to make ImageMagick downsample it for a much sharper .ico result. 2. The transform was removed to make all coordinates integral. 3. The circle has been shrunken a bit. Spanning edge-to-edge it appeared huge. Signed-off-by: Simon Rozman <simon@rozman.si>
* ui: add label mnemonicsSimon Rozman2019-08-307-22/+20
| | | | Signed-off-by: Simon Rozman <simon@rozman.si>
* manager: fix nits in adapter cleanup logic and also handle ā€˜%sā€™ uniformlyJason A. Donenfeld2019-08-301-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* version: hard code name and version at compile timeJason A. Donenfeld2019-08-301-2/+1
| | | | | | | | | We really do want the true name and version in logs so that external consumers have a good reference point for helping us debug. We can then do the log file directory explicitly. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>