Repository navigation
Description
Xray 1.8.9 (Xray, Penetrates Everything.) 37f8654 (go1.22.1 windows/amd64)
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x18 pc=0x7827a5]
goroutine 54 [running]:
bufio.(*Writer).Flush(0xc000132f80)
bufio/bufio.go:639 +0x45
net/http.(*Request).write(0xc000342240, {0x0, 0x0}, 0x0, 0x0, 0x0)
net/http/request.go:764 +0xbd7
net/http.(*Request).Write(...)
net/http/request.go:555
github.com/xtls/xray-core/transport/internet/httpupgrade.dialhttpUpgrade({0x1658f80, 0xc000398600}, {{0x1659108, 0xc0003882a0}, 0x1f90, 0x2}, 0xc000373b80)
github.com/xtls/xray-core/transport/internet/httpupgrade/dialer.go:56 +0x8be
github.com/xtls/xray-core/transport/internet/httpupgrade.dial({0x1658f80, 0xc000398600}, {{0x1659108, 0xc0003882a0}, 0x1f90, 0x2}, 0xc000373b80)
github.com/xtls/xray-core/transport/internet/httpupgrade/dialer.go:78 +0x189
github.com/xtls/xray-core/transport/internet.Dial({0x1658f80, 0xc000398600}, {{0x1659108?, 0xc0003882a0?}, 0x82a0?, 0xc0?}, 0x0?)
github.com/xtls/xray-core/transport/internet/dialer.go:60 +0x1c7
github.com/xtls/xray-core/app/proxyman/outbound.(*Handler).Dial(0xc00038e700, {0x1658f80?, 0xc000398600?}, {{0x1659108, 0xc0003882a0}, 0x1f90, 0x2})
github.com/xtls/xray-core/app/proxyman/outbound/handler.go:280 +0xa13
github.com/xtls/xray-core/proxy/vless/outbound.(*Handler).Process.func1()
github.com/xtls/xray-core/proxy/vless/outbound/outbound.go:85 +0xa6
github.com/xtls/xray-core/common/retry.(*retryer).On(0xc0000f3bd8, 0xc0000f3c68)
github.com/xtls/xray-core/common/retry/retry.go:27 +0xc6
github.com/xtls/xray-core/proxy/vless/outbound.(*Handler).Process(0xc0003981b0, {0x1658f80, 0xc000398600}, 0xc00038c140, {0x1656610, 0xc00038e700})
github.com/xtls/xray-core/proxy/vless/outbound/outbound.go:82 +0x28e
github.com/xtls/xray-core/app/proxyman/outbound.(*Handler).Dispatch(0xc00038e700, {0x1658f80, 0xc000398600}, 0xc00038c140)
github.com/xtls/xray-core/app/proxyman/outbound/handler.go:206 +0x3d8
github.com/xtls/xray-core/app/dispatcher.(*DefaultDispatcher).routedDispatch(0xc000392000, {0x1658f80, 0xc000398600}, 0xc00038c140, {{0x1658d88, 0xc000386060}, 0x1bb, 0x2})
github.com/xtls/xray-core/app/dispatcher/default.go:443 +0xca6
github.com/xtls/xray-core/app/dispatcher.(*DefaultDispatcher).Dispatch.func1()
github.com/xtls/xray-core/app/dispatcher/default.go:266 +0x3f9
created by github.com/xtls/xray-core/app/dispatcher.(*DefaultDispatcher).Dispatch in goroutine 53
github.com/xtls/xray-core/app/dispatcher/default.go:239 +0x40b
Activity
RPRX commentedon Mar 12, 2024
看代码是没加 TLS 时会 panic,已修复,请测试 d3a218f
Fangliding commentedon Mar 12, 2024
可以考虑一下实现 httpupgrade 0-rtt 嘛()
RPRX commentedon Mar 12, 2024
目测
继承conn并重写Read(),第一次被调用时再http.ReadResponse()就行,太简单了你写吧,还是 C++ 的术语方便交流Add ConnReq to make HTTPUpgrade 0-RTT
RPRX commentedon Mar 13, 2024
写了,
但我没搭建 HTTPUpgrade 所以没测试,你们试一下 CF 接不接受它 @Fangliding @yuhan6665 @maskedeken @FDeghymaskedeken commentedon Mar 13, 2024
c144470#r139725007
Add ConnRF to make HTTPUpgrade 0-RTT
RPRX commentedon Mar 13, 2024
感谢,修了:5c41292
RPRX commentedon Mar 14, 2024
所以有人测试了 5c41292 能过 CF 吗FDeghy commentedon Mar 14, 2024
yes, can pass CF <3
H1JK commentedon Mar 15, 2024
I would like to say that HTTPUpgrade is a part of V2Fly's (or xiaokangwang's) experiment to test if WebSocket headers are used to identify proxies. To be consistent with common HTTP/1.1 connections, it should send continuous data only after receiving the server response. So enabling 0-RTT here definitely breaks the experiment.
I think it would be better to add a option to switch if 0-RTT is enabled, and it should be turned off by default (means no 0-RTT by default to simulate common HTTP/1.1 connection).
RPRX commentedon Mar 16, 2024
细说Fangliding commentedon Mar 16, 2024
小绿的臆想而已 不少伊朗人都觉得http头有文章或者可以拿来大作文章(然而实际情况懂得都懂)
httpupgrade实际上源于tor的webtunnel tor项目组也想实现类似的网页分流代理 但是他们并没有直接用ws而是自己新写了一个项目 就是我刚刚说的webtunnel 前段时间刚官宣 为了轻量就没有额外的考量了(可见说什么experiment就是扯淡 引入这个纯粹是因为占用比ws小不少) 所以v2fly的文档都写明了推荐和tls一起使用
9 remaining items
HTTPUpgrade 0-RTT (#3152)
RPRX commentedon Mar 17, 2024
HTTPUpgrade 0-RTT 的原理是“不等 Upgrade 的结果,直接发数据”(WS 协议规范有限制所以不能这么干),没放 header,无限发
还有你文档更新早了,参考一下 #3152RPRX commentedon Mar 17, 2024
@Fangliding 顺便测一下 HTTPUpgrade 不填和填 ed 时是否正常,没问题的话我准备发条频道消息
jahboom commentedon Mar 26, 2024
我是否认为不支持 WebSocket 的 CDN 也无法使用 HTTPUpgrade 方法?
RPRX commentedon Mar 30, 2024
对
ouilymadi9 commentedon Apr 1, 2024
Aide-moi
Fix XTLS#3128
Add ConnRF to make HTTPUpgrade 0-RTT
HTTPUpgrade 0-RTT (XTLS#3152)
Fix XTLS#3128
Add ConnRF to make HTTPUpgrade 0-RTT
HTTPUpgrade 0-RTT (XTLS#3152)
Fix XTLS/Xray-core#3128
Add ConnRF to make HTTPUpgrade 0-RTT
HTTPUpgrade 0-RTT (#3152)