Closed Tonny-Gu closed 1 year ago
@AkinoKaede 已更新
The config is wrong, streamSettings
is not a sub-item of settings
.
29,34c29,34
< ]
< },
< "streamSettings": {
< "network": "ws",
< "wsSettings": {
< "path": "[HIDE]"
---
> ],
> "streamSettings": {
> "network": "ws",
> "wsSettings": {
> "path": "[HIDE]"
> }
{
"log": {
"loglevel": "debug"
},
"reverse": {
"bridges": [
{
"tag": "bridge",
"domain": "rproxy.reserved.domain.com"
}
]
},
"outbounds": [
{
"tag": "tunnel",
"protocol": "vmess",
"settings": {
"vnext": [
{
"address": "localhost",
"port": 8880,
"users": [
{
"alterId": 1,
"id": "[HIDE]"
}
]
}
]
},
"streamSettings": {
"network": "ws",
"wsSettings": {
"path": "[HIDE]"
}
}
},
{
"protocol": "freedom",
"settings": {},
"tag": "out"
}
],
"routing": {
"rules": [
{
"type": "field",
"inboundTag": [
"bridge"
],
"domain": [
"full:rproxy.reserved.domain.com"
],
"outboundTag": "tunnel"
},
{
"type": "field",
"inboundTag": [
"bridge"
],
"outboundTag": "out"
}
]
}
}
The config is wrong,
streamSettings
is not a sub-item ofsettings
.Patch
29,34c29,34 < ] < }, < "streamSettings": { < "network": "ws", < "wsSettings": { < "path": "[HIDE]" --- > ], > "streamSettings": { > "network": "ws", > "wsSettings": { > "path": "[HIDE]" > }
Full Config
{ "log": { "loglevel": "debug" }, "reverse": { "bridges": [ { "tag": "bridge", "domain": "rproxy.reserved.domain.com" } ] }, "outbounds": [ { "tag": "tunnel", "protocol": "vmess", "settings": { "vnext": [ { "address": "localhost", "port": 8880, "users": [ { "alterId": 1, "id": "[HIDE]" } ] } ] }, "streamSettings": { "network": "ws", "wsSettings": { "path": "[HIDE]" } } }, { "protocol": "freedom", "settings": {}, "tag": "out" } ], "routing": { "rules": [ { "type": "field", "inboundTag": [ "bridge" ], "domain": [ "full:rproxy.reserved.domain.com" ], "outboundTag": "tunnel" }, { "type": "field", "inboundTag": [ "bridge" ], "outboundTag": "out" } ] } }
I have a similar problem when tunneling through a firewall using websocket. I have applied this 'corrected' version, but I still keep getting something like:
2022/08/07 21:08:20 [Info] app/proxyman/outbound: failed to process outbound traffic > proxy/vless/outbound: connection ends > proxy/vless/outbound: failed to decode response header > proxy/vless/encoding: failed to read response version > EOF
The funny part is that, I got the same error even I did not start up the server side v2ray nor httpd at all. This could mean that the traffic never left the client machine.
Although it may sound like a dirty workaround, it is fully possible to make use of the tunnel v2ray establishes to expose ports behind NAT with the help of 3rd party reverse proxies that support tunneling traffic through a socks5 / http proxy. Here is a sample configuration with frpc:
frpc.ini
:
[common]
; Keep in mind that this 127.0.0.1 refers to the node running server side V2Ray! (i.e. the 'exit node' of the tunnel)
server_addr = 127.0.0.1
server_port = 7000
; This address points to a proxy. It can be a local V2Ray with websocket outbound.
http_proxy = socks5://127.0.0.1:17906
log_file = console
[web]
type = tcp
local_ip = 127.0.0.1
local_port = 8080
remote_port = 80
@y0umu As far as I remember, the corrected config is working in my case. If you are seeking an alternative solution, I would actually recommend GOSTv3, which is easy to deploy and supports tunneling through various protocols, such as socks5 / http / ssh / private protocol (named Relay) over websocket + tls.
This issue is stale because it has been open 120 days with no activity. Remove stale label or comment or this will be closed in 5 days
你正在使用哪个版本的 V2Ray?
均使用Docker安装,加入参数
--net host
你的使用场景是什么?
使用WS(S)的tunnel作为portal和bridge之间通信的方法
你看到的异常现象是什么?
当V2Ray使用以下组合时,内网穿透的工作情况为:
V2Ray和Xray两个实现均存在此问题
你期待看到的正常表现是怎样的?
内网穿透可以与任意Stream Setting组合使用
请附上你的配置
以下内容为本地测试VMess + WS的配置
服务端配置:
客户端配置:
另外也测试过VMessAEAD (alterID=1)和VLess,问题仍然存在
请附上出错时软件输出的错误日志
服务器端错误日志:
(无异常)
客户端错误日志: