39 Commits

Author SHA1 Message Date
Roman Zakharchuk c9740b17ad fix h values highlight 2026-06-25 14:41:49 +02:00
Roman Zakharchuk 54fa022e2c feat: upgrade to awg2 deps, remove obsolete params (#77)
* upgrade to awg2 deps, remove obsolete params

(cherry picked from commit 4258ea0fd72f71dcded8155833e437b36afbdedc)

* remove H checks

* remove S checks
2025-12-08 12:21:23 +08:00
RomikB 9b0947bab2 support for awg15 params 2025-07-15 00:15:28 +02:00
RomikB 3f898ed0f5 check and highlight advanced security params 2025-05-30 09:58:10 +02:00
Roman Zakharchuk 918fd3ed3f Import code from RomikB/amneziawg-client-windows (#2)
AmneziaWG for Windows client
2024-04-29 19:37:53 +01:00
Jason A. Donenfeld 6ed37f30f5 global: bump date
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2022-01-06 17:28:13 +01:00
Jason A. Donenfeld a3534b576f global: interface{} -> any
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-12-16 03:14:14 +01:00
Jason A. Donenfeld 182247f5c8 global: apply gofumpt
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-12-09 23:13:56 +01:00
Jason A. Donenfeld d0663c3c94 global: use unsafe.Add where possible
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-10-12 11:44:08 -06:00
Jason A. Donenfeld 96e5d80a3e tunnel: support turning off automatic routing table
This supports the familiar "Table = off" syntax as on Linux, and then
interprets other valid values as simply "on".

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-06-18 11:39:38 +02:00
Jason A. Donenfeld b37434e846 global: bump copyright date
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-02-01 16:55:02 +01:00
Jason A. Donenfeld 9f501c58d4 global: update headers
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-11-22 22:00:32 +01:00
Jason A. Donenfeld 224336aa07 tunnel: enable {Pre,Post}{Up,Down} scripts gated behind admin knob
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-11-22 22:00:32 +01:00
Jason A. Donenfeld 2061a4904a global: switch to using %w instead of %v for Errorf
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-11-13 14:42:54 +01:00
Simon Rozman ea200f82c3 syntax: port to go
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>
2020-11-13 14:42:54 +01:00
Jason A. Donenfeld 166ef3c94a syntax: skip highlights if too many spans
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>
2020-06-09 02:37:33 -06:00
Jason A. Donenfeld 3f166bcbd7 syntax: update to latest from wireguard-tools, for dns search domains
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-06-05 22:06:59 -06:00
Jason A. Donenfeld 504377b9b1 syntax: insist on 256-bit keys, not 257-bit or 258-bit
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-04-04 23:26:10 -06:00
Jason A. Donenfeld 44c147466f syntax: disable events when highlighting
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-12-11 12:06:25 +01:00
Simon Rozman 2a0db27bb1 ui: allow (Shift+)Tab to move focus to sibling controls in RichEdit
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>
2019-10-26 11:39:22 +02:00
Simon Rozman d0cf4426e2 ui: fix popup menu placement in syntaxedit
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>
2019-09-13 12:07:36 -04:00
Simon Rozman 9d6cd66cc3 ui: syntax: support Shift+Ins pasting too
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-09-05 22:03:21 -06:00
Simon Rozman b60ba84710 ui: syntax: xor colors with background
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>
2019-09-05 22:03:21 -06:00
Jason A. Donenfeld 320a0ffcf8 ui: add layout item helper for new layout system
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-07-17 10:35:04 +02:00
Jason A. Donenfeld f10997a8df global: correct names and patterns for go lint
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-05-16 15:49:18 +02:00
Jason A. Donenfeld f98e1cb9f0 ui: react to DPI changes in syntax editor
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-05-16 11:41:11 +02:00
Jason A. Donenfeld eae7cefddc ui: syntax: rehighlight on DPI change
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-05-13 18:19:43 +02:00
Jason A. Donenfeld 47480711e5 ui: syntax: fix indentation
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-05-13 18:19:12 +02:00
Jason A. Donenfeld 20f9b0386d ui: syntax: implement trafic blocking semantics
This is our "auto kill switch".

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-05-05 13:34:54 +02:00
Alexander Neumann 808ff79d55 ui: replace PrivateKeyEvent with walk.StringEvent
Signed-off-by: Alexander Neumann <alexander.neumann@picos-software.com>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-04-23 11:04:59 +02:00
Jason A. Donenfeld a2933de41e ui: syntax: guard calls to highlight
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-04-15 20:00:10 +09:00
Jason A. Donenfeld b80e4a21a1 ui: initial stab at a better confview
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-03-12 03:00:46 -06:00
Jason A. Donenfeld 84ac0732fd syntax: lazily load ui library
This way we don't have msftedit.dll loaded into the address space of the
process doing real crypto.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-03-07 03:02:12 +01:00
Jason A. Donenfeld 10c0a3fa19 syntax: safe dll loading
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-03-06 20:39:47 +01:00
Jason A. Donenfeld 61ef7dd80f syntaxeditor: reject keys we don't parse
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-03-05 05:36:21 +01:00
Jason A. Donenfeld d26a90a4c5 ui: add temporary confview disgusting kludge
This is not the right way to show this information and this commit
should be reverted as soon as we have a real UI.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-03-05 03:22:27 +01:00
Jason A. Donenfeld 67a7015757 syntax: flat border
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-03-02 07:06:07 +01:00
Jason A. Donenfeld dd9e66f067 ui: move walk to go module replace operation
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-02-28 08:18:01 +01:00
Jason A. Donenfeld ebe3f0a0cc ui: move syntaxedit to sub-package
This speeds up compilation time considerably by not needing to invoke
cgo for changes in the main UI.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-02-28 08:05:02 +01:00