254 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
Markson GuGa Beyond fb6b7f3ec4 build: add an nfpm config for the Linux packages
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.
2026-11-02 11:58:22 +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
Zakk 0872d7db62 chore: remove what nothing uses any more
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.
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
Zakk e05e672fe5 build: drop the tinytun build tag and ship Wintun from its own package
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.
2026-09-19 10:34:56 +10:00
Markson GuGa Beyond 107d8e35d3 fix(ico): re-added hidpi icon 2026-09-19 07:02:09 +08:00
Zakk b1fd2c1215 feat(gui): use the vector icon for the brand, the favicon and the installer
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.
2026-09-18 15:44:06 +10:00
Markson GuGa Beyond cffe97ca3d core: migrate xray-core from git submodule to go mod and port QUIC outbounds to daeuniverse/outbound
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.
2026-09-18 13:15:45 +08:00
Markson Pigeonzilla Plus 36d19aa141 fix(ci): add ssh config for AUR release 2026-08-22 15:01:16 +08:00
Markson Pigeonzilla Plus ef8e85031c fix(ci): fix v2raya-bin's missing data file 2026-08-22 11:25:21 +08:00
Markson Pigeonzilla Plus b7da452276 ci: re-init AUR release 2026-08-22 09:02:48 +08:00
Markson Hon 81f82e799b Merge branch 'main' into main
Signed-off-by: Markson Hon <50002150+MarksonHon@users.noreply.github.com>
2026-08-18 21:43:32 +08:00
Markson Pigeonzilla Plus 8cfca15b02 feat: remove GitHub badges from sharing modal and bundle v2raya_core in AUR package
- Remove GitHub stars/forks/watchers badges from modalSharing.vue footer
- Add scoped CSS for modal card-head/card-foot border-radius styling
- Build and install v2raya_core binary in AUR PKGBUILD
- Remove v2ray>=5.0.0 runtime dependency (core is now bundled)
2026-06-30 03:46:02 +08:00
Markson Pigeonzilla Plus e5ed9e3a11 fix(ci): add missing install/aur/tool/ scripts to git tracking
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.
2026-06-30 03:26:09 +08:00
Markson Pigeonzilla Plus 6697d44b18 feat(v2raya-bin): add v2raya_core binary to AUR package
- 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
2026-06-30 03:15:25 +08:00
Markson Pigeonzilla Plus bf8aa12ace service: drop ngui and drop v2ray/xray check 2026-06-26 10:07:43 +08:00
Markson Pigeonzilla Plus ff6bf0a43d Remove v2ray/xray core version detection and comparison logic
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.
2026-06-26 09:44:14 +08:00
Markson Hon cfe5a69049 chore: update xray submodule to v26.6.1 and replace allowInsecure with cert pinning
- 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
2026-06-20 22:51:17 +08:00
Markson Hon 764db51f20 chore: clean up installer artifacts and ignore plans 2026-05-04 19:07:11 +08:00
Markson Hon 7aa612592a feat(ci): add v2raya_core building 2026-05-03 16:25:18 +08:00
Markson PigeonzillaandMarkson Hon 608b44e2f8 fix(windows): carry forward env, startup, and legacy TUN follow-ups
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>
2026-03-21 15:00:28 +08:00
Markson Pigeonzilla fd55be61e3 Windows-Installer: fix a Chinese translation 2026-02-16 14:36:46 +08:00
Markson Pigeonzilla 1548fc9083 Windows-Installer: Drop pwsh script 2026-02-16 14:20:04 +08:00
Markson Pigeonzilla 0de308d463 fix wrong inno script 2026-02-16 13:25:47 +08:00
Markson Pigeonzilla 3981de3b31 windows: try to fix log path 2026-02-16 13:16:54 +08:00
Markson Pigeonzilla 697a5ffb63 windows: try to fix log path 2026-02-15 19:42:54 +08:00
Markson Pigeonzilla 7ea3024c95 gui: better log 2026-02-14 22:25:31 +08:00
Markson Pigeonzilla a1b23000e5 windows-installer: try to fix log path 2026-02-13 22:01:44 +08:00
Markson Pigeonzilla 1f758ecc5a windows-installer: try to fix log path 2026-02-12 20:32:52 +08:00
Markson Pigeonzilla 5c12799fad ci: fix Windows installer rename 2026-02-06 09:05:28 +08:00
Markson Pigeonzilla 2734544002 ci: fix Windows installer uninstallation 2026-02-06 08:57:26 +08:00
Markson Pigeonzilla 87fe65e318 ci: fix Windows installer build 2026-02-06 00:28:13 +08:00
Markson Pigeonzilla 6f0a5ed999 ci: try to fix installer building 2026-02-05 23:17:02 +08:00
Markson Hon 2954e2292e fix installer zh_CN language 2026-02-05 22:38:59 +08:00
Markson Hon 47a9ea4bcf fix installer zh_CN language 2026-02-05 22:36:19 +08:00
Markson Hon b29b8ae84d fix install building 2026-02-05 22:23:38 +08:00
Markson Pigeonzilla 701c8fc466 use native golang windows service support 2026-02-05 18:28:25 +08:00
源文雨 e6dfecccad ci: support mips softfloat 2025-10-12 16:05:09 +08:00
Markson Hon 1b25daa5ca ci: remove debian repo build 2025-10-08 17:35:18 +08:00