Comments (6)
或许应该把ws里校验host的部分移除掉算了 这种问题见到有人说不是一次两次了 不过这个请求看起来正确发送了host才对啊
翻了一下代码 这个校验会不会存在大小写问题?
顺便要不在代码里加上日志输出 Want host a.com but received b.com 这样的输出方便确定问题?
from xray-core.
日志加了
@X-Oracle 1.8.10 added new logic to validate ws host. It is expected and consistent behavior with other transport.
from xray-core.
What is your client version, server version? Please post your config
from xray-core.
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.
Try remove host setting in
"wsSettings": {
"acceptProxyProtocol": false,
"headers": {},
"host": "SUBDOMAIN.workers.dev",
"path": "PATH"
}
from xray-core.
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)
- Help with fallbacks HOT 1
- NTP client service HOT 1
- different DNS server for Node Address Domain HOT 1
- 关于文档中对sniffing和Tor的描述问题 HOT 12
- Quic sniffer 再次失效 HOT 2
- quic sniffer 失效 HOT 10
- iperf3: error - control socket has closed unexpectedly - when testing with xray HOT 17
- Invert Routing Rules HOT 9
- 发错地方了 HOT 1
- httpupgrade not working HOT 3
- ERR_SSL_Protocol_error in 1.8.11 with Vless-tls HOT 15
- MUX not working (unexpected EOF) HOT 1
- can't open video HOT 2
- 在最新版本V1.8.11内使用wireguard出口导致xray崩溃 HOT 1
- 1.8.12 docker模式下kernelMode": false, wireguard出站错误 HOT 2
- Wireguard panic: runtime error: index out of range [-1] HOT 7
- Connecting to the server inbounds through multiple domains HOT 5
- Suggestion: flag to disable logging in a separate inbound/outbound. HOT 1
- 编译xray-core时出现错误:gvisortun/tun.go中 'pkt.IsNil undefined' 的问题 HOT 1
- stop xray core in wiregourd HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xray-core.