Skip to content
This repository has been archived by the owner on Mar 17, 2024. It is now read-only.

[Bug]浏览器直接访问ipv6地址出错 #118

Closed
qzydustin opened this issue Jun 4, 2022 · 8 comments
Closed

[Bug]浏览器直接访问ipv6地址出错 #118

qzydustin opened this issue Jun 4, 2022 · 8 comments
Labels
bug Something isn't working

Comments

@qzydustin
Copy link
Contributor

Describe the bug【描述 bug】
浏览器直接访问http://[ipv6 address]
无法访问

Expected behavior【预期的行为】
打开ipv6网页

Config file 【配置文件,客户端服务端配置都提供】
[[listen]]
tag = "vlesss"
protocol = "vlesss"
users = [
]
host = "0.0.0.0"
port = 443
version = -1
insecure = false
cert = "/etc/verysimple/cert.pem"
key = "/etc/verysimple/cert.key"
advancedLayer = "ws"
path =

@qzydustin qzydustin added the bug Something isn't working label Jun 4, 2022
@e1732a364fed
Copy link
Owner

配置文件,客户端服务端配置都提供

@qzydustin
Copy link
Contributor Author

qzydustin commented Jun 5, 2022

服务端

[[listen]]
tag = "vlesss"
protocol = "vlesss"
users = [
]
host = "0.0.0.0"
port = 443
version = -1
insecure = false
cert = "/etc/verysimple/cert.pem"
key = "/etc/verysimple/cert.key"
advancedLayer = "ws"
path =

[[listen]]
tag = "myreject"
host = "/dev/shm/myreject"
network = "unix"
protocol = "reject"
extra = { type = "nginx" } 

客户端

v2rayn

@qzydustin
Copy link
Contributor Author

补充一下细节,本地没有ipv6,代理服务器有ipv6,打开代理。

访问http://[2402:4e00:1013:e500:0:940e:29d7:3443]

无法访问。

照理可以访问此网站。

@e1732a364fed
Copy link
Owner

debug日志

@qzydustin
Copy link
Contributor Author

v2rayN 客户端日志

2022/06/05 23:58:48 [Info] [2680934917] proxy/socks: TCP Connect request to tcp:[2402:4e00:1013:e500:0:940e:29d7:3443]:80
2022/06/05 23:58:48 [Info] [2680934917] app/dispatcher: taking detour [proxy] for [tcp:[2402:4e00:1013:e500:0:940e:29d7:3443]:80]
2022/06/05 23:58:48 tcp:127.0.0.1:62026 accepted tcp:[2402:4e00:1013:e500:0:940e:29d7:3443]:80 [proxy]
2022/06/05 23:58:48 [Info] [2680934917] transport/internet/websocket: creating connection to tcp:***
2022/06/05 23:58:48 [Info] [2680934917] proxy/vless/outbound: tunneling request to tcp:[2402:4e00:1013:e500:0:940e:29d7:3443]:80 via tcp:***
2022/06/05 23:58:48 [Info] [2680934917] app/proxyman/outbound: failed to process outbound traffic > proxy/vless/outbound: connection ends > proxy/vless/outbound: failed to decode response header > proxy/vless/encoding: unexpected response version. Expecting 0 but actually 72
2022/06/05 23:58:48 [Info] [2680934917] app/proxyman/inbound: connection ends > proxy/socks: connection ends > proxy/socks: failed to transport all TCP response > io: read/write on closed pipe

@qzydustin
Copy link
Contributor Author

服务端

verysimple    | 2022-06-06 07:04:38.658 INFO    New Accepted Conn       {"connid": 785157, "from": "***", "handler": "tcp+tls+ws+vless://0.0.0.0:443#vlesss"}
verysimple    | 2022-06-06 07:04:38.738 WARN    failed in inServer proxy handshake      {"connid": 785157, "handler": "0.0.0.0:443", "error": " [ fallback, reason 4 , Detail: short read ] , with Buffer."}
verysimple    | 2022-06-06 07:04:38.742 DEBUG   Fallback to     {"addr": "/dev/shm/myreject", "params": ["http/1.1", "***"]}
verysimple    | 2022-06-06 07:04:38.745 DEBUG   Try routing     {"connid": 785157, "source": {"Addr":{"Network":"unix","Name":"/dev/shm/myreject","IP":"","Port":0},"InTag":"vlesss","UserIdentityStr":""}}
verysimple    | 2022-06-06 07:04:38.747 DEBUG   Default Route   {"connid": 785157, "source": "/dev/shm/myreject", "client": "direct", "addr": ""}
verysimple    | 2022-06-06 07:04:38.749 INFO    Request {"connid": 785157, "from": "****", "target": "unix://%2Fdev%2Fshm%2Fmyreject", "through": "direct://"}
verysimple    | 2022-06-06 07:04:38.752 DEBUG   handshake client with first payload     {"connid": 785157, "len": 536}
verysimple    | 2022-06-06 07:04:38.753 DEBUG   TryCopy {"id": 785157, "from": "*net.UnixConn", "->": "*ws.Conn"}
verysimple    | 2022-06-06 07:04:38.754 DEBUG   copying with readv      {"id": 785157}
verysimple    | 2022-06-06 07:04:38.755 DEBUG   TryCopy {"id": 785157, "from": "*ws.Conn", "->": "*net.UnixConn"}
verysimple    | 2022-06-06 07:04:38.758 DEBUG   copying with classic method     {"id": 785157}
verysimple    | 2022-06-06 07:04:38.759 INFO    New Accepted Conn       {"connid": 602846, "from": "@", "handler": "unix+reject:///dev/shm/myreject#myreject"}
verysimple    | 2022-06-06 07:04:38.761 DEBUG   Relay End       {"id": 785157, "direction": "R->L", "target": "/dev/shm/myreject", "bytes": 288, "error": "EOF"}
verysimple    | 2022-06-06 07:04:38.763 DEBUG   Relay End       {"id": 785157, "direction": "L->R", "target": "/dev/shm/myreject", "bytes": 0, "error": "read tcp ***->***: use of closed network connection"}

@e1732a364fed
Copy link
Owner

已经找到了错误。是我疏忽了,目前的代码竟然根本无法传输 ipv6数据。一个简单的错误,马上修复

@e1732a364fed
Copy link
Owner

最新代码应该修复了。

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants