<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: HorusVPN</title>
    <description>The latest articles on DEV Community by HorusVPN (horusvpn).</description>
    <link>https://dev.to/horusvpn</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Forganization%2Fprofile_image%2F16378%2F92519718-ec11-4d1e-b9ef-a58e2d5996d0.png</url>
      <title>DEV Community: HorusVPN</title>
      <link>https://dev.to/horusvpn</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/horusvpn"/>
    <language>en</language>
    <item>
      <title>XHTTP vs TCP for VLESS + REALITY: we benchmarked both on five servers (and found our own mistake)</title>
      <dc:creator>RaIs</dc:creator>
      <pubDate>Thu, 26 Nov 2026 11:37:03 +0000</pubDate>
      <link>https://dev.to/horusvpn/xhttp-vs-tcp-for-vless-reality-we-benchmarked-both-on-five-servers-and-found-our-own-mistake-2ho</link>
      <guid>https://dev.to/horusvpn/xhttp-vs-tcp-for-vless-reality-we-benchmarked-both-on-five-servers-and-found-our-own-mistake-2ho</guid>
      <description>&lt;p&gt;Last week we added a VLESS + XHTTP + REALITY inbound to every server, next to the classic VLESS + REALITY over TCP with Vision. Before telling users when to pick which, we wanted numbers: how much speed and latency does XHTTP cost, and does it behave the way we assumed? It mostly performs the same. It does not behave the way we assumed.&lt;/p&gt;

&lt;h2&gt;
  
  
  The setup
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Client:&lt;/strong&gt; Xray-core 26.x on a server in a German datacenter.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Servers:&lt;/strong&gt; five locations: Finland, the Netherlands, the UK, the US and Singapore. Same Xray build, same REALITY target per server for both transports.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Transports:&lt;/strong&gt; VLESS + REALITY over raw TCP with &lt;code&gt;xtls-rprx-vision&lt;/code&gt;, and VLESS + XHTTP + REALITY with the client forced to &lt;code&gt;stream-one&lt;/code&gt; and to &lt;code&gt;packet-up&lt;/code&gt;. The server runs &lt;code&gt;mode: auto&lt;/code&gt;, so it accepts both.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Metrics:&lt;/strong&gt; time to first byte through the tunnel to a speed-test endpoint (cold and warm), a 50 MB download and a 10 MB upload. Three runs per combination; the tables show medians.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is datacenter to datacenter, single stream. Treat the numbers as relative, not as what you'd get on home Wi-Fi.&lt;/p&gt;

&lt;h2&gt;
  
  
  Throughput
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Server&lt;/th&gt;
&lt;th&gt;TCP + Vision ↓ / ↑&lt;/th&gt;
&lt;th&gt;XHTTP stream-one ↓ / ↑&lt;/th&gt;
&lt;th&gt;XHTTP packet-up ↓ / ↑&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Finland&lt;/td&gt;
&lt;td&gt;524 / 164&lt;/td&gt;
&lt;td&gt;526 / 162&lt;/td&gt;
&lt;td&gt;530 / 146&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Netherlands&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;1,001&lt;/strong&gt; / 89&lt;/td&gt;
&lt;td&gt;675 / 172&lt;/td&gt;
&lt;td&gt;678 / 173&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;UK&lt;/td&gt;
&lt;td&gt;63 / 51&lt;/td&gt;
&lt;td&gt;58 / 64&lt;/td&gt;
&lt;td&gt;58 / 42&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;US&lt;/td&gt;
&lt;td&gt;151 / 48&lt;/td&gt;
&lt;td&gt;162 / 48&lt;/td&gt;
&lt;td&gt;172 / 49&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Singapore&lt;/td&gt;
&lt;td&gt;80 / 25&lt;/td&gt;
&lt;td&gt;78 / 25&lt;/td&gt;
&lt;td&gt;85 / 27&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;em&gt;Mbit/s, median of three runs.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;On four of five servers the three options are within run-to-run noise. The interesting one is the Netherlands, the closest and fastest path: TCP + Vision hit about 1 Gbit/s down, XHTTP stopped around 675 Mbit/s. That fits how Vision works: once the inner TLS handshake is done, Xray can pass the data through with very little extra work per byte, while XHTTP always wraps it in HTTP/2 frames. You only notice the difference when the link is fast enough for CPU and framing to matter.&lt;/p&gt;

&lt;p&gt;Upload went the other way on the same server, 89 vs 172 Mbit/s, and we couldn't reproduce a clear pattern there. Upload results on single runs were the noisiest numbers in the whole test.&lt;/p&gt;

