161 Commits
Author SHA1 Message Date
Markson Pigeonzilla Plus 06273efcc1 fix: cert chain sha256 not applied of juicity 2026-08-11 20:26:49 +08:00
Xing Shi CaiandClaude Fable 5 106fbbd519 🐛 (subscription): Remap connected server by unique name when IP rotates
- Providers like Just My Socks keep node names and credentials stable but rotate IPs, which defeats the endpoint match; fall back to name matching guarded by name uniqueness on both sides

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-23 08:48:27 +08:00
Xing Shi CaiandClaude Fable 5 031e664bf2 🐛 (subscription): Remap connected server by endpoint on update
- Fall back to protocol+host:port matching when the exact share URL no longer matches (providers rename nodes on refresh)

- Reload the running core after a remap so the new server config takes effect immediately

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-22 10:03:05 +08:00
Markson Joe Hon eef675f5f9 fix: persist kernel exit status across restarts and fix geosite DNS resolution
core: fix geosite.dat parsing in DNS resolver
- Replace broken GeoSiteList unmarshal with correct varint-length-delimited
  stream parser matching xray-core's format
- Add result caching to avoid re-reading the file per tag expansion

service: persist kernel exit status for proper state restoration
- Add LastKernelExitStatus (running/stopped/crashed) to DB
- Set 'running' on graceful shutdown while kernel is active so it
  is automatically restored on next startup
- Set 'stopped' when user explicitly stops the kernel via API
- Set 'crashed' when the kernel exits unexpectedly
- Check saved status at startup and log appropriate messages
- Expose lastKernelExit field via GET /api/version for the frontend
2026-07-02 13:51:44 +08:00
Markson Joe Hon 47f1462baf feat: init a new for v2raya core and fix a firewall mistake 2026-07-02 13:10:12 +08:00
yuexps 024e764313 feat(server/gui): add Unix Domain Socket and BaseUrl support for FnOS & reverse proxies 2026-06-28 20:40:07 +08:00
Markson Pigeonzilla Plus bf8aa12ace service: drop ngui and drop v2ray/xray check 2026-06-26 10:07:43 +08:00
Markson Pigeonzilla Plus ff6bf0a43d Remove v2ray/xray core version detection and comparison logic
Since v2rayA now exclusively uses the v2raya_core binary, simplify or
remove all logic that detected, compared, or branched on different
core types (v2ray, xray, merged).

- Remove CheckCoreVersion, CoreVersionMismatchError, and the
  CoreVersion check in StartCoreProcess — core v2raya version
  comparison is no longer needed.

- Remove DetectCoreTypeByBinaryName and the Unknown/V2ray/Xray/Merged
  variant aliases. The only remaining Variant constant is V2rayaCore.

- Simplify GetV2rayServiceVersion: drop all CoreType/env-config
  detection and variant mismatch verification. The function always
  returns V2rayaCore and the version string from the binary.

- Simplify CheckV5 / isVersionSatisfied to return only an error,
  dropping the unused Variant return value.

- Remove variant-branching in Shadowsocks and Trojan Configuration
  methods — both always use the MT (Xray-compatible) path.

- Remove the CheckCoreVersion call from version.go and hardcode
  coreVersionValid/ variant in the API response.

- Drop the now-unused where import from shadowsocks.go and trojan.go.
2026-06-26 09:44:14 +08:00
Markson Pigeonzilla a30c757d07 fix(service): reduce lock contention, improve Windows resilience, fix TinyTun races
ProcessManager.Start() now runs resolv/GFWList checks before acquiring
m.mu and defers afterStart (transparent-proxy setup, DNS, TinyTun,
post-start hook) to after the lock is released, eliminating multi-second
lock holds caused by DNS lookups and external hook commands.

TinyTun:
- Fix cancel/stopping ordering race in startTinyTun: assign the new
  cancel func before clearing the stopping flag so a concurrent
  stopTinyTun always sees the correct cancel
- Resolve proxy-node hostnames concurrently with sync.WaitGroup instead
  of sequentially, reducing config-generation latency
- stopTinyTun now waits up to 5 s for the process to exit via a done
  channel closed by the monitor goroutine after cmd.Wait() returns

Windows service lifecycle:
- cleanupResources enforces a 30 s hard timeout and adds panic recovery
- HTTP router is shut down before the core process on service stop
- router.Run uses an explicit http.Server + Shutdown() for graceful teardown

Connectivity monitor:
- Extend startup grace period to 15 s on Windows (5 s elsewhere)
- Replace fixed 30 s re-check ticker with exponential back-off (30/60/120 s)
- Probe TinyTun availability via TCP dial to the SOCKS5 port instead of HTTP

