This release adds VLESS, VMess and Trojan outbounds next to the HTTP/HTTPS/SOCKS clients, with the same zero-dependency, Stream-returning API. VLESS REALITY and the xtls-rprx-vision flow are implemented in managed code — no Xray or other external binary is involved. No public type or member from 3.0.0 was removed or changed.
Breaking changes
ProxyTypegainedVless,Vmess,Trojan;ProxyErrorCodegainedStringTooLongandTransportUpgradeFailed. Exhaustiveswitchstatements over these enums need adefaultarm.ProxyClientFactory.Create(Uri)now returns a client forvless://,trojan://andvmess://instead of throwingNotSupportedException.ProxyClientconstructors accept IPv6 literals as the proxy host (previously threwUriFormatExceptionwhile buildingProxyUri).ProxyClientFactory.Create(null)/Proxy.ConnectAsync(null, …)are ambiguous at compile time because of the newstringoverloads.- Target frameworks: net8.0, net9.0, net10.0 and now net11.0. Nothing dropped.
New
Proxy.ConnectAsync(string link, host, port, [timeout], ct)andProxyClientFactory.Create(string link): one entry point for any supported link, includingvmess://share links thatSystem.Uricannot represent. The scheme is read from the text, so you no longer pick a parser yourself.VlessClient,VlessOptions,VlessSecurity,VlessShareLink: VLESS overtcp/raw,ws,httpupgrade, withsecurity=none|tls|realityand thextls-rprx-visionflow.grpc,xhttpand other flows are parsed but rejected withNotSupportedExceptionat connect time.- VLESS REALITY in-process: a managed TLS 1.3 client (ClientHello with the sealed
session_id, X25519, HKDF key schedule, record layer). Verified against live REALITY nodes.RealityHandshakeExceptionis aProxyProtocolExceptionwithErrorCodeAuthFailedwhen the server did not recognise the client (checkpbk/sid/sni) orInvalidResponseotherwise. TrojanClient,TrojanOptions,TrojanShareLink: Trojan over TLS withtcp,ws,httpupgrade.VmessClient,VmessOptions,VmessSecurityKind,VmessShareLink: VMessAEAD (alterId=0only) withaes-128-gcm/chacha20-poly1305/auto, overtcp,ws,httpupgrade, with or without TLS.- Each new client exposes
Options,FromShareLink(string),ServerCertificateValidationCallbackandSslProtocols. - Every error message is free of credentials, and the VPN-style protocols use the same
ProxyErrorCodes as the classic ones — a VLESS or VMess server that silently drops an unknown id comes back asConnectionFailedwith a message naming the protocol and what to check. IProxyClient.LocalEndPointbinds the outgoing socket to a specific local address — useful to route around a TUN VPN that owns the default route.
Fixed
- HTTP CONNECT response parsing no longer matches header names inside bytes that belong to the tunnelled payload.
ProxyClient.ProxyUriis built correctly for IPv6 proxy hosts.- A proxy that resets the connection mid-handshake surfaces as
ProxyProtocolException(ConnectionFailed)rather than a rawIOException.
Not in this release
grpcandxhttptransports, Hysteria2/TUIC (QUIC), and UDP.- Vision's TLS-in-TLS splice (a throughput optimisation; the wire format is complete).
- A browser-grade ClientHello fingerprint for REALITY: the handshake connects to real servers, but a DPI that fingerprints ClientHellos can tell it from a browser. See
docs/reality-fingerprint-plan.md.
What's Changed
- Add VPN protocols by @Titlehhhh in #2
Full Changelog: v3.0.0...v4.0.0