b1fd2c12 said it rendered a multi-size .ico from the SVG, but the file it
committed holds a single 16x16 entry (664 bytes): the packer was fed one
size. Browsers that pick the .ico over the SVG (bookmarks, some tab
strips, pinned sites) scaled 16 px up. Before that commit the file was one
32 px entry.
Rebuilt from gui/src/assets/img/v2raya-icon.svg with rsvg-convert as
16, 32, 48 and 256 px PNG entries (18 KB). The installer icon stays as
107d8e35 set it.
The binaries workflow, the PR workflow and build.ps1 no longer pass
-tags tinytun; there is nothing behind the tag. The Windows installer
takes wintun.dll from the official 0.14.1 package, pinned by hash, one
DLL per architecture, and deletes a tinytun.exe an earlier installer left
in the application's bin directory. The README states what the built-in
TUN does and its known limitation on Windows and macOS.
The transparent-proxy option reads "tun" and is enabled by the version
endpoint's tunSupported flag. The bypassed-interfaces picker and the
process-exclusion backend selector go away with the settings behind them;
the interface-list fetch and its state go with the picker. The route
script and process exclusion dialogs stay, renamed, with copy that no
longer refers to a TinyTun process; the tooltips describe what the
built-in TUN does and its known limitation on Windows and macOS. The log
viewer no longer classifies a [tinytun] source. All six locales updated;
every removed key has no remaining reference.
Neither platform has a socket mark, so the physical default route is left
in place and two /1 routes per family are added on the TUN instead; the
core's sockets and the DNS module's upstreams are bound to the physical
interface, which the template reads from the default route before the
TUN routes exist.
Windows points the adapter's DNS at the TUN gateway address with the
lowest interface metric; queries sent there enter the TUN and the core
relays them to the DNS module. macOS needs two things more. A socket
bound to en0 with IP_BOUND_IF looks routes up in en0's scope, and once
the /1 routes exist the only match is theirs, so the lookup fails with
ENETUNREACH: a scoped copy of the physical default route
(route add -ifscope en0 default <gw>) gives bound sockets a way out. And
mDNSResponder scopes its queries to the service's interface, dropping a
reply that arrives through the utun, so the system resolver is pointed at
loopback and the DNS module gets a 127.0.0.1:53 listener in tun mode.
The routes use the gateway form, as xray's own tun does. The kernel
assigns the utun unit and the service finds the device by its address;
the previous resolvers of every network service are kept for stop.
Both were exercised in milestone C: a Windows Server 2025 VM and an
arm64 MacBook. Applications that query a LAN resolver directly still
bypass the TUN on these platforms in this phase; that is documented as a
known limitation.
The module asked every upstream with DNSSEC OK and handed the upstream's
additional section back untouched, so a client got an OPT record it never
sent — carrying the module's loop token and the DO flag — and RRSIG
records it did not ask for. macOS's resolver treats such an answer as
invalid and waits out its 30-second timeout on every uncached name, which
made the tun mode's loopback resolver unusable there. Upstream queries no
longer set DO (the module validates nothing), and the response is
rewritten to the client's EDNS: no OPT when the client sent none, a fresh
OPT with the client's UDP size and DO bit when it did, and RRSIGs only for
a DO client.
transparentType=tun no longer starts the TinyTun process. The template
emits a tun-mips inbound tagged transparent — device name, address, MTU,
the DNS module's address as the relay target, the user's exclusion list
plus v2rayA and the core by name and v2rayA by PID — and the service does
what the operating system needs once the core has the device up.
On Linux that is one table and four policy rules: table 2020 holds the
default route into tun0; marked packets (0x80: the core's sockets, the
direct outbound, the DNS module's upstreams) look up main in full and
leave through the physical interface, or fail with ENETUNREACH when main
has no route for their family rather than fall into the TUN; unmarked
packets take main with its default route suppressed, so LAN and static
routes stay physical, and everything else goes to table 2020. The main
table is never edited, so stopping restores egress by itself. A rule in
our preference range or a route in our table that is not ours is reported
and left alone; our own leftovers from a crash are removed first. Every
command that succeeded is recorded and undone in reverse on stop.
Three things the TinyTun path never hit are now on tun's path, so they
are fixed here: the DNS module is generated in tun mode (TinyTun did DNS
itself); its 127.2.0.17:53 listener is only added when port 53 is free,
instead of making the core exit on a host running another resolver; its
primary listener stays on loopback unless port sharing is on or the user
chose an address, and the DNS REDIRECT rules and their cleanup follow the
module's port instead of a hard-coded 52353, and a ::1 listener is added
when IPv6 is supported, because ip6tables REDIRECT delivers an
application's IPv6 query to ::1 which the IPv4 listener never saw. The
tun branch no longer
skips those rules: they are what catches queries to a LAN resolver, which
the routing keeps off the TUN.
The connectivity monitor probes the core's API port; the TinyTun socks
loop-back port it used is gone. Removed with TinyTun: --tinytun-bin, the
tunProcessBackend (eBPF) and tunBypassInterfaces settings (connected and
static routes bypass the TUN unconditionally now), the /networkInterfaces
endpoint that only served the latter, and the build tag. The version
endpoint reports tunSupported instead of tinytunSupported.
Tests cover the generated inbound and DNS module, the listen-address
rules, the redirect port, and — with V2RAYA_CORE_BIN set — that the
generated document loads in the real core. Windows and macOS route
handling follows in a separate commit; until then those builds report
the TUN as unsupported.
On Linux the module's upstream, bootstrap and health-check sockets carry
SO_MARK 0x80, which the transparent-proxy rules exempt. Windows and macOS
have no mark: once a TUN holds the default route, those sockets would send
the module's own queries into the TUN, where the core's port-53
interception hands them straight back to the module. The module config
gains egress_interface; when set, every dialer created by
newMarkedDnsClient binds to it with IP_UNICAST_IF / IPV6_UNICAST_IF on
Windows and IP_BOUND_IF / IPV6_BOUND_IF on macOS. Unset, the dialers are
unchanged, and Linux keeps the mark.
The darwin and windows tests dial through the dialer and read the option
back; they run on those platforms. The interface lookup itself is tested
everywhere.
The inbound is registered like xray's tun: it declares no listening
network, opens its device in Start, and tears the stack down in Close. Its
settings object is validated on load — name, mtu, address4 and dnsTarget
are required, address6, excludeProcesses, selfPids and directTag are
optional — so a field the service forgot fails the configuration instead
of becoming a zero value at runtime.
The JSON loader gains an inbound side. It is a separate protocol set from
the outbound one, and a protocol used in the wrong direction is an error
rather than being stripped and then silently skipped. The three production
entry points (file builder, cmdarg loader, reader loader) now share one
strip and one append step, so an inbound cannot be handled on one path
and forgotten on another. The receiver settings carry the sniffing block,
which is what the proxyman builds the sniffing context from.
Tests load the document the service will generate through both the file
and the reader path and check tag, sniffing, every settings field, no
listening port, and that the native socks inbound beside it is untouched;
they reject tun-mips as an outbound and anytls as an inbound, fail a
document missing dnsTarget, and confirm a document without custom
protocols is returned byte-identical.
A flow's owner is looked up once per TCP connection or UDP session from
the application's local address and port: sock_diag plus a /proc fd scan
on Linux, the iphlpapi owner-PID tables on Windows, the pcblist sysctl on
macOS. A wildcard-bound UDP socket is matched by port when no exact match
exists. When any owner is the core or v2rayA itself (by PID, so a renamed
binary still counts) or is on the user's list (by executable basename,
case-folded and without ".exe" on Windows), the session is dispatched with
a forced outbound tag so the router is skipped and the direct outbound —
which already carries the self-exclusion mark — takes it.
An owner that cannot be determined, because the lookup failed or the
socket is already gone, leaves the flow on its normal route: proxying a
packet that should have gone direct is the safer mistake, and this is the
same boundary TinyTun's /proc backend had. The Windows and macOS lookups
compile but are verified on those machines, not here.
A query the application sends to any resolver that is not an address of
this host — a public one, the TUN gateway address the system resolver is
pointed at on Windows and macOS — is relayed to the core's DNS module
instead of being routed. UDP sessions are per four-tuple and replies are
sourced from the resolver the application queried; TCP streams are relayed
both ways. Queries to loopback or to one of the host's own addresses are
left to ordinary routing: they never enter the TUN in the first place, and
the module's own listener on 127.2.0.17 is one of them.
The relay target is the module's listen address; it is not yet wired to
configuration, which the inbound registration commit does.
Each accepted TCP connection becomes one DispatchLink with the same session
context xray's tun inbound builds (inbound tag, sniffing request, user
level, access log), so routing rules, geosite and sniffing treat TUN
traffic exactly like the socks inbound did.
UDP is keyed by the application's source address only: datagrams from one
socket to any number of remotes share one dispatcher session, every buffer
read by the outbound carries its own destination in buf.Buffer.UDP, and
every buffer the outbound writes back carries the remote it came from,
which the stack uses as the source address of the datagram it sends to the
application. That is the full-cone behaviour TinyTun's socks loop could
not offer. The datagram is enqueued under the session lock because the
session is closed under the same lock when the outbound finishes.
Tests use a fake dispatcher: one TCP flow yields one DispatchLink with the
right destination and inbound tag and bytes flow both ways; two UDP
destinations from one source yield one session whose buffers carry each
destination, a packet from a third remote is written back with that
remote as its source, and the session is recreated after the outbound
finishes.
The TUN inbound that replaces the external TinyTun process needs a device
and an IP stack before it can hand anything to the dispatcher. This adds
both behind a stack-independent contract (Handlers: one TCP callback per
accepted connection, one UDP callback per datagram with a reply function
that chooses its own source address) so the stack can be swapped without
touching the forwarding code that follows.
The stack is mipstack in transparent mode: it owns no address, admits every
unicast packet the device delivers and answers from whatever address the
application dialed. The interface address belongs to the operating-system
side of the link and is deliberately not registered with the stack —
mipstack routes packets to its own addresses into an internal loopback, so
replies would never reach the device. The core configures that address on
the interface itself (netlink on Linux, winipcfg on Windows, SIOCAIFADDR on
macOS); other platforms compile but report ErrUnsupportedPlatform.
Tests drive the stack through wireguard's channel device: a SYN gets a
SYN-ACK back and, once the handshake completes, the TCP handler runs with
the right flow; a UDP datagram reaches the handler and a reply from a third
address leaves the device with that address as its source, which is what
full-cone NAT needs later. Both run for IPv4 and IPv6.
Dependabot's bump fails the build: vite.config.js defined the global apiRoot
as a template literal evaluated on every read (the backend address lives in
localStorage and the address dialog changes it), and Vite 5+ only accepts a
literal in define. The global is a getter on window now, installed by a plugin
imported first in main.js, returning the same expression on every read; the
call sites are untouched.
The card header put the server name, the subscription name and the group tag
on one flex row: a long tag such as "PROXY - 负载均衡 (2)" squeezed the name
into two lines while staying centred against them, and the subscription name
wrapped wherever the row broke. Bulma's small message also pads the header
and the body differently, so a gap opened under the title and the body text
sat a step further in.
The name takes the row, a tag that does not fit drops to its own line, the
subscription name always sits under both, and header and body share their
padding.
The card asked for 65rem. The root font is 0.9em up to 1400px and 16px above
it, so on any wider viewport — a 200% display scaling or a zoomed-out window
gets there — 65rem is 1040px while the wrapper Buefy sizes the dialog with is
capped at 960px: the card ran 80px past it and the close button, which sits on
the wrapper's corner, ended up in the middle of the header. 60rem is 960px at
the 16px root and never wider than the wrapper.
"HOST(2) (info)" becomes "HOST (2) · info". The handle that brings the status
sidebar back was a 36px glyph in a shadowed box, the largest control on a
phone screen; it is a 32px target with a tooltip now.
The list header printed the Subscription-Userinfo header as
"download: 0 GB; upload: 0 GB; total: 107 GB; expire: 2026-10-04 18:59 UTC"
and then, after a "|", the provider's own STATUS= line with the same numbers
in GiB and a Go-formatted timestamp. The header is the standard form: when it
is present it is rendered alone as "Used 1.78 GiB / 100.00 GiB · Expires
2026-10-04" (GiB throughout, the day in local time); the STATUS= text is used
only when the provider sends no header.
#1973 raised golang.org/x/net to v0.54.0, which removed http2.TrailerPrefix;
google.golang.org/grpc v1.57.1 still referenced it, so `go build ./...` in
service/ failed:
grpc@v1.57.1/internal/transport/handler_server.go:242:18: undefined: http2.TrailerPrefix
grpc v1.84.0 (with protobuf v1.36.11 and the matching genproto) builds against
it; go mod tidy moved x/net to v0.57.0 and x/crypto to v0.54.0 along the way.
The navbar and the login dialog showed logo2.png, a raster wordmark that
blurred on 2x displays and needed a colour filter to survive the dark theme.
The brand is now the circular icon as SVG with the name as text, so it
renders sharp at every size and takes the navbar's colour in both themes; on
narrow phones the name goes first, then the icon.
The favicon is the SVG with a multi-size .ico fallback, and the PWA-era PNGs,
the tile icon and the Windows installer icon are rendered from the same file.
Without --log-file the viewer said "log printed to console, please see log in
console", which the Windows service, the launchd job and every "log to
console" setup cannot do. The logger now also keeps its last 4 MiB in memory
and the viewer reads that tail when there is no file; the lines carry the
same timestamp and level prefix as the file adapter's.
The log area also gave way to nothing: at 50vh a short window pushed the
filters and the export button below the fold with only a scrollbar to hint at
them. It now shrinks so the footer stays visible.
The installer writes {app}\v2rayA_env.txt with the log file and the asset
directory and points at it with a machine-wide environment variable, then
starts the service — which runs with the Service Control Manager's
environment from boot time and does not see the variable until the next
reboot. Until then v2rayA logged nowhere and looked for assets in the config
directory, and the web log viewer showed only "log printed to console".
When neither the variable nor --win-envfile is given, look for the file where
the installer puts it: the executable's parent directory, then its own.
lucide-static's stylesheet declares eot, woff2, woff, ttf and a legacy SVG
font for all 2112 icons, so Vite copied every format into web/ and the
embedded binary grew from about 26 MB to 48 MB; the SVG font alone is 20 MB of
glyph outlines. The interface uses 44 icons.
A Vite plugin (gui/build/lucide-subset.mjs) scans src/ for icon names — class
usage, icon props, dialog options and the Buefy pack's internalIcons — subsets
lucide.woff2 to those glyphs with subset-font and serves the result as a
virtual stylesheet with the 8 KB font inlined. A name the font does not have
fails the build naming it, where it used to render an empty box.
lucide-static's font CSS references all five webfont formats (eot, ttf,
svg, woff, woff2), so Vite emitted ~23 MB of icon fonts into the web panel;
the SVG font alone was ~20.6 MB. All of them render the same glyphs.
scripts/lucide-font.mjs now regenerates src/assets/lucide-font.css from the
upstream CSS with a woff-only @font-face (woff is supported by every
browser since IE9) and runs automatically via the prebuild/preserve hooks,
so a lucide-static upgrade stays in sync. The build output drops from
~23 MB of font files to a single ~414 KB woff while keeping all icon
classes.
The vendored core/xray submodule is dropped. xray-core is now pinned via a
go mod pseudo-version resolving to v26.7.28 (commit 5ca6f4b7); v26 tags are
not directly resolvable because Xray's module path lacks the /v26 suffix, so
the pin must be made by commit hash. CI workflows and the AUR PKGBUILD no
longer need "submodules: recursive" / "git submodule update".
The juicity and tuic outbounds are ported from softwind to
github.com/daeuniverse/outbound (temporarily replaced with an olicesx fork
pending sticky-ip support):
- Dialer calls use DialContext; the network string is decoded with
netproxy.ParseMagicNetwork instead of a "udp" prefix check, since it may
be binary-encoded via netproxy.MagicNetwork.
- A packetConnAdapter wraps xray's UDP dial result: outbound asserts the
underlay conn to netproxy.PacketConn whose ReadFrom/WriteTo signatures
(netip.AddrPort / string) differ from net.PacketConn, while xray returns
*internet.PacketConnWrapper.