&lt;h2&gt;
  
  
  Latency
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Server&lt;/th&gt;
&lt;th&gt;TCP + Vision&lt;/th&gt;
&lt;th&gt;XHTTP stream-one&lt;/th&gt;
&lt;th&gt;XHTTP packet-up&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Finland&lt;/td&gt;
&lt;td&gt;187 ms&lt;/td&gt;
&lt;td&gt;172 ms&lt;/td&gt;
&lt;td&gt;216 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Netherlands&lt;/td&gt;
&lt;td&gt;106 ms&lt;/td&gt;
&lt;td&gt;120 ms&lt;/td&gt;
&lt;td&gt;166 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;UK&lt;/td&gt;
&lt;td&gt;364 ms&lt;/td&gt;
&lt;td&gt;239 ms&lt;/td&gt;
&lt;td&gt;240 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;US&lt;/td&gt;
&lt;td&gt;539 ms&lt;/td&gt;
&lt;td&gt;577 ms&lt;/td&gt;
&lt;td&gt;588 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Singapore&lt;/td&gt;
&lt;td&gt;816 ms&lt;/td&gt;
&lt;td&gt;848 ms&lt;/td&gt;
&lt;td&gt;810 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;em&gt;Time to first byte of a request through the tunnel, first request after the client starts; median of three runs.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;stream-one&lt;/code&gt; is on par with TCP. &lt;code&gt;packet-up&lt;/code&gt; adds 30 to 60 ms on the nearby servers and nothing measurable on the far ones, where the round trip dominates. That's expected: in &lt;code&gt;packet-up&lt;/code&gt; the client sends upstream data as separate POST requests instead of one long request.&lt;/p&gt;

&lt;h2&gt;
  
  
  The part we got wrong
&lt;/h2&gt;

&lt;p&gt;When we added XHTTP, we described it to users as the line to try "on networks that cut long connections". The idea was that it looks like ordinary web requests, so it should survive a network that kills long-lived streams.&lt;/p&gt;

&lt;p&gt;So we counted TCP connections from the client to the server while running six parallel downloads, then ten quick requests in a row:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Transport&lt;/th&gt;
&lt;th&gt;During 6 parallel downloads&lt;/th&gt;
&lt;th&gt;After 10 sequential requests&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;TCP + Vision&lt;/td&gt;
&lt;td&gt;6 connections&lt;/td&gt;
&lt;td&gt;0 (each one closed when its request ended)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;XHTTP stream-one&lt;/td&gt;
&lt;td&gt;3 connections&lt;/td&gt;
&lt;td&gt;3 (kept open and reused)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;XHTTP packet-up&lt;/td&gt;
&lt;td&gt;3 connections&lt;/td&gt;
&lt;td&gt;3 (kept open and reused)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;TCP + Vision opens one connection to the server per proxied connection and closes it when it's done. XHTTP multiplexes many proxied connections over a few HTTP/2 connections and keeps them open for reuse; Xray's XMUX settings decide how many and for how long. In other words, &lt;strong&gt;XHTTP creates fewer, longer-lived connections, not shorter ones.&lt;/strong&gt; If a network kills long-lived connections, XHTTP gets no special protection. Xray will reconnect for new requests, but whatever was in flight on the killed connection drops.&lt;/p&gt;

&lt;p&gt;What XHTTP really changes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Traffic shape.&lt;/strong&gt; The server sees HTTP/2 requests and responses instead of one raw stream per proxied connection. Some networks treat that differently from the TCP line, and when one is throttled or blocked the other often isn't.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fewer handshakes.&lt;/strong&gt; Six browser connections became three TLS sessions to the server instead of six. A network that watches how often one IP opens new TLS sessions sees less.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Flexible upstream.&lt;/strong&gt; &lt;code&gt;packet-up&lt;/code&gt; turns uploads into ordinary POST requests, which works through proxies and CDNs that don't support streaming uploads, at a small latency cost.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We've corrected the wording on our site.&lt;/p&gt;

&lt;h2&gt;
  
  
  How we configure it now
&lt;/h2&gt;

