Close-up of wooden blocks spelling ’encryption’, symbolizing

The previous post covered deploying Xray REALITY on the server side. This one focuses specifically on client configuration—once you’ve collected the usernames, server addresses, public keys and other info for various platforms, here’s how to configure them in different clients.

You’ll need to prepare the following information (obtained from the server configuration):

ParameterDescription
Server AddressVPS public IP
PortPort the server listens on (port 443 recommended)
UUIDClient ID configured on the server
Public KeyPublic key generated by xray x25519
Short IDOne of the shortIds configured on the server
SNIserverNames configured on the server (e.g., www.apple.com)

mihomo (Clash Meta)

mihomo natively supports REALITY. Add the configuration to the proxies: section:

proxies:
  - name: "us-reality"
    type: vless
    server: your_VPS_IP
    port: 443
    uuid: your_UUID
    network: tcp
    tls: true
    udp: true
    flow: xtls-rprx-vision
    reality-opts:
      public-key: your_public_key
      short-id: "55470656"
    servername: www.apple.com
    client-fingerprint: chrome

Configuration Options

client-fingerprint: Client TLS fingerprint spoofing. Recommended options:

  • chrome: Spoof Chrome browser (most common, recommended)
  • safari: Spoof Safari
  • firefox: Spoof Firefox

Why choose chrome? Chrome is the most widely used browser globally, so it blends in best.

flow: xtls-rprx-vision: If flow is enabled on the server, you must set this. Without it, the connection won’t work.

udp: true: REALITY runs over TCP. UDP traffic through the proxy is actually encapsulated over TCP, and this doesn’t affect functionality.

Proxy Group Configuration

proxy-groups:
  - name: "Node Selection"
    type: select
    proxies:
      - us-reality
      - DIRECT

  - name: "Auto Select"
    type: url-test
    url: "http://www.gstatic.com/generate_204"
    interval: 300
    proxies:
      - us-reality

Testing Connectivity

After mihomo is running, verify by accessing a speed test URL:

curl -x http://127.0.0.1:7890 https://api.ipify.org

The returned IP should be your VPS’s IP.

Surge (macOS / iOS)

Surge has supported REALITY since version 5.x.

macOS Configuration

Add this to the [Proxy] section of your Surge config file:

[Proxy]
Reality-US = vless, your_VPS_IP, 443, username=your_UUID, tls=true, tls13=true, sni=www.apple.com, skip-cert-verify=false, underlying-proxy=none, vless-flow=xtls-rprx-vision, reality-public-key=your_public_key, reality-short-id=55470656, client-fingerprint=chrome

iOS / iPadOS Configuration

iOS Surge configuration is similar, but keep these points in mind:

  1. Don’t enable UDP: Surge iOS uses REALITY over TCP. Enabling UDP can cause issues.
  2. SNI needs to be stable: iOS is more sensitive to handshake timeouts. Choose an SNI that responds quickly.
  3. You can import via QR code: Export a QR code from macOS Surge and scan it on iOS.

Proxy Groups

[Proxy Group]
AI-Traffic = fallback, Reality-US, backup-node, policy-path=xxx, evaluate-before-use=true

Shadowrocket (iOS)

Shadowrocket is the most commonly used proxy client on iOS and supports REALITY.

Manual Configuration

Tap the + button in the top right → Select VLESS as the type:

FieldValue
Addressyour_VPS_IP
Port443
UUIDyour_UUID
Protocoltcp
TLSEnabled
Flowxtls-rprx-vision
REALITYEnabled
Public Keyyour_public_key
Short ID55470656
SNIwww.apple.com
Fingerprintchrome

VLESS REALITY link format:

vless://UUID@IP:443?encryption=none&flow=xtls-rprx-vision&security=reality&sni=www.apple.com&fp=chrome&pbk=public_key&sid=55470656&type=tcp#node_name

Copy this link into Shadowrocket, tap + → Scan or Enter, paste it, and it’ll import in one tap.

Client Comparison

ClientPlatformREALITY SupportFlow Support
mihomoAll platforms✓ (native)✓
Surge 5macOS/iOS✓✓
ShadowrocketiOS✓✓
Clash VergemacOS/Windows✓ (mihomo-based)✓
v2rayNWindows✓✓
NekoboxAndroid✓✓

Multi-Node Configuration Tips

If you have multiple VPSs configured with REALITY, you can use the url-test group to automatically select the fastest one:

# mihomo
proxy-groups:
  - name: "REALITY Auto"
    type: url-test
    url: "http://www.gstatic.com/generate_204"
    interval: 180
    tolerance: 50
    proxies:
      - us-reality-1
      - hk-reality-1
      - jp-reality-1

It automatically tests speed every 3 minutes and switches to the node with the lowest latency.

FAQ

Q: Connection is slow but latency is normal Check if flow matches: if the server has xtls-rprx-vision enabled, the client must also set xtls-rprx-vision. Otherwise it falls back to degraded mode, which hurts speed and stability.

Q: Surge iOS keeps timing out

  1. Check if the VPS firewall allows port 443
  2. Try a different SNI that responds faster (test with: curl -I https://www.apple.com from the VPS)
  3. Disable flow and verify basic connectivity first

Q: mihomo connects but IP is still local Check your rules: make sure the routing rules for the target traffic point to your REALITY proxy group, not DIRECT.

Q: Client reports format error after entering public key REALITY public keys are base64url encoded (without +/=), 44 characters long. If you get a format error, it means there are line breaks or spaces mixed in during copying.

→ See Xray REALITY Server Configuration → See Hysteria2 Setup Guide


📷 Cover image · Generated with Flux Schnell AI · panshi.io brand style