1138 Commits
Author SHA1 Message Date
Zakk 6fe93bebfe Merge pull request #2149 from Zakkaus/tun-loopback-node
fix(tun): leave loopback proxy nodes out of the physical host routes
2026-11-20 18:27:27 +11:00
Zakk fd2981c998 Merge pull request #2132 from wywywywycloud/fix/geoip-cache-generation
fix: discard obsolete GeoIP cache generations
2026-11-20 18:01:06 +11:00
Zakk 53cc9a11f5 fix(tun): leave loopback proxy nodes out of the physical host routes
With TUN on, every proxy node IP gets a host route through the physical
gateway on macOS and Windows. A node on 127.0.0.1, such as a local
forwarder, then had 127.0.0.1 routed to the Wi-Fi gateway: loopback
broke for every process, the connectivity probe of the core API failed,
the transparent proxy paused, the routes went away, the probe recovered
and the cycle repeated. Loopback nodes are reached without leaving the
host, so collectNodeIPs drops them.

Fixes #2148
2026-11-20 18:00:48 +11:00
Zakk f0924d0952 fix(iptables): spell out the DNS redirect priority for older nftables
nftables 1.0.2, which Ubuntu 22.04 ships, rejects the dstnat keyword on
the output hook ("invalid priority expression value in this context"),
so the DNS redirect table failed to load and the core did not start in
redirect mode. Write the same priority as -101; nftables 1.1.7 lists it
back as "dstnat - 1".

Fixes #2133
2026-11-19 22:20:21 +11:00
Codex 5655cff964 fix: cancel HTTP latency checks on core control and page exit 2026-11-19 00:12:19 +03:00
Markson Hon f2681e2696 Merge pull request #2130 from wywywywycloud/feat/global-node-probe
feat: add global node check mode and custom target URL
2026-11-18 19:42:03 +08:00
Markson Hon ff59fc8757 Merge branch 'main' into feat/subscription-node-dns
Signed-off-by: Markson Hon <50002150+MarksonHon@users.noreply.github.com>
2026-11-18 19:29:42 +08:00
Markson Hon dc09276923 Merge pull request #2071 from wywywywycloud/feat/native-group-strategies
feat: expose native proxy-group balancing strategies
2026-11-18 19:28:11 +08:00
Zakk 7b4ad06e75 fix: reach the core's proxy ports on loopback inside Docker
In Docker, subscription and RoutingA updates through the core dialled
the default gateway instead of 127.0.0.1, a leftover from when the core
ran outside v2rayA's container. The core now runs in v2rayA's own
network namespace and, unless port sharing is on, listens on 127.0.0.1
only. With host networking the gateway is the LAN router, and on a
bridge network the request only came back to the container when port
sharing was on and the port was published, so updates in the "proxy"
and "port rules" modes failed with connection refused.

Fixes #2139
2026-11-17 23:11:30 +11:00
2436378140@qq.com 8fee133019 feat(subscription): resolve node domains with a per-subscription DNS 2026-11-17 11:54:14 +08:00
Mikhail Levin 9c7b87fba6 feat: expose native group strategies with group-scoped fallback 2026-11-15 23:16:39 +03:00
Mikhail Levin aab11c05a5 feat: add per-subscription update policies and explicit recovery consent 2026-11-15 14:56:04 +03:00
Mikhail Levin 5360713484 feat: add global node check mode and custom target URL 2026-11-15 07:04:53 +03:00
Mikhail Levin d3a8f97940 fix: discard obsolete GeoIP cache generations 2026-11-15 07:03:50 +03:00
Markson Hon 2dd4d683cc Merge pull request #2057 from wywywywycloud/fix/openwrt-lan-bridge-tproxy
fix(openwrt): include LAN bridges in TPROXY by default
2026-11-13 08:51:46 +08:00
Markson Hon 0efd6759df Merge pull request #2118 from Zakkaus/vless-ech
fix(vless): keep the ECH parameter in share links and the core config
2026-11-13 07:02:53 +08:00
Zakk 4935c04b82 fix(asset): do not create a missing XDG runtime directory
runtimeAssetDir called os.MkdirAll on $XDG_RUNTIME_DIR/v2raya with mode
0700. When v2rayA runs as root on a system where /run/user does not
exist yet (OpenRC with elogind before any login), that created
/run/user itself as 0700 root:root, and every other user then failed to
get a runtime directory.

The runtime directory belongs to the login manager, so use it only when
it already exists and otherwise put the asset links in the
configuration directory, as a service user without a session already
does. A regular file there is one the user placed, so the lookup now
uses it instead of replacing it with a link to the system copy.

Closes #2092
2026-11-13 02:16:34 +11:00
Hocassian 20ad8905d4 fix(vless): keep the ECH parameter in share links and the core config
A VLESS link with security=tls carries its ECH config list in the ech
query parameter. The service dropped it on import, so the stored node,
the generated core config and the exported share link all lost it, and
the server editor dropped it again when a node was edited and saved.

