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
23.2k stars 3.71k forks source link

What would be the server config? #1459

Closed railwaysystem closed 3 months ago

railwaysystem commented 1 year ago

Client config below :

"outbounds": [
    {
      "mux": {
        "concurrency": 8,
        "enabled": false
      },
      "protocol": "vmess",
      "settings": {
        "vnext": [
          {
            "address": "<some address that I can access without vpn>", // this address is like SNI/Bughost, owned by someonelse,
            "port": 80,
            "users": [
              {
                "alterId": 0,
                "encryption": "",
                "flow": "",
                "id": "46f0879c-c6ed-4182-90b7-8e8337dc8089",
                "level": 8,
                "security": "auto"
              }
            ]
          }
        ]
      },
      "streamSettings": {
        "network": "ws",
        "security": "",
        "wsSettings": {
          "headers": {
            "Host": "<service provider server host>"
          },
          "path": "/vmess"
        }
      },
      "tag": "proxy"
    },
    {
      "protocol": "freedom",
      "settings": {},
      "tag": "direct"
    },
    {
      "protocol": "blackhole",
      "settings": {
        "response": {
          "type": "http"
        }
      },
      "tag": "block"
    }
  ],

image

Above config is generated by free Vmess/Vless providers like https://sshstores.net. But when I deploy my own, I am not able to use SNI/BUGHOST as address.

So what would be the server config for this type of client config???

iopq commented 1 year ago

Most people use port 443, port 80 was weird sometimes

wy580477 commented 1 year ago

Like this: Screenshot_2022-12-25-12-30-15-661_com microsoft emmx dev

You set host to whatever domain on client side.

If you are going to use tls, you need to turn off client side certificate verification. Then you can set sni to whatever domain.

railwaysystem commented 1 year ago

Most people use port 443, port 80 was weird sometimes

none are working for me.

railwaysystem commented 1 year ago

Like this: Screenshot_2022-12-25-12-30-15-661_com microsoft emmx dev

You set host to whatever domain on client side.

If you are going to use tls, you need to turn off client side certificate verification. Then you can set sni to whatever domain.

i tried putting sniffing section on server side...but still i am not able to use random host address on client side. But my port is 80. Will this be causing any problem?

Error on client side: 12-29 07:58:51.888 D/com.v2ray.ang(23129): measureV2rayDelay: go.Universe$proxyerror: Get "http://www.google.com/generate_204": io: read/write on closed pipe 12-29 07:58:51.890 I/GoLog (23129): [Warning] app/proxyman/outbound: failed to process outbound traffic > proxy/vmess/outbound: failed to find an available destination > common/retry: [transport/internet/websocket: failed to dial WebSocket > transport/internet/websocket: failed to dial to (ws://SNI address/vmess): 301 Moved Permanently > websocket: bad handshake] > common/retry: all retry attempts failed

Error on server side: no indication of any connection

railwaysystem commented 1 year ago

Like this: Screenshot_2022-12-25-12-30-15-661_com microsoft emmx dev

You set host to whatever domain on client side.

If you are going to use tls, you need to turn off client side certificate verification. Then you can set sni to whatever domain.

image

us254 commented 9 months ago
"inbounds": [
    {
        "port": 80,
        "protocol": "vmess",
        "settings": {
            "clients": [
                {
                    "id": "46f0879c-c6ed-4182-90b7-8e8337dc8089",
                    "alterId": 0,
                    "level": 8
                }
            ]
        },
        "streamSettings": {
            "network": "ws",
            "wsSettings": {
                "path": "/vmess"
            }
        },
        "tag": "proxy"
    }
],
"outbounds": [
    {
        "protocol": "freedom",
        "tag": "direct"
    },
    {
        "protocol": "blackhole",
        "tag": "block"
    }
]