Premier Radiant: VLESS + WS + TLS For Home IPv6 with Cloudflare DNS Proxy

Premier Radiant by Franc Gossin is licensed under CC BY-NC-ND 4.0

2025-12-03

VLESS + WS + TLS For Home IPv6 with Cloudflare DNS Proxy


First, install nginx on home server:
sudo apt update
sudo apt install nginx
Then install certificate to your nginx.

Edit this file:
/etc/nginx/sites-enabled/default
server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;
    server_name v.yourdomain.com;

    ssl_certificate /etc/nginx/vless.crt;
    ssl_certificate_key /etc/nginx/vless.key;

    root /var/www/html;
    index index.html;

    location / {
        try_files $uri /index.html;
    }

    # WebSocket for VLESS
    location /vlessws {
        proxy_redirect off;
        proxy_pass http://127.0.0.1:10000;

        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $host;

        proxy_set_header X-Real-IP $remote_addr;
    }
}
Install Xray, edit config:
/usr/local/etc/xray/config.json
{
  "log": {
    "loglevel": "warning"
  },
  "inbounds": [
    {
      "port": 10000,
      "listen": "127.0.0.1",
      "protocol": "vless",
      "settings": {
        "clients": [
          {
            "id": "#uuid",
            "flow": ""
          }
        ],
        "decryption": "none"
      },
      "streamSettings": {
        "network": "ws",
        "wsSettings": {
          "path": "/vlessws"
        }
      }
    }
  ],
  "outbounds": [
    {
      "protocol": "freedom"
    }
  ]
}
Generate a uuid with:
xray uuid
Restart Xray:
systemctl restart xray
systemctl enable xray

Now go to Cloudflare DNS setting and turn DNS Proxy on for v.yourdomain.com. This proxy may cause a greater lantency, but sometimes useful when you have only IPv6 but no IPv4 address.

No comments:

Post a Comment