Platform guards:
- resolv.CheckResolvConf/WriteResolvConf: no-op on non-Linux
- DNS-hijack operations (NewResolvHijacker, HijackResolv, etc.): Linux-only
2026-05-22 15:50:14 +08:00
Markson Hon 72dad35557 feat(service): pause transparent proxy on network loss and report state 2026-05-11 23:38:32 +08:00
Markson Hon 5a3a44b65b feat: add custom inbound-to-outbound binding with per-inbound routing rules 2026-05-11 23:38:32 +08:00
Markson Hon 1d39ea65ca fix(router): harden embedded statigz route registration
Add a safe statigz handler wrapper that validates fs roots and recovers from FileServer initialization panics.\n\nUse a generic embedded route registrar for /static and /_nuxt with fallback candidates, so both gui and ngui layouts avoid startup panic: open .: file does not exist.
2026-05-05 11:39:02 +08:00
Markson Hon 72c73687f0 fix: prevent panic when _nuxt directory does not exist in embed FS
- Wrap /_nuxt/* route registration in fs.Sub() error check
- When _nuxt directory is absent (gui build without ngui),
  skip route registration entirely instead of passing an invalid
  FS to statigz.FileServer which caused panic on Open('.')
2026-05-05 11:20:29 +08:00
Markson Hon b94cb0bb2b feat: add build-with-ngui scripts and serve _nuxt/ routes
- Add build-with-ngui.sh (Linux) and build-with-ngui.ps1 (Windows)
  using pnpm + nuxt generate for ngui frontend
- Configure nuxt.config.ts with nitro.output.publicDir pointing to
  service/server/router/web/ for go:embed compatibility
- Add /_nuxt/* route in ServeGUI() to serve Nuxt 3 static assets
  alongside existing /static/* route
- Both build systems coexist: build.sh for gui, build-with-ngui.sh for
  ngui, Go router handles both
2026-05-05 09:34:55 +08:00
Markson Hon 487c511062 feat: support WebSocket Early Data, gRPC MultiMode and WireGuard protocol
- Add MaxEarlyData and EarlyDataHeaderName fields to WsSettings for WebSocket Early Data support
- Add MultiMode, IdleTimeout, HealthCheckTimeout, PermitWithoutStream, InitialWindowsSize fields to GrpcSettings
- Add WireGuardSettings and WireGuardPeer structs for WireGuard outbound configuration
- Add wireguard to supported import protocol prefixes
- Parse and export WebSocket Early Data and gRPC MultiMode parameters in V2Ray server object
2026-05-04 21:32:36 +08:00
Markson Hon fd7162e88f feat(service): add custom inbound APIs and strengthen outbound/account flows 2026-05-04 19:07:22 +08:00
Markson Hon 56c1f8fbfd try to mix cores 2026-05-02 11:58:21 +08:00
Markson Hon f94a350188 gui: use vite to build web 2026-04-14 17:33:04 +08:00
ed00d75423 feat(server): finish TinyTun rollout and backend selection
Squashed from:
- c3e8b07f feat: add GET /api/networkInterfaces controller
- 10a5dc38 try to fix null pointer
- 4fa3e6c7 Merge branch 'v2rayA:main' into main
- 5e0457e7 tun: use tinytun v0.0.1-beta.4
- ce4bfa34 shadowsocks and trojan backend choosen

Co-authored-by: Markson Pigeonzilla <marksonpigeonzilla@bugdows.cn>
Co-authored-by: Markson Hon <50002150+MarksonHon@users.noreply.github.com>
2026-03-21 15:02:13 +08:00
89aca5911c feat(tun): migrate transparent proxy from Sing-Tun to TinyTun
Squashed from:
- bc2e2215 Remove all Sing-Tun related code, frontend and build tags
- 51c11701 Add TinyTun support for TUN-based transparent proxy
- d203a9e9 Add TinyTun auto_route toggle and custom route script dialog
- 4c67a319 Improve UI consistency and add tinytun build tag
- 6e411be6 use TinyTun instead of SIng-Tun

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Markson Hon <50002150+MarksonHon@users.noreply.github.com>
2026-03-21 15:01:17 +08:00
Markson PigeonzillaandMarkson Hon 608b44e2f8 fix(windows): carry forward env, startup, and legacy TUN follow-ups
Squashed from:
- 856a3730 ci: update go to 1.26
- 191be38f tun: fix IPv6 address under win
- 3ca4d5cd windows: v2rayA should read win env like %temp%
- 48a84438 windows: v2rayA should start after modified PATH
- c87bbf62 fix .exe ext-name under windows
- 614bfe1c dns: fix a error about dns format
- 991319ff pre.go: don't create C:\etc
- 9f31b39c translated all comments to English
- aaa269f7 try to fix Tun DNS
- 25c84ad9 面向云代理会话的 VS Code 中的检查点

Co-authored-by: Markson Hon <markson@nixos.local>
2026-03-21 15:00:28 +08:00
Markson HonandMarkson Pigeonzilla fe54c20e54 refactor(tun): modernize legacy route handling and DNS plumbing
Squashed from:
- ede4275e tun: better OS command
- 6a30c17c Tun: better route command
- 4b0f8e94 dns: rewrite DNS module

Co-authored-by: Markson Pigeonzilla <marksonpigeonzilla@bugdows.cn>
2026-03-21 14:59:01 +08:00
Markson Pigeonzilla fb3be4a454 tun: DNS shoud NOT be looped 2026-02-17 15:05:57 +08:00
Markson Pigeonzilla 7ea3024c95 gui: better log 2026-02-14 22:25:31 +08:00
Markson Pigeonzilla 4eb2807de7 service: better user account check under Windows 2026-02-12 20:19:07 +08:00
Markson Pigeonzilla ba2c2fb0c1 Add xray mutli-server support 2026-02-05 18:10:05 +08:00
Markson Hon e1d30ff924 renove PingTunnel and fix ALPN of tuic 2026-02-04 23:05:56 +08:00
Markson Hon c69f74da2d fix non-v2ray-based links creations and edit 2026-02-04 21:48:30 +08:00
Markson Hon 6c9737f334 fix UDP based connections 2026-02-04 21:29:07 +08:00
Markson Hon aad7e17195 update daeuniverse/outbound 2026-02-04 21:11:26 +08:00
unknown-o afef751c18 feat: support custom tproxy direct ip 2025-11-05 20:08:10 +00:00
unknown-o 99bd664827 feat(backend): support setting tproxy white ip group 2025-11-05 16:30:24 +00:00
Valeriy Manzhos b3baaef94f Impove Xray support 2025-03-27 12:09:19 +03:00
Valeriy Manzhos b884753a97 Fix IsSupported() 2025-03-27 01:19:36 +03:00
Valeriy Manzhos b8e0ddc637 Disconnect from subscriptions before auto-selecting servers from them
to limit the number of connected servers and avoid hitting the limit
2025-03-26 17:05:33 +03:00
Valeriy Manzhos 95b1df8526 Check if the server is supported before connecting
This is required due to incomplete support for Shadowsocks in
v2fly/v2ray-core and xray
2025-03-25 19:09:25 +03:00
Valeriy Manzhos 8ad9994f74 Add error handling 2025-03-21 17:12:42 +03:00
Valeriy Manzhos 31a1c63339 Improve logging 2025-03-21 16:29:56 +03:00
Valeriy Manzhos 3f30a88816 Add a function to automatically select servers from all subscriptions that have AutoSelect flag 2025-03-21 16:05:16 +03:00
Valeriy Manzhos 229cab54e9 Add a function to connect to all servers from a subscription 2025-03-19 17:57:34 +03:00
Valeriy Manzhos 8ac8ebd676 Write the value of the checkbox in the boltdb 2025-03-13 15:44:22 +03:00
unknown-o bbc7e1c0ee feat(backend): suport download gfwlist form custom link 2025-02-09 01:54:15 +00:00
unknown-o 6cf02e4afb feat(backend): add delete gfwlist func 2025-02-09 00:51:44 +00:00
unknown-o a0c88bb57f feat(backend): add domain excluded setting 2025-02-07 06:00:23 +00:00
Gaojianli 233a5552a8 finish gui 2024-10-08 17:18:52 +08:00
Gaojianli 15bb200b65 add support for custom api port 2024-10-08 16:44:47 +08:00
N0p1nt e7e7bc2545 fix: nil dereference panic of v2ray-core when testing http latency 2024-02-24 20:21:53 +08:00
陈鼫RWHTYFZ 0459bad0f0 feat: 'testUrl' queryparam for api/httpLatency (#1193) 2023-12-02 15:20:24 +08:00
Markson fb60f7244d replace v2raya.org with GitHub 2023-11-04 22:34:46 +08:00
weiandzengwei 0419687193 feat: Allow to modify address of subscriptions (#1095)
Co-authored-by: zengwei <544278032@qq.com>
2023-10-19 15:18:27 +00:00