Xray روی VPS: پروتکل VLESS و XTLS
Xray یک fork از V2Ray است که عملکرد بهتری دارد و پروتکلهای جدیدتری را معرفی کرده است. پروتکل VLESS سبکتر از VMess است و XTLS رمزگذاری دوگانه TLS را حذف میکند که منجر به سرعت چشمگیری بالاتر میشود. جدیدترین قابلیت Xray Reality است که بدون نیاز به دامنه یا TLS certificate واقعی، traffic fingerprint کاملا معتبر ایجاد میکند.
Need this done for your project?
We implement, you ship. Async, documented, done in days.
نصب Xray روی VPS
نصب Xray با اسکریپت رسمی:
bash -c "$(curl -L https://github.com/XTLS/Xray-install/raw/main/install-release.sh)" @ installبررسی نصب:
xray version
systemctl status xrayایجاد UUID و کلیدهای X25519 برای REALITY:
xray uuid
xray x25519خروجی x25519 شامل دو کلید است:
- Private key: برای سرور (در config نگه دارید)
- Public key: برای کلاینت (در تنظیمات کلاینت وارد کنید)
پیکربندی VLESS + REALITY
Reality جدیدترین و قویترین روش camouflage است. نمونه config.json:
nano /usr/local/etc/xray/config.json{
"inbounds": [{
"listen": "0.0.0.0",
"port": 443,
"protocol": "vless",
"settings": {
"clients": [{
"id": "YOUR_UUID_HERE",
"flow": "xtls-rprx-vision"
}],
"decryption": "none"
},
"streamSettings": {
"network": "tcp",
"security": "reality",
"realitySettings": {
"dest": "www.microsoft.com:443",
"serverNames": ["www.microsoft.com"],
"privateKey": "YOUR_PRIVATE_KEY_HERE",
"shortIds": [""]
}
}
}],
"outbounds": [{"protocol": "freedom"}]
}systemctl restart xrayپیکربندی VLESS + WebSocket + TLS
اگر Reality در دسترس نیست، VLESS + WS + TLS گزینه قوی دیگری است:
{
"inbounds": [{
"listen": "127.0.0.1",
"port": 10001,
"protocol": "vless",
"settings": {
"clients": [{"id": "YOUR_UUID_HERE", "flow": ""}],
"decryption": "none"
},
"streamSettings": {
"network": "ws",
"wsSettings": {
"path": "/xray",
"headers": {"Host": "yourdomain.com"}
}
}
}],
"outbounds": [{"protocol": "freedom"}]
}و در Nginx:
location /xray {
proxy_pass http://127.0.0.1:10001;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}کلاینتهای Xray و تنظیمات
Android: v2rayNG (پشتیبانی از Xray) از GitHub
https://github.com/2dust/v2rayNG/releases
iOS: Shadowrocket یا Streisand
Windows: v2rayN که از Xray core پشتیبانی میکند
تنظیمات VLESS + REALITY در کلاینت:
- Address: IP سرور VPS
- Port: 443
- UUID: YOUR_UUID_HERE
- Flow: xtls-rprx-vision
- Security: reality
- Public Key: کلید عمومی x25519 سرور
- SNI: www.microsoft.com
REALITY نیازی به دامنه ندارد - مستقیم با IP سرور کار میکند. این یعنی حتی اگر Cloudflare یا دامنه شما دسترسیپذیر نباشد، اتصال باقی میماند.
Related Services
Why Anubiz Host
Ready to get started?
Skip the research. Tell us what you need, and we'll scope it, implement it, and hand it back — fully documented and production-ready.