Пример инструкции: Azion CDN + gRPC для Xray
Для скрытия айпи адреса сервера для обхода блокировок сервера Схема работы: Клиент (Россия) → Azion CDN → Ваш сервер (144.124.226.190:8445)
ЧАСТЬ 1: Настройка Azion CDN (веб-интерфейс) 1. Регистрация на Azion - Перейдите на Azion Web Platform | Azion
- Нажмите "Sign Up" / "Create Account"
- Заполните данные (email, пароль)
- Подтвердите email
2. Создание домена - В панели Azion → "Domains" → "Add Domain"
- Введите домен (например: vpn.yourdomain.com или используйте бесплатный .azionapp.net)
- Нажмите "Create"
3. Настройка Origin - В панели Azion → "Origins" → "Add Origin"
- Origin Name: xray-origin
- Origin Address: 144.124.226.190
- Origin Port: 8445
- Protocol: HTTP/2
- Enable gRPC:

- Нажмите "Save"
4. Настройка Rules Engine - В панели Azion → "Rules Engine" → "Add Rule"
- Rule Name: grpc-proxy
- Condition: Request URI matches *
- Behavior: Forward to Origin → выберите xray-origin
- Enable HTTP/2:

- Нажмите "Save"
5. SSL сертификат - В панели Azion → "Certificates" → "Add Certificate"
- Если есть свой домен — загрузите сертификат
- Если используете .azionapp.net — Azion выдаст бесплатный Let's Encrypt
- Нажмите "Activate"
ЧАСТЬ 2: Настройка сервера (SSH команды) Подключитесь к европейскому серверу: bash
ssh root@144.124.226.190
1. Сделайте бэкап текущего конфига: bash
cp /usr/local/etc/xray/config.json /usr/local/etc/xray/config.json.backup.reality
2. Создайте новый конфиг с TLS вместо Reality: bash
cat > /usr/local/etc/xray/config.json << 'EOF'
{
"log": {
"loglevel": "debug"
},
"inbounds": [
{
"port": 8445,
"listen": "::",
"protocol": "vless",
"settings": {
"clients": [
{
"id": "526e217d-f286-49e5-a261-a5a659efbfac"
}
],
"decryption": "none",
"sniffing": {
"enabled": true,
"destOverride": ["http", "tls", "quic", "fakedns"],
"routeOnly": true
}
},
"streamSettings": {
"network": "grpc",
"security": "tls",
"tlsSettings": {
"certificates": [
{
"certificateFile": "/etc/xray/fullchain.pem",
"keyFile": "/etc/xray/privkey.pem"
}
],
"serverName": "vpn.yourdomain.com",
"alpn": ["h2", "http/2"]
},
"grpcSettings": {
"serviceName": "grpc-service"
}
},
"mux": {
"enabled": true,
"concurrency": 4
},
"tag": "vless-grpc-tls"
},
{
"port": 8443,
"listen": "::",
"protocol": "vless",
"settings": {
"clients": [
{
"id": "526e217d-f286-49e5-a261-a5a659efbfac"
}
],
"decryption": "none",
"sniffing": {
"enabled": true,
"destOverride": ["http", "tls", "quic", "fakedns"],
"routeOnly": true
}
},
"streamSettings": {
"network": "xhttp",
"xhttpSettings": {
"mode": "auto",
"path": "/xhttp-8443",
"host": "vpn.yourdomain.com"
}
},
"mux": {
"enabled": true,
"concurrency": 8
},
"tag": "vless-xhttp-8443"
},
{
"port": 8444,
"listen": "::",
"protocol": "vless",
"settings": {
"clients": [
{
"id": "526e217d-f286-49e5-a261-a5a659efbfac"
}
],
"decryption": "none",
"sniffing": {
"enabled": true,
"destOverride": ["http", "tls", "quic", "fakedns"],
"routeOnly": true
}
},
"streamSettings": {
"network": "xhttp",
"xhttpSettings": {
"mode": "packet-up",
"path": "/xhttp-8444",
"host": "vpn.yourdomain.com"
}
},
"mux": {
"enabled": true,
"concurrency": 8
},
"tag": "vless-xhttp-8444"
},
{
"port": 1080,
"listen": "0.0.0.0",
"protocol": "socks",
"settings": {
"auth": "password",
"udp": true,
"accounts": [
{
"user": "proxyuser",
"pass": "xnhrRQGTjUho3GmU"
}
]
},
"sniffing": {
"enabled": true,
"destOverride": ["http", "tls"]
},
"tag": "socks-in"
}
],
"outbounds": [
{
"protocol": "freedom",
"tag": "direct"
}
],
"routing": {
"domainStrategy": "IPIfNonMatch",
"rules": [
{
"type": "field",
"inboundTag": ["vless-grpc-tls"],
"outboundTag": "direct"
},
{
"type": "field",
"inboundTag": ["vless-xhttp-8443"],
"outboundTag": "direct"
},
{
"type": "field",
"inboundTag": ["vless-xhttp-8444"],
"outboundTag": "direct"
},
{
"type": "field",
"inboundTag": ["socks-in"],
"outboundTag": "direct"
}
]
}
}
EOF
Замените vpn.yourdomain.com на ваш домен Azion! 3. Создайте директорию для сертификатов: bash
mkdir -p /etc/xray
4. Сгенерируйте самоподписанный сертификат (если используете свой домен): bash
openssl req -x509 -nodes -days 365 -newkey rsa:2048 \
-keyout /etc/xray/privkey.pem \
-out /etc/xray/fullchain.pem \
-subj "/CN=vpn.yourdomain.com"
Замените vpn.yourdomain.com на ваш домен! 5. Установите права: bash
chmod 600 /etc/xray/privkey.pem
chmod 644 /etc/xray/fullchain.pem
6. Проверьте конфиг: bash
xray run -test -config /usr/local/etc/xray/config.json
7. Перезапустите Xray: bash
systemctl restart xray
systemctl status xray
8. Проверьте логи: bash
journalctl -u xray -n 50
ЧАСТЬ 3: Обновление VLESS ссылки Новая ссылка (через CDN): vless://
526e217d-f286-49e5-a261-a5a659efbfac@vpn.yourdomain.com:443?encryption=none&security=tls&sni=vpn.yourdomain.com&fp=chrome&alpn=h2,http/2&type=grpc&serviceName=grpc-service#CDN-gRPC-TLS
Замените vpn.yourdomain.com на ваш домен Azion! ЧАСТЬ 4: Обновление русского сервера Подключитесь к русскому серверу: bash
ssh root@195.80.50.6
1. Бэкап конфига: bash
cp /usr/local/etc/xray/config.json /usr/local/etc/xray/config.json.backup.reality
2. Обновите outbound для подключения к CDN: bash
cat > /usr/local/etc/xray/config.json << 'EOF'
{
"log": {
"loglevel": "debug"
},
"inbounds": [
{
"port": 443,
"listen": "::",
"protocol": "vless",
"settings": {
"clients": [
{
"id": "9a5e4a9c-d2d9-49f6-b9d9-0cce662dabe1"
}
],
"decryption": "none",
"sniffing": {
"enabled": true,
"destOverride": [
"http",
"tls",
"quic",
"fakedns"
]
}
},
"streamSettings": {
"network": "xhttp",
"security": "reality",
"realitySettings": {
"dest": "ads.x5.ru:443",
"serverNames": [
"ads.x5.ru"
],
"privateKey": "EMyt7317SPqCUTRj4ZwACyYf1LjCYitk39P2I",
"shortIds": [
""
]
},
"xhttpSettings": {
"mode": "packet-up",
"path": "/api/v1/update",
"host": "ads.x5.ru"
}
},
"mux": {
"enabled": true,
"concurrency": 4
},
"tag": "vless-in"
},
{
"port": 1080,
"listen": "0.0.0.0",
"protocol": "socks",
"settings": {
"auth": "password",
"udp": true,
"accounts": [
{
"user": "proxyuser",
"pass": "xnhrRQGTjUho3GmU"
}
]
},
"sniffing": {
"enabled": true,
"destOverride": [
"http",
"tls"
]
},
"tag": "socks-in"
}
],
"outbounds": [
{
"tag": "chain-to-cdn",
"protocol": "vless",
"settings": {
"vnext": [
{
"address": "vpn.yourdomain.com",
"port": 443,
"users": [
{
"id": "526e217d-f286-49e5-a261-a5a659efbfac",
"encryption": "none"
}
]
}
]
},
"streamSettings": {
"network": "grpc",
"security": "tls",
"tlsSettings": {
"serverName": "vpn.yourdomain.com",
"fingerprint": "chrome",
"alpn": ["h2", "http/2"],
"allowInsecure": false
},
"grpcSettings": {
"serviceName": "grpc-service"
}
},
"mux": {
"enabled": true,
"concurrency": 4
}
},
{
"protocol": "freedom",
"tag": "direct"
}
],
"routing": {
"domainStrategy": "IPIfNonMatch",
"rules": [
{
"type": "field",
"outboundTag": "direct",
"domain": [
"geosite:category-ru",
"regexp:\\.ru$",
"geosite:yandex",
"full:cp.cloudflare.com"
]
},
{
"type": "field",
"inboundTag": ["vless-in"],
"outboundTag": "chain-to-cdn"
},
{
"type": "field",
"inboundTag": ["socks-in"],
"outboundTag": "chain-to-cdn"
}
]
}
}
EOF
Замените vpn.yourdomain.com на ваш домен Azion! 3. Перезапустите Xray: bash
systemctl restart xray
systemctl status xray
ЧАСТЬ 5: Проверка 1. Проверьте что CDN работает: bash
curl -I
https://vpn.yourdomain.com 2. Проверьте Xray на сервере: bash
journalctl -u xray -f
3. Протестируйте новую VLESS ссылку с клиента ВАЖНО: - Замените все vpn.yourdomain.com на ваш реальный домен Azion
- Reality security больше не используется — вместо него TLS
- Если что-то не работает — можно восстановить бэкап:
bash
cp /usr/local/etc/xray/config.json.backup.reality /usr/local/etc/xray/config.json
systemctl restart xray