
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):
| Parameter | Description |
|---|---|
| Server Address | VPS public IP |
| Port | Port the server listens on (port 443 recommended) |
| UUID | Client ID configured on the server |
| Public Key | Public key generated by xray x25519 |
| Short ID | One of the shortIds configured on the server |
| SNI | serverNames 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 Safarifirefox: 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:
- Don’t enable UDP: Surge iOS uses REALITY over TCP. Enabling UDP can cause issues.
- SNI needs to be stable: iOS is more sensitive to handshake timeouts. Choose an SNI that responds quickly.
- 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:
| Field | Value |
|---|---|
| Address | your_VPS_IP |
| Port | 443 |
| UUID | your_UUID |
| Protocol | tcp |
| TLS | Enabled |
| Flow | xtls-rprx-vision |
| REALITY | Enabled |
| Public Key | your_public_key |
| Short ID | 55470656 |
| SNI | www.apple.com |
| Fingerprint | chrome |
Import via Link
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
| Client | Platform | REALITY Support | Flow Support |
|---|---|---|---|
| mihomo | All platforms | ✓ (native) | ✓ |
| Surge 5 | macOS/iOS | ✓ | ✓ |
| Shadowrocket | iOS | ✓ | ✓ |
| Clash Verge | macOS/Windows | ✓ (mihomo-based) | ✓ |
| v2rayN | Windows | ✓ | ✓ |
| Nekobox | Android | ✓ | ✓ |
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
- Check if the VPS firewall allows port 443
- Try a different SNI that responds faster (test with:
curl -I https://www.apple.comfrom the VPS) - 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