Release 1.8.0: auto-update with restart and AmneziaWG 2.0 support.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Navis
2026-07-29 06:45:57 +03:00
co-authored by Cursor
parent cd0b3f4707
commit 672979be4c
27 changed files with 1396 additions and 228 deletions
+28
View File
@@ -0,0 +1,28 @@
package awg
import "strings"
// Detect is also used by linknorm / netcheck.
func LooksLike(raw string) bool { return Detect(raw) }
// IsAWG20 returns true when obfuscation params typical of AWG 1.5/2.0 are present.
func (c Conf) IsAWG20() bool {
if c.I1 != "" || c.I2 != "" || c.I3 != "" || c.I4 != "" || c.I5 != "" {
return true
}
if c.Jc != 0 || c.Jmin != 0 || c.Jmax != 0 {
return true
}
if c.S1 != 0 || c.S2 != 0 || c.S3 != 0 || c.S4 != 0 {
return true
}
if c.H1 != "" || c.H2 != "" || c.H3 != "" || c.H4 != "" {
return true
}
return false
}
// StripBOM removes a UTF-8 BOM if present.
func StripBOM(s string) string {
return strings.TrimPrefix(s, "\ufeff")
}