v2ray / v2ray-core

A platform for building proxies to bypass network restrictions.
https://www.v2ray.com/
MIT License
45.01k stars 8.95k forks source link

使用 Firefox 浏览超长域名导致代理服务停止 #571

Closed pkron closed 6 years ago

pkron commented 6 years ago

正在使用的版本:v2.37 64位(Windows10 X64)

你的使用场景是:通过Firefox浏览以下网页

aaaaaaaaaaaaaaaaaaaaaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.tumblr.com

看到的不正常是:显示 panic: runtime error: slice bounds out of range,代理服务停止

你期待看到的是:没有错误提示,正常运行。

附上的配置文件: https://github.com/v2ray/v2ray-core/files/1280238/config.json.txt

出错时软件输出:

V2Ray v2.37 (One for all) 20170907 An unified platform for anti-censorship. 2017/09/15 09:53:54 [Debug]App|Proxyman|Inbound: creating tcp worker on 0.0.0.0:8080 2017/09/15 09:53:55 [Info]Transport|Internet|TCP: listening TCP on 0.0.0.0:8080 2017/09/15 09:53:55 [Warning]Core: V2Ray started panic: runtime error: slice bounds out of range

goroutine 10 [running]: v2ray.com/core/common/buf.(Buffer).Bytes(...) src/v2ray.com/core/common/buf/buffer.go:74 v2ray.com/core/proxy/socks.ClientHandshake(0xc043768360, 0xdb8618, 0xc042004020, 0xacc1e0, 0xc042004020, 0xc043768101, 0xc043773d38, 0x410871) src/v2ray.com/core/proxy/socks/protocol.go:416 +0x1358 v2ray.com/core/proxy/socks.(Client).Process(0xc04203b000, 0xad39e0, 0xc04353b4d0, 0xdb8640, 0xc043720e90, 0xaccca0, 0xc042042f00, 0x0, 0x0) src/v2ray.com/core/proxy/socks/client.go:82 +0x49c v2ray.com/core/app/proxyman/outbound.(Handler).Dispatch(0xc042042f00, 0xad39e0, 0xc04353b4d0, 0xdb8640, 0xc043720e90) src/v2ray.com/core/app/proxyman/outbound/handler.go:83 +0x1e9 v2ray.com/core/app/dispatcher/impl.(DefaultDispatcher).routedDispatch(0xc04370d080, 0xad39e0, 0xc04353b4d0, 0xdb8640, 0xc043720e90, 0x5000000002, 0xad4160, 0xc043720e60) src/v2ray.com/core/app/dispatcher/impl/default.go:135 +0xa8 created by v2ray.com/core/app/dispatcher/impl.(*DefaultDispatcher).Dispatch src/v2ray.com/core/app/dispatcher/impl/default.go:76 +0x45d

q158073378252010 commented 6 years ago

是不是该提供抓包数据?

pkron commented 6 years ago

由于本机127.0.0.1无法抓包,在这里提供搭建在Raspberry PI上面的同版本v2ray的抓包。

v2ray.zip

DarienRaymond commented 6 years ago

会在下一版本修复