&lt;p&gt;Server inbound (secrets shortened):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"tag"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"VLESS_XHTTP"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"port"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;443&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"protocol"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"vless"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"settings"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;"clients"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"decryption"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"none"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"streamSettings"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;"network"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"xhttp"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;"security"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"reality"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;"realitySettings"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nl"&gt;"target"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"www.your-target.example:443"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nl"&gt;"serverNames"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"www.your-target.example"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nl"&gt;"privateKey"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"…"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nl"&gt;"shortIds"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"…"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;"xhttpSettings"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;"path"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"/your-random-path"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"mode"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"auto"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Client side, &lt;code&gt;mode: auto&lt;/code&gt; is fine for a direct REALITY connection. Force &lt;code&gt;packet-up&lt;/code&gt; only if something in the path doesn't handle streaming requests.&lt;/p&gt;

&lt;p&gt;And the user-facing advice:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;VLESS + REALITY + Vision over TCP stays the default.&lt;/strong&gt; Same or better speed, and the best result on fast links.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;XHTTP is the first fallback&lt;/strong&gt; when the TCP line is blocked or throttled on a particular network. It costs almost nothing in speed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Don't sell XHTTP as a fix for connection resets.&lt;/strong&gt; It doesn't do that by default.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The lesson for us was less about XHTTP than about testing our own descriptions. Fifteen minutes with &lt;code&gt;ss -tn&lt;/code&gt; would have caught the wrong claim before it went on the website.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Disclosure: we run &lt;a href="https://horusvpn.net" rel="noopener noreferrer"&gt;HorusVPN&lt;/a&gt;, a VPN for networks that block ordinary VPNs, and these are measurements from our own servers. Our previous post covers &lt;a href="https://dev.to/horusvpn/your-reality-server-shouldnt-pretend-to-be-wwwcloudflarecom-how-we-picked-better-targets-2334"&gt;how we picked REALITY targets&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>networking</category>
      <category>performance</category>
      <category>security</category>
      <category>selfhosted</category>
    </item>
    <item>
      <title>Your REALITY server shouldn't pretend to be www.cloudflare.com. How we picked better targets</title>
      <dc:creator>RaIs</dc:creator>
      <pubDate>Mon, 23 Nov 2026 12:12:25 +0000</pubDate>
      <link>https://dev.to/horusvpn/your-reality-server-shouldnt-pretend-to-be-wwwcloudflarecom-how-we-picked-better-targets-2334</link>
      <guid>https://dev.to/horusvpn/your-reality-server-shouldnt-pretend-to-be-wwwcloudflarecom-how-we-picked-better-targets-2334</guid>
      <description>&lt;p&gt;If you run Xray with VLESS + REALITY, you had to pick a &lt;code&gt;target&lt;/code&gt; (formerly &lt;code&gt;dest&lt;/code&gt;) and &lt;code&gt;serverNames&lt;/code&gt;: the real website your server impersonates during the TLS handshake. Most tutorials suggest something big and familiar, like &lt;code&gt;www.microsoft.com&lt;/code&gt;, &lt;code&gt;www.apple.com&lt;/code&gt; or &lt;code&gt;www.cloudflare.com&lt;/code&gt;. We ran six servers on &lt;code&gt;www.cloudflare.com&lt;/code&gt; for two months. This post covers why that's a weak choice, how we found better targets for each server, and how we switched without disconnecting a single client.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why a famous CDN domain is a tell
&lt;/h2&gt;

&lt;p&gt;REALITY works by borrowing a real site's TLS identity. An unauthenticated visitor, including a censor's active probe, gets the target's genuine certificate, passed through untouched. Authenticated clients get the tunnel.&lt;/p&gt;

&lt;p&gt;The weak spot is the IP address. Cloudflare, Akamai, Fastly and CloudFront publish their IP ranges, and so does every routing table. A server in a random VPS provider's network that answers TLS handshakes for &lt;code&gt;www.cloudflare.com&lt;/code&gt; is an obvious mismatch: that hostname should never live there. A censor doesn't need to break anything. It only needs to compare the SNI with the ASN of the IP it's talking to.&lt;/p&gt;

&lt;p&gt;So a good target is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a real, stable website that supports &lt;strong&gt;TLS 1.3&lt;/strong&gt;, &lt;strong&gt;HTTP/2 (h2)&lt;/strong&gt; and the &lt;strong&gt;X25519&lt;/strong&gt; key exchange;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;not behind a CDN&lt;/strong&gt;, so that the site really lives on a "normal" network;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;close to your server&lt;/strong&gt;, because REALITY talks to the target during handshakes and its latency adds up;&lt;/li&gt;
&lt;li&gt;ideally in &lt;strong&gt;the same ASN as your server&lt;/strong&gt;, so that the SNI and the IP make sense together;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;not overused&lt;/strong&gt;: thousands of other REALITY servers already pose as the same five brands.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step 1: scan your neighbours
&lt;/h2&gt;

