XTLS / Xray-core

Xray, Penetrates Everything. Also the best v2ray-core, with XTLS support. Fully compatible configuration.
https://t.me/projectXray
Mozilla Public License 2.0
22.79k stars 3.65k forks source link

Weird error while starting latest XRay-core on Ubuntu #3199

Closed senglory closed 2 months ago

senglory commented 3 months ago

Here's its status:

root@ubuntu:~# systemctl status xray × xray.service - Xray Service Loaded: loaded (/etc/systemd/system/xray.service; enabled; vendor preset: enabled) Drop-In: /etc/systemd/system/xray.service.d └─10-donot_touch_single_conf.conf Active: failed (Result: exit-code) since Tue 2024-03-26 21:51:04 UTC; 4min 23s ago Docs: https://github.com/xtls Main PID: 662 (code=exited, status=23) CPU: 19ms

Mar 26 21:51:03 ubuntu systemd[1]: Started Xray Service. Mar 26 21:51:04 ubuntu xray[662]: Xray 1.8.9 (Xray, Penetrates Everything.) 37f8654 (go1.22.1 linux/amd64) Mar 26 21:51:04 ubuntu xray[662]: A unified platform for anti-censorship. Mar 26 21:51:04 ubuntu xray[662]: 2024/03/26 21:51:04 [Info] infra/conf/serial: Reading config: /usr/local/etc/xray/config.json Mar 26 21:51:04 ubuntu xray[662]: Failed to start: main: failed to load config files: [/usr/local/etc/xray/config.json] > infra/conf: Please use VLESS flow "xtls-rprx-vision" with TLS or REALITY. Mar 26 21:51:04 ubuntu systemd[1]: xray.service: Main process exited, code=exited, status=23/n/a Mar 26 21:51:04 ubuntu systemd[1]: xray.service: Failed with result 'exit-code'. root@ubuntu:~#

Here's my /usr/local/etc/xray/config.json:


{
    "log": {
        "loglevel": "warning"
    },
    "inbounds": [
        {
            "port": 443,
            "protocol": "vless",
            "settings": {
                "clients": [
                    {
                        "id": "66666666-CCCC-4444-8888-999999999999",
                        "flow": "xtls-rprx-vision",
                        "level": 0,
                        "email": "myname@mydomain.com"
                    }
                ],
                "decryption": "none",
                "fallbacks": [
                    {
                        "dest": 80
                    }
                ]
            },
            "streamSettings": {
                "network": "tcp",
                "security": "xtls",
                "xtlsSettings": {
                    "alpn": [
                        "http/1.1"
                    ],
                    "certificates": [
                        {
                            "certificateFile": "/etc/letsencrypt/live/gehxxxx.xxxx.xxx/fullchain.pem",
                            "keyFile": "/etc/letsencrypt/live/gehxxxx.xxxx.xxx/privkey.pem"
                        }
                    ]
                }
            }
        }
    ],
    "outbounds": [
        {
            "protocol": "freedom"
        }
    ]
}

And as a result, I can't connect to the server from XRay client. What should I do to have the issue fixed?

vrnobody commented 3 months ago
Mar 26 21:51:04 ubuntu xray[662]: Failed to start: main: failed to load config files: [/usr/local/etc/xray/config.json] > infra/conf: Please use VLESS flow "xtls-rprx-vision" with TLS or REALITY.
{
    "inbounds": [
        {
            "streamSettings": {
                "network": "tcp",
                "security": "xtls",  // <----
                "xtlsSettings": { }
            }
        }
    ]
}