Giter VIP home page Giter VIP logo

Comments (6)

Fangliding avatar Fangliding commented on June 1, 2024 1

或许应该把ws里校验host的部分移除掉算了 这种问题见到有人说不是一次两次了 不过这个请求看起来正确发送了host才对啊
翻了一下代码 这个校验会不会存在大小写问题?
顺便要不在代码里加上日志输出 Want host a.com but received b.com 这样的输出方便确定问题?

from xray-core.

yuhan6665 avatar yuhan6665 commented on June 1, 2024 1

日志加了
@X-Oracle 1.8.10 added new logic to validate ws host. It is expected and consistent behavior with other transport.

from xray-core.

yuhan6665 avatar yuhan6665 commented on June 1, 2024

What is your client version, server version? Please post your config

from xray-core.

X-Oracle avatar X-Oracle commented on June 1, 2024

What is your client version, server version? Please post your config

OK.

Client:

  • xray 1.8.10 ( win:V2rayN v6.43 | android:V2rayNG 1.8.19 )

Server:

  • clean installation of ubuntu 22 amd64
  • xray 1.8.10 amd64

config

{
  "log": {
    "loglevel": "debug"
  },
  "inbounds": [
    {
      "listen": null,
      "port": 443,
      "protocol": "vless",
      "settings": {
        "clients": [
          {
            "email": "EMAIL",
            "flow": "",
            "id": "UUID"
          }
        ],
        "decryption": "none",
        "fallbacks": []
      },
      "sniffing": {
        "destOverride": [
          "http",
          "tls"
        ],
        "enabled": true
      },
      "streamSettings": {
        "network": "ws",
        "security": "none",
        "wsSettings": {
          "acceptProxyProtocol": false,
          "headers": {},
          "host": "SUBDOMAIN.workers.dev",
          "path": "PATH"
        }
      },
      "tag": "in-443"
    }
  ],
  "outbounds": [
    {
      "protocol": "freedom",
      "settings": {},
      "tag": "direct"
    },
    {
      "protocol": "blackhole",
      "settings": {},
      "tag": "blocked"
    }
  ],
  "policy": {
    "levels": {
      "0": {
        "statsUserDownlink": true,
        "statsUserUplink": true
      }
    },
    "system": {
      "statsInboundDownlink": true,
      "statsInboundUplink": true
    }
  },
  "routing": {
    "domainStrategy": "AsIs",
    "rules": [
      {
        "ip": [
          "geoip:private"
        ],
        "outboundTag": "blocked",
        "type": "field"
      },
      {
        "outboundTag": "blocked",
        "protocol": [
          "bittorrent"
        ],
        "type": "field"
      }
    ]
  },
  "stats": {}
}

this only works when built using e2302b4 and older

PS: here is header generated by worker-relay for sending request to my server:

{
            "accept-encoding": "gzip, br",
            "cf-connecting-ip": "IP",
            "cf-ipcountry": "DE",
            "cf-ray": "CF_RAY",
            "cf-visitor": "{\"scheme\":\"https\"}",
            "connection": "Upgrade",
            "host": "SUBDOMAIN.workers.dev",
            "sec-websocket-key": "SEC_WS_KEY",
            "sec-websocket-version": "13",
            "upgrade": "websocket",
            "user-agent": "USER_AGENT",
            "x-forwarded-proto": "https",
            "x-real-ip": "IP"
}

from xray-core.

yuhan6665 avatar yuhan6665 commented on June 1, 2024

Try remove host setting in

        "wsSettings": {
          "acceptProxyProtocol": false,
          "headers": {},
          "host": "SUBDOMAIN.workers.dev",
          "path": "PATH"
        }

from xray-core.

X-Oracle avatar X-Oracle commented on June 1, 2024

Try remove host setting in

        "wsSettings": {
          "acceptProxyProtocol": false,
          "headers": {},
          "host": "SUBDOMAIN.workers.dev",
          "path": "PATH"
        }

Oh right I forgot to mention. It works when I don't fill host field in server config.

PS: filling host field or adding host header has the same result.

from xray-core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.