Miheichev Aleksandr Sergeevich 4b412e246f test: cover the share-URI round trip for the remaining protocols (#10017)
`FmtHandlerTests` round-tripped VMess, VLESS, Shadowsocks and SOCKS.
`FmtHandler.GetShareUri` dispatches ten protocols, so Trojan, Hysteria2,
TUIC, Anytls, WireGuard and Naive were exported and re-imported untested,
and `WireguardFmt` was covered in the `Resolve` direction only.

Each new test exports a profile, imports the result and asserts the fields
that protocol carries in its URI: the flow for Trojan, the uuid/password
pair and the congestion control for TUIC, the obfuscation password and the
port range for Hysteria2, the peer keys, reserved bytes, interface address
and MTU for WireGuard, and the credentials plus the insecure concurrency
for Naive.

`ShareUriSuite_ShouldCoverAndRoundTripEveryExportableProtocol` compares the
profile-factory map against `Global.ProtocolShares` and round-trips every
entry, so a newly exportable protocol cannot be added without a case here.

Three things a round trip alone cannot prove are asserted on the wire form
instead. The allow-insecure flag is spelled per protocol since #9888 -
`allowInsecure` and `insecure` for Trojan, `allow_insecure` for TUIC,
`insecure` for Anytls and Hysteria2 - so an exporter and an importer that
agreed on the wrong name would otherwise round-trip cleanly. The WireGuard
test pins the percent-encoding of the base64 keys and the brackets around
the IPv6 literal. Hysteria2 keeps `CertSha` unset on purpose: the importer
turns `AllowInsecure` on by itself when a `pinSHA256` is present, which
would mask an exporter that stopped emitting `insecure=1`.

Fixtures are deterministic and no longer plain ASCII: a fixed uuid for
TUIC, real 32-byte base64 keys and an IPv6 address for WireGuard, and
reserved and non-Latin characters in passwords and remarks.

`ExportThenImport` derives the expected scheme, because `NaiveFmt` emits
`naive+https://` or `naive+quic://` and never the `naive://` prefix that
`Global.ProtocolShares` records for that type - that entry is only read
when importing.
2026-08-28 14:27:50 +08:00
2026-06-26 17:30:28 +08:00
2025-05-28 20:04:12 +08:00
2026-08-07 14:07:44 +08:00
2026-07-17 09:13:19 +08:00

v2rayN

A GUI client for Windows, Linux and macOS. Support Xray and sing-box and others

CodeFactor Release Downloads Telegram

Windows Linux macOS GPG Signed


Download / 下载

Download the latest release here:

在这里下载最新版本:

https://github.com/2dust/v2rayN/releases

Tip

v2rayN is the desktop version. For the mobile version, please visit the v2rayNG
v2rayN 是电脑版,手机版请访问 v2rayNG

https://github.com/2dust/v2rayNG


Documentation / 使用文档

Read the Wiki for usage guides and configuration details.

请阅读 Wiki 获取使用说明和配置教程。

https://github.com/2dust/v2rayN/wiki


Supported Platforms / 支持平台

Platform / 平台 x64 x86 arm64 riscv64 loong64
Windows - -
Linux -
macOS - - -

Minimum OS requirements: Release files introduction / 最低系统要求:发布文件介绍


GPG Verification / GPG 签名校验

Release files are signed with GPG to verify authenticity and integrity, helping prevent mirror, ISP, or CDN hijacking.

发布文件已使用 GPG 签名,可用于校验文件真实性与完整性,预防镜像站、运营商或 CDN 劫持。

Fingerprint / 公钥指纹

7694 5E9F 3E9A 168F 8070 F195 805D 661C
134D FAF6 8903 C199 463C 31E5 AE90 3AE0

Community / 社区

Telegram Group / Telegram 群组:

https://t.me/v2rayN

Telegram Channel / Telegram 频道:

https://t.me/github_2dust

Languages
C# 92.3%
Shell 7.7%