mirror of
https://github.com/house-of-vanity/OutFleet.git
synced 2025-10-23 16:59:08 +00:00
4.2 KiB
4.2 KiB
Xray Client URI Generation
VMess URI Format
VMess URIs use two formats:
1. Query Parameter Format
vmess://uuid@hostname:port?parameters#alias
Parameters:
encryption=auto
- Encryption methodsecurity=tls|none
- Security layer (TLS or none)sni=domain
- Server Name Indication for TLSfp=chrome|firefox|safari
- TLS fingerprinttype=ws|tcp|grpc|http
- Transport typepath=/path
- WebSocket/HTTP pathhost=domain
- Host header for WebSocket
Example:
vmess://2c981164-9b93-4bca-94ff-b78d3f8498d7@v2ray.codefyinc.com:443?encryption=auto&security=tls&sni=example.com&fp=chrome&type=ws&path=/ws&host=v2ray.codefyinc.com#MyServer
2. Base64 JSON Format
vmess://base64(json_config)#alias
JSON Structure:
{
"v": "2",
"ps": "Server Name",
"add": "hostname",
"port": "443",
"id": "uuid",
"aid": "0",
"scy": "auto",
"net": "ws",
"type": "none",
"host": "domain",
"path": "/path",
"tls": "tls",
"sni": "domain",
"alpn": "",
"fp": "chrome"
}
VLESS URI Format
vless://uuid@hostname:port?parameters#alias
Key Parameters:
encryption=none
- VLESS uses no encryptionsecurity=tls|reality|none
- Security layertype=ws|tcp|grpc|http|httpupgrade|xhttp
- Transport typeflow=xtls-rprx-vision
- Flow control (for XTLS)headerType=none|http
- Header type for TCPmode=auto|gun|stream-one
- Transport modeserviceName=name
- gRPC service nameauthority=domain
- gRPC authorityspx=/path
- Split HTTP path (for xhttp)
REALITY Parameters:
pbk=public_key
- Public keysid=short_id
- Short IDfp=chrome|firefox|safari
- TLS fingerprintsni=domain
- Server Name Indication
Examples:
vless://uuid@server.com:443?type=tcp&security=none&headerType=none#Basic
vless://uuid@server.com:443?type=ws&security=tls&path=/ws&host=example.com#WebSocket
vless://uuid@server.com:443?type=grpc&security=reality&serviceName=grpcService&pbk=key&sid=id#gRPC-Reality
Generation Algorithm
- UUID: Use
inbound_users.xray_user_id
- Hostname: From
servers.hostname
- Port: From
server_inbounds.port_override
or template default - Transport: From inbound template
stream_settings
- Security: Based on certificate configuration
- Path: From WebSocket stream settings
- Alias: User name + server name
Shadowsocks URI Format
ss://password@hostname:port?parameters#alias
Parameters:
encryption=none
- Usually none for modern configssecurity=tls|reality|none
- Security layertype=ws|tcp|grpc|xhttp
- Transport typepath=/path
- WebSocket/HTTP pathhost=domain
- Host headermode=auto|gun|stream-one
- Transport modeheaderType=none|http
- Header type for TCPflow=xtls-rprx-vision
- Flow control (for REALITY)pbk=key
- Public key (for REALITY)sid=id
- Short ID (for REALITY)
Example:
ss://my-password@server.com:443?type=ws&security=tls&path=/ws&host=example.com#MyServer
Trojan URI Format
trojan://password@hostname:port?parameters#alias
Parameters:
security=tls|reality|none
- Security layertype=ws|tcp|grpc
- Transport typesni=domain
- Server Name Indicationfp=chrome|firefox|randomized
- TLS fingerprintflow=xtls-rprx-vision
- Flow controlallowInsecure=1
- Allow insecure connectionsheaderType=http|none
- Header type for TCPmode=gun
- gRPC modeserviceName=name
- gRPC service name
WebSocket Parameters:
path=/path
- WebSocket pathhost=domain
- Host headeralpn=http/1.1|h2
- ALPN protocols
Examples:
trojan://password@server.com:443?type=tcp&security=tls&sni=example.com#Basic
trojan://password@server.com:443?type=ws&security=tls&path=/ws&host=example.com&sni=example.com#WebSocket
trojan://password@server.com:443?type=grpc&security=tls&serviceName=grpcService&mode=gun&sni=example.com#gRPC
Implementation Notes
- VMess requires
aid=0
for modern clients - VLESS doesn't use
aid
parameter - Shadowsocks uses password instead of UUID
- Base64 encoding required for VMess JSON format
- URL encoding needed for special characters in parameters
- REALITY parameters:
pbk
,sid
,fp
,sni