Xray-examples icon indicating copy to clipboard operation
Xray-examples copied to clipboard

VLESS WSS NGINX

Open St4ck777 opened this issue 1 year ago • 1 comments
trafficstars

Regarding https://github.com/XTLS/Xray-examples/tree/main/VLESS-WSS-Nginx

I am not able to get it work, I wonder what I am missing?

On the server side it show "ip connect google.com/443"

But on client side I get "Fail to detect internet connection: net/http: tls handshake timeout

client file:

{
  "log": {},
  "inbounds": [
    {
      "port": "1080",
      "protocol": "socks",
      "settings": {
        "auth": "noauth",
        "udp": true
      }
    },
    {
      "port": "1081",
      "protocol": "http",
      "settings": {}
    }
  ],
  "outbounds": [
    {
      "protocol": "vless",
      "settings": {
        "vnext": [
          {
            "address": "{my.ownwebsite.com}",
            "port": 443,
            "users": [
              {
                "id": "{generatedid}", //填写你的 UUID
                "encryption": "none"
              }
            ]
          }
        ]
      },
      "streamSettings": {
        "network": "ws",
        "security": "tls",
        "wsSettings": {
          "path": "{/myWS}" //?ed=2048 前面填写你的 path
        },
        "tlsSettings": {
          "allowInsecure": false,
          "serverName": "{my.ownwebsite.com}",  //Equal to "SNI"
          "fingerprint": "chrome" //"chrome" or "firefox"
      }
    }},
    {
      "tag": "direct",
      "protocol": "freedom",
      "settings": {}
    },
    {
      "tag": "blocked",
      "protocol": "blackhole",
      "settings": {}
    }
  ],
  "routing": {
    "domainStrategy": "IPOnDemand",
    "rules": [
      {
        "type": "field",
        "ip": [
          "geoip:private"
        ],
        "outboundTag": "direct"
      }
    ]
  }
}

using android v2rayNG for client and ubuntu for server.

St4ck777 avatar Nov 24 '23 10:11 St4ck777

Server side:

2023/11/24 01:55:13 xxx.xxx.xxx.xxx:0 accepted tcp:www.google.com:443 [direct]
        2023/11/24 02:05:58  xxx.xxx.xxx.xxx:0 accepted tcp:www.google.com:443 [direct]

server config:

{
  "log": {
    "loglevel": "warning" // https://github.com/XTLS/Xray-examples/tree/main/VLESS-WSS-Nginx
  },
  "inbounds": [
    {
      "listen": "127.0.0.1",
      "port": 1234 ,
      "protocol": "vless",
      "settings": {
        "clients": [
          {
            "id":  // 填写你的 UUID
          }
        ],
        "decryption": "none"
      },
      "streamSettings": {
        "network": "ws",
        "wsSettings": {
          "path": "{/myWS}" // 填写你的 path
        }
      },
      "sniffing": {
        "enabled": true,
        "destOverride": [
          "http",
          "tls"
        ]
      }
    }
  ],
  "outbounds": [
    {
      "tag": "direct",
      "protocol": "freedom",
      "settings": {}
    },
    {
      "tag": "blocked",
      "protocol": "blackhole",
      "settings": {}
    }
  ],
  "routing": {
    "domainStrategy": "IPIfNonMatch",
    "rules": [
      {
        "type": "field",
        "ip": [
          "geoip:cn",
          "geoip:private"
        ],
        "outboundTag": "blocked"
      }
    ]
  }
}

St4ck777 avatar Nov 24 '23 23:11 St4ck777

Did you fill every fields?

Fangliding avatar Mar 22 '24 04:03 Fangliding