xray – vless ws tls

协议:vless
流控:vision
传输:websocket
安全:tls

server

{
    "log": {
        "loglevel": "warning"
    },
    "routing": {
        "rules": [
            {
                "port": "443",
                "network": "udp",
                "outboundTag": "block"
            }
        ]
    },
    "inbounds": [
        {
            "listen": "127.0.0.1",
            "port": 8001,
            "protocol": "vless",
            "settings": {
                "clients": [
                    {
                        "id": "chika" // 长度为 1-30 字节的任意字符串,或执行 xray uuid 生成
                    }
                ],
                "decryption": "none"
            },
            "streamSettings": {
                "network": "ws",
                "wsSettings": {
                    "path": "/lovelive"
                }
            },
            "sniffing": {
                "enabled": true,
                "destOverride": [
                    "http",
                    "tls",
                    "quic"
                ]
            }
        }
    ],
    "outbounds": [
        {
            "protocol": "freedom",
            "tag": "direct"
        },
        {
            "protocol": "blackhole",
            "tag": "block"
        }
    ]
}

client

{
    "log": {
        "loglevel": "warning"
    },
    "routing": {
        "rules": [
            {
                "ip": [
                    "geoip:private"
                ],
                "outboundTag": "direct"
            }
        ]
    },
    "inbounds": [
        {
            "listen": "127.0.0.1",
            "port": 10808,
            "protocol": "socks"
        },
        {
            "listen": "127.0.0.1",
            "port": 10809,
            "protocol": "http"
        }
    ],
    "outbounds": [
        {
            "protocol": "vless",
            "settings": {
                "vnext": [
                    {
                        "address": "",
                        "port": 443,
                        "users": [
                            {
                                "id": "chika", // 与服务端一致
                                "encryption": "none"
                            }
                        ]
                    }
                ]
            },
            "streamSettings": {
                "network": "ws",
                "wsSettings": {
                    "path": "/lovelive?ed=2560", // 与服务端一致,建议增加 ?ed=2560 以启用 0-RTT 降低延迟
                    "host": "chika.example.com" // 若 "address": "" 中填的是 VPS 的 IP,此处必须填 Nginx 配置中 server_name 的值,否则会因在 Nginx 配置中启用了 ssl_reject_handshake 而连接失败
                },
                "security": "tls",
                "tlsSettings": {
                    "serverName": "",
                    "fingerprint": "chrome"
                }
            },
            "tag": "proxy"
        },
        {
            "protocol": "freedom",
            "tag": "direct"
        }
    ]
}

留下评论

您的邮箱地址不会被公开。 必填项已用 * 标注