feat(nodes): WireGuard / AmneziaWG outbound via wireguard:// scheme [T2]
build / aarch64_cortex-a53 (push) Successful in 3m31s
build / x86_64 (push) Has been cancelled

Nodes are URI-only, so WireGuard is a new share-link scheme handled in
ParseShareLink — the generator, fingerprint, probe, chain, group and egress
paths all keep working unchanged (no model.go/generate.go control-flow edits).

- sharelink.go: wireguard://|wg:// dispatch → parseWireguard (emits xray
  "wireguard" outbound; no streamSettings so withMark owns the loop-guard mark).
- wireguard.go (new): wgConfig, parseWGConf (wg-quick/AmneziaWG INI), wgConfigToURI,
  wgAWGSupported flag (default off — mainline xray 25.1.30 lacks AWG obfuscation),
  helpers splitCSV/atoiOr/splitEndpoint/parseReserved/toAny3.
- sub.go: schemePrefixes adds wireguard/wg; ImportNodes converts a pasted .conf to
  a wireguard:// URI; extractIdentity fingerprints WG by peer endpoint+publicKey.
- main.go: wireguard selftest fixture. nodes.js: URI placeholder/help mentions WG.
- tests: wireguard_test.go (parse/defaults/missing, .conf round-trip, mark,
  fingerprint uniqueness, generate, import).

Verified live on the 512M VM: xray 25.1.30 ACCEPTS the wireguard outbound
(xray -test OK); endpoint 203.0.113.10:51820, sockopt.mark==255. r10.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
omarandClaude Opus 4.8 committed 2026-07-09 15:27:22 +03:00
1 parent ee7df9f3a1
commit ad272af260
10 files changed
+539 -5

No files matched your search

+1 -1
View File
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=xrayctl
PKG_VERSION:=0.1.0
PKG_RELEASE:=9
PKG_RELEASE:=10
PKG_MAINTAINER:=shater
PKG_LICENSE:=MIT