Используем Xray как VPN

e809a7df0cc2fc90587df0fea31c5caa
{
    "log": {
        "loglevel": "debug"
    },
    "routing": {
        "rules": [
            {
                "type": "field",
                "domain": [
                    "xray.com"
                ],
                "outboundTag": "bridge"
            }
        ]
    },
    "inbounds": [
        {
            "listen": "127.0.0.1",
            "port": 10808,
            "protocol": "socks",
            "settings": {
                "udp": true
            },
            "sniffing": {
                "enabled": true,
                "destOverride": [Заносим в файл
                    "http",
                    "tls",
                    "quic"
                ],
                "routeOnly": true
            }
        }
    ],
    "outbounds": [
        {
            "protocol": "vless",
            "settings": {
                "vnext": [
                    {
                        "address": "proxy_hostname_or_ip",
                        "port": 443,
                        "users": [
                            {
                                "id": "client_uuid_0", // Needs to match server side
                                "encryption": "none",
                                "flow": "xtls-rprx-vision"
                            }
                        ]
                    }
                ]
            },
            "streamSettings": {
                "network": "tcp",
                "security": "reality",
                "realitySettings": {
                    "fingerprint": "chrome",
                    "serverName": "google.com", // If your dest is `1.1.1.1:443`, then leave it empty
                    "publicKey": "proxy_publicKey", // run `xray x25519` to generate. Public and private keys need to be corresponding.
                    "spiderX": "", // If your dest is `1.1.1.1:443`, then you can fill it with `/dns-query/` or just leave it empty
                    "shortId": "client_shortId_0" // Required
                }
            },
            "tag": "proxy"
        },
        {
            "protocol": "vless",
            "settings": {
                "vnext": [
                    {
                        "address": "bridge_hostname_or_ip",
                        "port": 443,
                        "users": [
                            {
                                "id": "client_uuid_0", // Needs to match server side
                                "encryption": "none",
                                "flow": "xtls-rprx-vision"
                            }
                        ]
                    }
                ]
            },
            "streamSettings": {
                "network": "tcp",
                "security": "reality",
                "realitySettings": {
                    "fingerprint": "chrome",
                    "serverName": "google.com", // If your dest is `1.1.1.1:443`, then leave it empty
                    "publicKey": "bridge_publicKey", // run `xray x25519` to generate. Public and private keys need to be corresponding.
                    "spiderX": "", // If your dest is `1.1.1.1:443`, then you can fill it with `/dns-query/` or just leave it empty
                    "shortId": "client_shortId_0" // Required
                }
            },
            "tag": "bridge"
        }
    ]
}

© Habrahabr.ru