Xray-core
Xray-core copied to clipboard
ssh连接会在几秒后报 context canceled
部分信息有脱敏处理
客户端日志:
2021/12/29 16:24:26 [Info] [3936585957] proxy/http: request to Method [CONNECT] Host [国内ip:port] with URL [//国内ip:port]
2021/12/29 16:24:26 [Info] [3936585957] app/dispatcher: taking detour [direct] for [tcp:国内ip:port]
2021/12/29 16:24:26 [Info] [3936585957] proxy/freedom: opening connection to tcp:国内ip:port
2021/12/29 16:24:26 [Info] [3936585957] transport/internet/tcp: dialing TCP to tcp:国内ip:port
2021/12/29 16:24:26 [Debug] transport/internet: dialing to tcp:国内ip:port
2021/12/29 16:24:32 [Info] [3936585957] app/proxyman/outbound: failed to process outbound traffic > proxy/freedom: connection ends > context canceled
2021/12/29 16:24:32 [Info] [3936585957] app/proxyman/inbound: connection ends > proxy/http: connection ends > context canceled
2021/12/29 16:24:40 [Info] [1237743431] proxy/http: request to Method [CONNECT] Host [国外IP:port] with URL [//国外IP:port]
2021/12/29 16:24:40 [Info] [1237743431] app/dispatcher: default route for tcp:国外IP:port
2021/12/29 16:24:40 [Info] [1237743431] transport/internet/tcp: dialing TCP to tcp:x.x.x.x:8443
2021/12/29 16:24:40 [Debug] transport/internet: dialing to tcp:x.x.x.x:8443
2021/12/29 16:24:40 [Info] [1237743431] proxy/vless/outbound: tunneling request to tcp:国外IP:port via tcp:x.x.x.x:8443
2021/12/29 16:24:46 [Info] [1237743431] app/proxyman/inbound: connection ends > proxy/http: connection ends > context canceled
2021/12/29 16:24:46 [Info] [1237743431] app/proxyman/outbound: failed to process outbound traffic > proxy/vless/outbound: connection ends > context canceled
服务端日志:
2021/12/29 16:24:40 [Info] [348570047] proxy/vless/inbound: firstLen = 85
2021/12/29 16:24:40 [Info] [348570047] proxy/vless/inbound: received request for tcp:国外IP:port
2021/12/29 16:24:40 [Info] [348570047] app/dispatcher: default route for tcp:国外IP:port
2021/12/29 16:24:40 [Info] [348570047] proxy/freedom: opening connection to tcp:国外IP:port
2021/12/29 16:24:40 [Info] [348570047] transport/internet/tcp: dialing TCP to tcp:国外IP:port
2021/12/29 16:24:40 [Debug] transport/internet: dialing to tcp:国外IP:port
2021/12/29 16:24:51 [Info] [348570047] app/proxyman/inbound: connection ends > proxy/vless/inbound: connection ends > context canceled
2021/12/29 16:24:51 [Info] [348570047] app/proxyman/outbound: failed to process outbound traffic > proxy/freedom: connection ends > context canceled
2021/12/29 16:24:54 [Info] [2659653877] proxy/vless/inbound: firstLen = 0
2021/12/29 16:24:54 [Info] [2659653877] app/proxyman/inbound: connection ends > proxy/vless/encoding: failed to read request version > EOF
配置文件 client.json:
{
"log": {
"error": "",
"loglevel": "debug",
"access": "none"
},
"inbounds": [
{
"tag": "socks",
"listen": "0.0.0.0",
"protocol": "socks",
"settings": {
"ip": "",
"userLevel": 0,
"timeout": 3,
"udp": false,
"auth": "noauth"
},
"port": "1080"
},
{
"tag": "http",
"listen": "0.0.0.0",
"protocol": "http",
"settings": {
"userLevel": 0,
"timeout": 3
},
"port": "1081"
}
],
"outbounds": [
{
"tag": "proxy",
"protocol": "vless",
"settings": {
"vnext": [
{
"address": "x.x.x.x",
"port": 8443,
"users": [
{
"id": "d9861e3e-0386-44c0-ddea-12345678",
"alterId": 0,
"email": "[email protected]",
"security": "auto",
"encryption": "none",
"flow": "xtls-rprx-direct"
}
]
}
]
},
"streamSettings": {
"network": "tcp",
"security": "xtls",
"xtlsSettings": {
"allowInsecure": false,
"serverName": "www.example.com"
}
},
"mux": {
"enabled": false,
"concurrency": -1
}
},
{
"tag": "direct",
"protocol": "freedom",
"settings": {}
},
{
"tag": "block",
"protocol": "blackhole",
"settings": {
"response": {
"type": "http"
}
}
}
],
"routing": {
"domainStrategy": "IPOnDemand",
"rules": [
{
"type": "field",
"outboundTag": "direct",
"domain": ["geosite:cn"]
},
{
"type": "field",
"outboundTag": "direct",
"ip": [
"geoip:cn",
"geoip:private"
]
}
]
},
"policy": {
"levels": {
"0": {
"handshake": 4,
"connIdle": 1200,
"uplinkOnly": 2,
"downlinkOnly": 5,
"statsUserUplink": false,
"statsUserDownlink": false,
"bufferSize": 4
}
},
"system": {
"statsInboundUplink": false,
"statsInboundDownlink": false,
"statsOutboundUplink": false,
"statsOutboundDownlink": false
}
}
}
服务端配置文件:
{
"log": {
"error": "",
"loglevel": "debug",
"access": "none"
},
"routing": {
"rules": [
{
"inboundTag": [
"api"
],
"outboundTag": "api",
"type": "field"
},
{
"ip": [
"geoip:private"
],
"outboundTag": "blocked",
"type": "field"
},
{
"outboundTag": "blocked",
"protocol": [
"bittorrent"
],
"type": "field"
}
]
},
"dns": null,
"inbounds": [
{
"listen": "127.0.0.1",
"port": 62789,
"protocol": "dokodemo-door",
"settings": {
"userLevel": 0,
"address": "127.0.0.1"
},
"streamSettings": null,
"tag": "api",
"sniffing": null
},
{
"listen": null,
"port": 8443,
"protocol": "vless",
"settings": {
"userLevel": 0,
"clients": [
{
"id": "d9861e3e-0386-44c0-ddea-12345678",
"flow": "xtls-rprx-direct"
}
],
"decryption": "none",
"fallbacks": []
},
"streamSettings": {
"network": "tcp",
"security": "xtls",
"xtlsSettings": {
"serverName": "www.example.com",
"certificates": [
{
"certificateFile": "/path/www.example.com.pem",
"keyFile": "/path/www.example.com.key"
}
]
},
"tcpSettings": {
"header": {
"type": "none"
}
}
},
"tag": "inbound-8443",
"sniffing": {
"enabled": true,
"destOverride": [
"http",
"tls"
]
}
}
],
"outbounds": [
{
"protocol": "freedom",
"settings": {}
},
{
"protocol": "blackhole",
"settings": {},
"tag": "blocked"
}
],
"transport": null,
"policy": {
"levels": {
"0": {
"handshake": 4,
"connIdle": 1200,
"uplinkOnly": 2,
"downlinkOnly": 5,
"statsUserUplink": false,
"statsUserDownlink": false,
"bufferSize": 4
}
},
"system": {
"statsInboundDownlink": true,
"statsInboundUplink": true
}
},
"api": {
"services": [
"HandlerService",
"LoggerService",
"StatsService"
],
"tag": "api"
},
"stats": {},
"reverse": null,
"fakeDns": null
}
tj和xtls都有这个问题
ws没这个问题