49 Commits
Author SHA1 Message Date
Markson GuGa Beyond a3a39d8174 ci: build the Linux packages with nfpm and add Alpine apk packages
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.
2026-11-02 11:58:29 +08:00
Zakk ba24a94719 fix: names and descriptions after the bundled core
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.
2026-09-21 12:44:14 +10:00
Markson Hon 90b0087229 Merge pull request #2015 from Zakkaus/openrc-polish
fix(install): OpenRC runs v2rayA under supervise-daemon; a new user's ~/.config is created; the ignored flag goes
2026-09-20 19:57:37 +08:00
Zakk 833af7dc74 refactor: use what the dependencies already provide
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.
2026-09-20 16:40:34 +10:00
Zakk 70d244622e fix(install): OpenRC respawn stays at its defaults, as the systemd unit's start limit does 2026-09-20 16:18:54 +10:00
Zakk 0506a1f448 fix(install): OpenRC runs v2rayA under supervise-daemon; a new user's ~/.config is created; the ignored flag goes
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.
2026-09-20 16:15:05 +10:00
Zakk 1c7bd2de28 install: the OpenRC script gives the service time to stop and cleans an orphaned core
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.
2026-09-20 10:04:20 +10:00
Zakk 2529557ea7 install: the OpenRC service files are the ones the gentoo-zh overlay ships
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.
2026-09-20 09:59:25 +10:00
Zakk aac5dbb9ac install: runit is not supported after all
The maintainer's call after the runit script came back: the niche init
systems (runit, dinit) are out; systemd and OpenRC stay.
2026-09-20 09:56:05 +10:00
Zakk 92b4d1579f install: an OpenRC service script, and the runit script's contact
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.
2026-09-20 09:55:16 +10:00
Zakk 57ba81420e chore: keep the runit service script
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.
2026-09-20 09:53:32 +10:00
Zakk f07adaaa8f fix(service): a core that exits during shutdown is not a crash
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.
2026-09-20 09:17:58 +10:00
Zakk ae8e5a5047 chore: drop what nothing reaches
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/.
2026-09-20 09:17:11 +10:00
Markson Hon 6c96d68880 v2raya.desktop: rename v2rayA to v2rayA Web Panel 2024-04-13 21:11:35 +08:00
mzz2017 e3f7f33998 chore: refine the v2ray only feature warning 2023-09-03 12:40:22 +08:00
mzz2017 2ebcf67b15 chore(systemd): add After=network-online.target 2023-09-03 12:16:51 +08:00
Markson e124feda67 Restart service after upgrading 2023-08-29 20:13:17 +08:00
mzz 193842525d Update after_upgrade.sh 2023-08-03 12:55:58 +08:00
cubercsl 3ab0230d84 ci(debian): generate default config for systemd environment (#750) 2023-03-19 14:51:40 +08:00
mzz b01056519f Merge pull request #708 from yuandi42/feat_v5
add a runit script for v2raya.
2022-12-09 22:22:32 +08:00
Markson 4a606d0034 v2rayA should start after nftables 2022-11-26 07:18:20 +08:00
yuandi42 47c8b1159e add a runit script for v2raya. 2022-11-17 02:25:36 +08:00
cubercsl fdb3adc471 chore(config): add default env config file for systemd user 2022-10-11 15:55:21 +08:00
cubercsl 5d04f8ed9c fix(install): v2raya-lite.service should wanted by default.target (#527)
fix #526
2022-05-24 19:57:12 +08:00
mzz d7f9539dc0 chore: move logs to /var/log in accordance with FHS 3.0 #415 (#469) 2022-04-20 13:01:24 +08:00
mzz2017 678279d001 chore: use environment for log-file for convenient override 2022-02-06 13:39:26 +08:00
mzz2017 5cecd99c5f chore: print logs to file 2022-02-06 13:33:58 +08:00
mzz2017 73f4c45c9c feat: disable timestamp in systemd 2021-09-11 20:31:39 +08:00
mzz2017 981f732c4a docs: better prompt for non-root running 2021-08-29 22:27:48 +08:00
mzz2017 072bce9e7a chore: more convenient packaging 2021-08-20 19:32:41 +08:00
mzz2017 dee41a126f chore(systemd): will not enable and start v2raya after installation 2021-08-19 23:22:22 +08:00
mzz2017 a260d651d8 chore: add v2raya@.service for different users 2021-08-19 23:04:19 +08:00
mzz2017 e333a705fc feat(fakedns/enhanced mode): use fakedns first 2021-03-22 02:14:49 +08:00
mzz2017 0656e6793d chore 2021-02-10 13:12:28 +08:00
mzz2017 2ac7af648e fix: too many open files 2021-01-09 18:53:46 +08:00
mzz2017 ccf5ee857f chore 2020-10-22 23:29:13 +08:00
mzz2017 79b56345c6 docs: remove mzz2017 in most files due to repo's transfer 2020-10-16 16:43:08 +08:00
mzz2017 c2810ee768 update v2raya.desktop 2020-09-05 15:48:58 +08:00
mzz2017 0bc6cae4b9 chore(debian/centos): installation conclusion 2020-09-05 15:47:57 +08:00
mzz2017 b07e98d9cf fix: CapabilityBoundingSet 2020-09-05 15:38:41 +08:00
zhullyb 5a8c1cd89d Add Categories to v2raya.desktop (#91) 2020-08-20 08:07:57 +08:00
mzz2017 6e30ad4e77 fix: permission denied 2020-06-07 00:57:18 +08:00
mzz2017 7f8887f543 chore: fix some problems 2020-06-07 00:34:41 +08:00
mzz2017 25699912fd switch static page hosting service to fast.io 2020-06-01 00:19:27 +08:00
mzz2017 aef571002e docs 2020-04-20 19:07:30 +08:00
mzz2017 b2de124709 rename project 2020-04-19 03:30:00 +08:00
mzz2017 723681be46 fix: high cpu occupation 2020-03-27 14:31:45 +08:00
mzz2017 5961e7709e chore(AUR): v2raya-bin 2020-03-12 18:07:19 +08:00
mzz2017 29022e2d1a chore: organize the directory structure of install 2020-02-20 15:52:28 +08:00