The fpm invocation and its four hand-written architecture tables give way
to nfpm driven by install/nfpm/v2raya.yaml: nfpm maps the Go architecture
onto the name each packager expects, and writes the packages straight to
their published file names, so the rename step goes away too.
The package file names and the architecture matrix stay as they were, and
an apk package is added for Alpine, which boots the OpenRC script instead
of a systemd unit.
after_install.sh and after_upgrade.sh were the fpm hooks; their only
caller is gone, and the nfpm config carries equivalent maintainer
scripts.
install/nfpm/v2raya.yaml describes every Linux package of a release: the
two binaries, the rule data the packaging job downloads, the desktop
entry, nine icon sizes rendered from gui/src/assets/img/v2raya-icon.svg,
and, per packager, either the systemd units or the OpenRC init script
together with its conf.d file.
The rule data is shipped as regular files rather than as symlinks into a
v2ray-rules-dat package, which no distribution provides.
The maintainer scripts reload systemd where it exists and do nothing on
Alpine.
Strings that still named v2ray-core, "v2ray / xray" or a wiki: six locales
(the core is v2raya_core; the invalid-service message, the SS plugin help,
the transparent-proxy hint, the TUN example, the custom inbound tag hint),
the --v2ray-bin, --core-startup-timeout and --plugin-manager descriptions
and their copies in the OpenRC confd files (the plugin manager is called
with --stage=parse|configuration, --link and --v2raya-confdir, not with
life-cycle stages), two comments that forbade or excused the current design,
the package descriptions that listed SSR, the AUR Go minimum (go.mod says
1.26), the systemd Documentation= and the installer's shortcut that pointed
at the wiki and the docs site, and the README sentence on network requests,
which left out the weekly release check and the NTP query on VMess failure.
copyfile, the empty ports/ss.go stub, parseDnsAddr and DnsRouting (the DNS
config is generated for the core's module now), the Inter font and the
switch-menu icon of the old GUI, the docs-site dispatch workflow (the site is
retired; the docs are in the app), the unused v2ray_arch in the docker helper,
the root .gitignore rule for a web directory that moved, and the .dockerignore
patterns for binary and test names that no longer exist. The skipped
TestFillEmpty asserts what FillEmpty does instead of what it once did.
A read of the tree for home-grown code that a dependency or the platform
covers. Each item names what replaces it.
- IPv4 CIDR membership was a binary-string trie (infra/dataStructure/trie)
fed with CIDRs rendered as bit strings; net.IPNet.Contains, which the
same file already used for IPv6, does it. The trie package is gone.
- The response replay cache was an LRU with its own linked list, indexes
and timeout strategy (infra/dataStructure/lru), of which one fixed-size
instance existed; hashicorp/golang-lru/v2, already in go.mod, is that
cache, typed. go mod tidy also dropped go-nanoid, which nothing imported.
- The HTTP client for subscription updates through the local proxy carried
a CONNECT dialer of its own (pkg/util/proxyWithHttp); http.Transport's
Proxy handles socks5:// and http:// URLs, resolves hostnames on the
SOCKS proxy and uses CONNECT for https. Verified on the VM: a
subscription update succeeds in both "pac" and "proxy" modes.
- core/dns/qtype.go listed nine type names in two switches before falling
back to miekg/dns tables that contain the same names; dns.Type.String
and dns.StringToType are the tables.
- The GUI tracked prefers-color-scheme with its own media query and
toggled a theme-dark class nothing reads any more; Vuetify's "system"
theme follows the OS itself. Verified in headless Chrome: auto follows
the OS in both directions, an explicit choice overrides it.
- The AUR packages carried .INSTALL hooks whose only content was a
coloured "Completed!" banner, duplicated in the deb/rpm after-install
scripts; pacman and apt report that themselves. The hooks are gone, the
release workflow stops copying them, and after_install/after_upgrade
keep only daemon-reload and the restart.
- The tap release job downloaded eight artifacts in eight steps;
actions/download-artifact takes a pattern with merge-multiple.
The scripts backgrounded v2raya with start-stop-daemon and a pidfile,
and stop_post ran pkill -x v2raya_core to catch a core that outlived a
killed service, which also took the cores of v2raya-user.<user>
instances. Under supervise-daemon the service sits in its own process
group and cgroup: a stop takes the core with it, and a crash respawns
the service, whose start kills an orphaned core holding the ports
itself. stop_post is gone.
v2raya-user.initd ran checkpath on ~/.config/v2raya, which fails on an
account that has no ~/.config yet ("could not open .config"), so a fresh
user could not start the service; checkpath makes one level at a time,
and ~/.config is created first.
The conf.d defaults passed --log-disable-timestamp together with
--log-file, and the flag is ignored whenever a log file is set; the
default now names the log file alone and says why. The descriptions say
what v2rayA is today, and the --lite help line matches the binary.
Verified on the Gentoo VM (OpenRC 0.63): stop clears the 51 tproxy
rules, the fwmark rule and the core; start restores them; kill -9 of
v2raya is followed by a respawn within seconds, the orphaned core is
killed by the new instance and the dashboard reports it running; a
v2raya-user.tuser instance for a new account starts as that user,
survives a system service stop, and stops cleanly.
OpenRC's default stop escalates after a few seconds; the service stops
its core and removes the transparent-proxy rules on SIGTERM, so it gets
30 s before KILL. stop_post kills a core the service could not stop (it
had been killed), which would otherwise keep the inbound ports and fail
the next start. The log and config directories are created with
checkpath, the service is ordered after the firewall units, and the
per-user script creates its config directory the same way.
v2raya.initd / v2raya.confd for the root service and v2raya-user.initd /
v2raya-user.confd for the per-user lite service, taken from the overlay
that has run them on Gentoo since 2021 (the maintainer of both is the
same person); the description and the option list in the conf.d files
match the current binary. The same files serve Alpine.
Alpine, Gentoo and the other OpenRC systems had no service script in
the repository; the one Gentoo ships is now here as
install/universal/v2raya.initd with its conf.d file, the same shape
as the systemd unit (log file under /var/log/v2raya, options through
V2RAYA_OPTS). The runit script names the current maintainer's address.
install/universal/v2raya.run is the runit run script users install by
hand on runit distributions (Void, Artix); it has no in-repository
caller by design. It went out with the dead code by mistake; back in.
systemd sends the whole cgroup SIGTERM, so the core died before the
service and was recorded as a crash; the next boot then refused to
restore the proxy ("exited abnormally the last time", discussion
#1922). The signal handler marks the manager as shutting down before
anything else, a core exit in that state keeps the running flag, and
the units use KillMode=mixed so only the service receives the signal.
Three service packages outside the executable's dependency graph
(common/antiPollution, pkg/util/gopeed, kernel/vmessInfo), a blank
import of miekg/dns the core already imports, the --core-type flag no
code read, the PutAccount handler whose route was commented out, two GUI
API wrappers without a caller, two .SRCINFO files the release regenerates
and an unreferenced runit sample. The workflow path filters watched a
root go.mod that does not exist and the PR build skipped core/.
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 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.
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.
The ssh-add_expect (and related expect scripts) were present on disk
but not tracked by git, causing CI to fail with
'No such file or directory' when running the AUR release step.
- Add v2raya_core source downloads and checksums for all architectures
in PKGBUILD and .SRCINFO
- Install v2raya_core to /usr/bin/v2raya_core in package step
- Update deploy_v2raya_bin.sh to compute and substitute v2raya_core hashes
- Fix release workflow: download v2raya_core binaries for hash computation
- Fix release workflow: use heredoc for SSH key to avoid corruption
- Fix release workflow: correct ssh-add_expect script path
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.
- Update core/xray submodule from v1.260327.0 (v26.3.27) to v26.6.1
- Remove deprecated AllowInsecure field from all protocol structs
- Add PinnedPeerCertSha256 and VerifyPeerCertByName fields (service layer)
- Update ngui (Nuxt) frontend with text inputs for new fields
- Update gui (Vue 2) frontend with text inputs for new fields
- Keep existing PinnedSHA256 for juicity (no duplicate)
- Backward compatible: old allowInsecure params silently ignored
- Run go mod tidy to update dependencies
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>