Parse ech into the stored node, pass it to the core as the TLS
settings' echConfigList, and write it back to share links when the
node uses TLS, in the service and in the editor's codec. The service
reads ech from the raw query so that an unescaped "+" in the base64
list stays a "+" instead of becoming a space. The VLESS
encryption half of the original change landed in 3e374af9.

Closes #2093
2026-11-13 02:15:41 +11:00
HougeLangley 7f03ed9953 iptables: fall back to nft when legacy mangle is unavailable
Auto mode previously trusted the iptables userspace backend alone. On PREEMPT_RT kernels, legacy xtables is unavailable even when the legacy iptables binary is installed. Probe the mangle table read-only and select nft only for the specific missing-table failure. Add regression coverage for backend detection and conservative error handling.
2026-11-05 17:13:51 +08:00
Markson GuGa BeyondandCopilot 3e374af969 feat(vless): support encryption and REALITY ML-DSA-65 verify key
Xray v26.10.31 rejects VLESS with encryption none and no TLS or REALITY on public addresses, so post-quantum encryption strings must reach the core. Parse, generate and export the vless encryption and pqv share-link parameters, and expose both in the server editor with translations for all locales.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-02 10:58:07 +08:00
Markson Hon 1ee48148dd Merge pull request #2086 from miaomiaoyaoqimiaomaoxian/fix/system-proxy-mutual-exclusion
fix(v2ray): keep system proxy and tun mutually exclusive
2026-10-16 07:46:23 +08:00
miao db38d18595 fix(v2ray): keep system proxy and tun mutually exclusive
deleteTransparentProxyRules returned before touching the system proxy
whenever no snapshot had been persisted. GetCleanCommands already
handles both cases -- it restores the saved original when a snapshot
exists and falls back to disabling ProxyEnable when none does -- so the
guard only suppressed the fallback that makes the two modes exclusive.

The leftover registry value pointed at 52345, which only the
system_proxy mode ever listens on. Switching back to tun therefore left
proxy-using applications connected to a dead port: their sockets stayed
in SYN_SENT until the process was restarted.

The regression test drives deleteTransparentProxyRules with no snapshot
and asserts the proxy is disabled. Against the previous code it fails
with "the system proxy was never touched"; it passes with this change.
2026-10-15 11:41:17 +08:00
Markson Hon 7609aed42c Merge pull request #2080 from ArianPashae/fix/drop-legacy-outbound-tables
fix(db): drop obsolete legacy outbound tables to prevent foreign key constraint failed (787) on node deletion
2026-10-09 19:56:54 +08:00
ILIKEFUTANARI 6d6c1c117f feat: separate DNS service and interception modes 2026-10-09 17:43:48 +08:00
ILIKEFUTANARI e010d19a5d feat: add DNS interception opt-out 2026-10-09 17:43:48 +08:00
Arian Pashae 48bcc0932d fix(db): drop obsolete legacy outbound tables to prevent foreign key errors on node deletion 2026-10-08 22:09:02 +03:30
Markson Hon 0e3a2ddbee Merge pull request #2073 from big-head-pigeon/fix/transparent-inbound-port-sharing
fix: transparent inbound follows PortSharing so redirected/forwarded (docker) traffic reaches it
2026-10-04 17:20:11 +08:00
Markson Hon 1817643571 Merge pull request #2072 from wywywywycloud/feat/routinga-url-import
Add RoutingA import and scheduled updates from URL
2026-10-04 17:12:15 +08:00
big-head-pigeon 5a1b0c4213 fix(kernel/v2ray): transparent inbound follows PortSharing like socks/http/dns-in
Since v2.4 the dokodemo transparent inbound binds 127.0.0.1 only, so
traffic intercepted by the PREROUTING transparent rules and REDIRECTed
to the interface address (e.g. docker bridge containers) can never
reach it: all bridge-container TCP breaks while transparent proxy is
enabled, a regression from 2.2.x where the inbound listened on 0.0.0.0.

