1️⃣ نصب هسته X-Ray
bash -c "$(curl -L https://github.com/XTLS/Xray-install/raw/main/install-release.sh)" @ install
2️⃣ باز کردن فایل json
nano /usr/local/etc/xray/config.json3️⃣ جایگذاری متن زیر در فایل json
{
"inbounds": [
{
"listen": "127.0.0.1",
"port": 62789,
"protocol": "dokodemo-door",
"settings": {
"address": "127.0.0.1"
},
"tag": "api"
},
{
"listen": null,
"port": پورت مقصد,
"protocol": "dokodemo-door",
"settings": {
"address": "آیپی مقصد",
"followRedirect": false,
"network": "tcp,udp",
"port": پورت مقصد
},
"tag": "inbound-نام دلخواه"
}
],
"outbounds": [
{
"protocol": "freedom"
},
{
"protocol": "blackhole",
"tag": "blocked"
}
]
}❗️ نکته:
در متن بالا، قسمت هایی که به فارسی نوشته شده رو تکمیل کنید و بعد فایل رو ذخیره کنید.
4️⃣ اجرای تانل با استفاده از دستور زیر:
systemctl restart xray🌩🌩🌩🌩🌩🌩🌩🌩
💬 اگه قصد اضافه کردن چند اینباند رو دارید در مثال زیر ۳ اینباند با پورت های مختلف استفاده شده. شما میتونید هر تعداد که خواستین اضافه کنید .
{
"inbounds": [
{
"listen": "127.0.0.1",
"port": 62789,
"protocol": "dokodemo-door",
"settings": {
"address": "127.0.0.1"
},
"tag": "api"
},
{
"listen": null,
"port": 443,
"protocol": "dokodemo-door",
"settings": {
"address": "2707:4700:110:8a1a:85ef",
"followRedirect": false,
"network": "tcp,udp",
"port": 443
},
"tag": "inbound-443"
},
{
"listen": null,
"port": 80,
"protocol": "dokodemo-door",
"settings": {
"address": "2808:4700:110:8a1a:85ef",
"followRedirect": false,
"network": "tcp,udp",
"port": 80
},
"tag": "inbound-80"
},
{
"listen": null,
"port": 8080,
"protocol": "dokodemo-door",
"settings": {
"address": "2909:4700:110:8a1a:85ef",
"followRedirect": false,
"network": "tcp,udp",
"port": 8080
},
"tag": "inbound-8080"
}
],
"outbounds": [
{
"protocol": "freedom"
},
{
"protocol": "blackhole",
"tag": "blocked"
}
]
}
💻 UbuntuCommands