&lt;p&gt;The classic advice is to find a TLS 1.3 site in your own hosting network. We scanned the /24 around each of our servers with a small asyncio script:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;asyncio&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ssl&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ipaddress&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;sys&lt;/span&gt;

&lt;span class="n"&gt;ctx&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;ssl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create_default_context&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;check_hostname&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;False&lt;/span&gt;
&lt;span class="n"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;verify_mode&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;ssl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;CERT_NONE&lt;/span&gt;
&lt;span class="n"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;minimum_version&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;ssl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;TLSVersion&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;TLSv1_3&lt;/span&gt;
&lt;span class="n"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;set_alpn_protocols&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"h2"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"http/1.1"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;sem&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;asyncio&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Semaphore&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;40&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;probe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ip&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="n"&gt;sem&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;try&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;w&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;asyncio&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;wait_for&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;asyncio&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;open_connection&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ip&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;443&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ssl&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;except&lt;/span&gt; &lt;span class="nc"&gt;Exception&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;None&lt;/span&gt;
        &lt;span class="n"&gt;so&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;w&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get_extra_info&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"ssl_object"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;cert&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;so&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getpeercert&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;binary_form&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kc"&gt;True&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="c1"&gt;# parse SANs with `cryptography`&lt;/span&gt;
        &lt;span class="n"&gt;w&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;close&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;ip&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;so&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;version&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;so&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;selected_alpn_protocol&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;prefix&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;hosts&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="kt"&gt;str&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;h&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;h&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;ipaddress&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;ip_network&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;prefix&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;hosts&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;res&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;asyncio&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;gather&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;probe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;h&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;h&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;hosts&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;res&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;res&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;asyncio&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sys&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;argv&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run it from the server itself, against your own /24 only, and keep the concurrency low.&lt;/p&gt;

&lt;p&gt;The result was surprising. Five of our servers sit with one small hosting provider. Across four /24 networks we found about 300 hosts that speak TLS 1.3, and &lt;strong&gt;at least 66 of them presented certificates for big brands&lt;/strong&gt;: Microsoft, Apple, Yahoo, Samsung, Reddit, Python.org, DuckDuckGo, Hetzner and more. None of those companies host their websites in a small VPS provider's network. These were other people's REALITY servers impersonating the same handful of famous sites.&lt;/p&gt;

&lt;p&gt;The rest were small personal projects with Let's Encrypt certificates, a few control panels and default reverse-proxy pages. Nothing stable enough to depend on.&lt;/p&gt;

&lt;p&gt;Our sixth server is with a large cloud provider. Its /20 had about 1,500 TLS 1.3 hosts, and the picture was the same: managed-hosting default certificates, Cloudflare origin certificates (those sites resolve to Cloudflare, not to this IP), and more fake &lt;code&gt;www.cloudflare.com&lt;/code&gt;, &lt;code&gt;digitalocean.com&lt;/code&gt; and &lt;code&gt;twitch.tv&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Lesson:&lt;/strong&gt; on providers that are popular with VPN operators, "same ASN" is often impossible, and the brands everyone copies are the worst possible choice.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: test real candidates from the server
&lt;/h2&gt;

&lt;p&gt;Plan B: a real, self-hosted website &lt;strong&gt;near&lt;/strong&gt; each server, not behind a CDN. National research and education networks turned out to be a great source: many universities and research institutes host their sites on their own networks.&lt;/p&gt;

&lt;p&gt;For each candidate we checked TLS 1.3 with X25519 and h2 from the server itself:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;d&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;www.example.edu
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; openssl s_client -connect &lt;span class="s2"&gt;"$d:443"&lt;/span&gt; -servername &lt;span class="s2"&gt;"$d"&lt;/span&gt; \
  -tls1_3 -groups X25519 -alpn h2 2&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;/dev/null \
  &lt;span class="o"&gt;|&lt;/span&gt; grep -E &lt;span class="s2"&gt;"TLSv1.3|ALPN protocol|Verify return code"&lt;/span&gt;
curl -s -o /dev/null --http2 -w &lt;span class="s2"&gt;"%{http_code} %{time_appconnect}\n"&lt;/span&gt; &lt;span class="s2"&gt;"https://$d/"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then we looked up who announces the IP with the RIPEstat API:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -s &lt;span class="s2"&gt;"https://stat.ripe.net/data/prefix-overview/data.json?resource=$IP"&lt;/span&gt; \
  &lt;span class="o"&gt;|&lt;/span&gt; jq &lt;span class="s1"&gt;'.data.asns[0]'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That step removed most candidates. A lot of university websites are now fronted by Cloudflare, CloudFront, Fastly, Akamai, Imperva or a managed WordPress platform. Of more than 100 sites we tested, only a handful per country passed everything: TLS 1.3, X25519, h2, a valid certificate, self-hosted on the institution's own network, and a low round trip from our server.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: switch without breaking clients
