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.
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.
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/.