Let the inbound follow the existing 'Allow connections from LAN'
(PortSharing) setting, which the socks/http inbounds
(template_inbound.go) and dns-in (template_outbound.go) already follow.
Default behavior is unchanged (loopback-only with PortSharing off);
with PortSharing on, redirected/forwarded traffic works again.
2026-10-04 15:06:25 +08:00
Markson Hon a8334a2e71 Merge pull request #2069 from wywywywycloud/fix/openwrt-nftables-dns
fix(openwrt): install native nftables DNS redirects
2026-10-02 08:28:33 +08:00
Mikhail Levin 5ec0451a66 fix(openwrt): limit fatal DNS redirect setup to Linux proxy modes 2026-10-01 13:05:11 +03:00
Markson Hon 94693ebbe1 Merge pull request #2067 from himeer/feature/xhttp-range-json-shapes
Kernel: write xhttp ranges in the xray-core's form, import them from 3x-ui links
2026-10-01 11:34:57 +08:00
Vladimir E. Tkachuk 86f57fb05d fix(kernel): drop XHTTP ranges the core would panic on 2026-10-01 12:37:48 +10:00
Mikhail Levin 324351f78d Add RoutingA rule import and scheduled updates from URL 2026-10-01 03:54:50 +03:00
Mikhail Levin 392b1c7942 fix(openwrt): make nft DNS redirect idempotent and preserve legacy startup 2026-10-01 01:01:05 +03:00
Vladimir E. Tkachuk 1710a70741 fix(kernel): model the core's XHTTP padding fields 2026-09-30 15:29:03 +10:00
Mikhail Levin 75ac824b43 fix(openwrt): install native nftables DNS redirects 2026-09-29 21:10:54 +03:00
Markson GuGa Beyond 5506fe1c86 test: fix the Windows socket-option readback
getsockopt(IP_UNICAST_IF) hands the interface index back in host order while
setsockopt wants it in network byte order, so the second swap in
boundProbeInterface compared 0x01000000 against 1 and the IPv4 cases of
TestBoundDirectDialerSocketOptions failed on Windows.
2026-09-29 19:39:10 +08:00
Markson GuGa Beyond df5b4ef2dc fix: send the QUIC probe through the probe dialer
Revision of the dashboard probe: the UDP fallback used an unmarked, unbound
socket, so its datagram entered the transparent interception the probe is
meant to stay out of and the round trip measured the local stack. Take the
dialer PingWithDialer was given, as the TCP dial already does.
2026-09-29 19:39:03 +08:00
Markson GuGa Beyond 152227a84b Merge branch 'main' into fix/dashboard-latency-marked-sockets 2026-09-29 19:38:56 +08:00
Markson GuGa Beyond a2f7952a4f fix: juicity and tuic dial, and a QUIC-only node gets a latency
Every core the service starts has outbound traffic counters on, and with them on
xray wraps the underlay connection of a native QUIC outbound in a
*stat.CounterConnection. That wrapper embeds net.Conn alone, so ReadFrom and
WriteTo are hidden and hint/proxy/juicity and hint/proxy/tuic failed their
net.PacketConn assertion before a single QUIC packet left: the node imported, and
then every connection through it died on the spot. Unwrap the stats connection
before the assertion.

A QUIC server listens on UDP only, so the TCP dial the ping made to its port said
nothing and every juicity, tuic and hysteria2 node read TIMEOUT. Keep the TCP
attempt, and when it fails ask the same port over UDP with a QUIC long header
carrying a reserved greased version: a QUIC server answers that with a Version
Negotiation packet (RFC 9000 section 6), and the round trip of that answer is the
latency. A node that answers neither probe is still TIMEOUT; the troubleshooting
pages in the six locales describe that.
2026-09-29 18:54:02 +08:00
Vladimir E. Tkachuk 7027788e6a fix(kernel): let an explicit false win over the 3x-ui blob 2026-09-29 20:42:19 +10:00
Vladimir E. Tkachuk ccea5d1392 feat(kernel): import XHTTP tuning from 3x-ui style vless links 2026-09-29 15:52:33 +10:00
Vladimir E. Tkachuk 6162730f64 fix(kernel): write xhttp range fields in the xray-core shorthand form
xray-core's splithttp range fields (xPaddingBytes, the xmux limits, the
server-checker intervals) parse a plain integer or an "a-b" string, and
reject the object form XHTTPRangeConfig used to serialize to. Any node
with an xhttp range set produced a config the core refused to load with
"Invalid integer range, expected either string of form 1-2 or plain
integer".

XHTTPRangeConfig now carries a MarshalJSON that emits the shorthand (a
plain integer when From equals To, an "a-b" string otherwise) and an
UnmarshalJSON that accepts both forms the core accepts, so generated
configs round-trip. parseRangeString mirrors the core's ParseRangeString
down to its negative endpoints such as "-114-514". Stored settings are
unaffected: the GUI keeps the endpoints as separate query parameters and
nothing parses the generated config back into these structs.
2026-09-28 21:24:10 +10:00
Mikhail Levin cef8fbc939 fix: bind dashboard probes to TUN egress on macOS and Windows 2026-09-25 21:34:00 +03:00
Mikhail Levin 58af604a99 fix(openwrt): clarify bridge exclusions and retire obsolete flag 2026-09-25 20:26:43 +03:00
Mikhail Levin fd7a587dc2 fix: keep interception during dashboard TCP probes 2026-09-25 16:12:43 +03:00
Mikhail Levin 7209f1ff02 fix(openwrt): include LAN bridges in TPROXY by default 2026-09-25 16:12:43 +03:00
Markson Hon bdbc305e97 Merge pull request #2052 from Zakkaus/iptables-ipset
fix(iptables): match the transparent-proxy whitelist with ipset
2026-09-24 15:13:50 +08:00
Zakk 8b818ffc41 fix(iptables): match the transparent-proxy whitelist with ipset
The iptables path wrote each whitelisted CIDR with its own iptables
process. With the mainland China group (about 15,000 CIDRs) a core start
spent minutes on this, and every packet of a direct connection walked
the list linearly.

Load each family into one hash:net set with a single `ipset restore` and
match it with one rule at the old position. Without ipset, write the
rules with one `iptables-restore --noflush` per family; without that,
keep the per-rule commands. Cleanup destroys the sets.
2026-09-24 01:23:08 +10:00