&lt;/h2&gt;

&lt;p&gt;Changing &lt;code&gt;target&lt;/code&gt; and &lt;code&gt;serverNames&lt;/code&gt; sounds risky. Clients carry the SNI in their config, and in our case they get it from a subscription that apps refresh every few hours. Change the server first and every client that hasn't refreshed yet loses that connection.&lt;/p&gt;

&lt;p&gt;The fix: &lt;code&gt;serverNames&lt;/code&gt; is a list. Point &lt;code&gt;target&lt;/code&gt; at the new site and keep the old name in the list for a while:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"realitySettings"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"target"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"www.new-target.example:443"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"serverNames"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"www.new-target.example"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"www.cloudflare.com"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"privateKey"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"…"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"shortIds"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"…"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Before rolling it out, we tested on one server with a throwaway user and a real Xray client: one client with the old SNI, one with the new. Both connected, over VLESS + REALITY with Vision and over Trojan + REALITY. Then we updated the SNI in the subscription, did the other servers the same way, and scheduled the removal of the old name for a week later, once every client had refreshed.&lt;/p&gt;

&lt;p&gt;Finally, check what a censor's probe would see now. Connect without credentials:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; openssl s_client -connect YOUR_SERVER_IP:443 \
  -servername www.new-target.example -alpn h2 2&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;/dev/null &lt;span class="o"&gt;|&lt;/span&gt; grep -E &lt;span class="s2"&gt;"^subject=|ALPN"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should get the target's genuine certificate and &lt;code&gt;h2&lt;/code&gt;, exactly as if you'd visited the real site.&lt;/p&gt;

&lt;h2&gt;
  
  
  Two things we checked along the way
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Vision was already on.&lt;/strong&gt; Our panel, Remnawave, automatically sets &lt;code&gt;flow: xtls-rprx-vision&lt;/code&gt; for VLESS inbounds on raw TCP with REALITY, unless the inbound specifies a flow. We confirmed it in the generated links (&lt;code&gt;flow=xtls-rprx-vision&lt;/code&gt;) instead of assuming.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;XHTTP is a cheap extra.&lt;/strong&gt; While we were at it, we added a VLESS + XHTTP + REALITY inbound (&lt;code&gt;mode: auto&lt;/code&gt;) on each server, using the same new targets. It gives a different traffic shape, HTTP/2 requests instead of one raw stream, for networks that block or throttle the plain TCP line. Quick single-stream tests through it ranged from about 50 to 500 Mbit/s depending on the server and distance, so it's a usable fallback, not just a last resort.&lt;/p&gt;

&lt;h2&gt;
  
  
  Checklist
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Don't impersonate a CDN-hosted brand from a non-CDN IP.&lt;/li&gt;
&lt;li&gt;Scan your own /24 first; treat brand certificates on neighbouring VPS IPs as other REALITY servers, not candidates.&lt;/li&gt;
&lt;li&gt;Check TLS 1.3 + X25519 + h2 + a valid certificate from the server itself.&lt;/li&gt;
&lt;li&gt;Check the target's ASN; drop anything behind a CDN.&lt;/li&gt;
&lt;li&gt;Prefer self-hosted sites close to the server; research-network sites are a good pool.&lt;/li&gt;
&lt;li&gt;Switch with both names in &lt;code&gt;serverNames&lt;/code&gt;, test old and new SNI with a real client, drop the old name after clients refresh.&lt;/li&gt;
&lt;li&gt;Verify the unauthenticated view with &lt;code&gt;openssl s_client&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;Disclosure: we run &lt;a href="https://horusvpn.net" rel="noopener noreferrer"&gt;HorusVPN&lt;/a&gt;, a VPN for networks that block ordinary VPNs, and this is how we maintain our own servers. If you're new to the protocol, our explainer on &lt;a href="https://horusvpn.net/guides/what-is-vless-reality/" rel="noopener noreferrer"&gt;what VLESS + REALITY is&lt;/a&gt; covers the basics.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>networking</category>
      <category>security</category>
      <category>privacy</category>
      <category>selfhosted</category>
    </item>
  </channel>
</rss>
