fix(protocol): support plain SIP002 SS userinfo for ss2022 URLTest#147
Conversation
| @@ -0,0 +1,33 @@ | |||
| package protocol | |||
There was a problem hiding this comment.
已经有了ss_test,对应协议的测试内容集中在本协议对应的测试文件里面而不是针对某项功能专门增加test一个测试用例文件
|
目前你的分支落后于 main 分支,为了确保代码在最新环境下运行正常,麻烦你将分支 rebase 到最新的 main 并解决可能存在的逻辑问题。谢谢! |
|
感谢回复,昨天在添加节点时发现的小问题,另外延迟测试时候有些协议是不是不支持,我测试ss2022中,128的支持,256的不支持,这个功能是否也在新版本已解决 |
延迟测试使用的mihomo内核,需要确认一下mihomo对ss2022的支持性相关问题诶!我这边没有ss相关节点进行测试所以无法确定具体问题所在。😔 |
|
我昨天让codex帮我修复这个问题了,但是他好像没给提pr,等我晚上回家看看,可以的话再提一个pr可以吗 |
欢迎pr!另外pr前记得rebase下main! |
|
okok |
10d3009 to
9e173c1
Compare
|
Rebased onto the latest This PR documents two user-visible failures with one shared root cause:
I reproduced the failures on the latest unpatched |
THX PR~ protocol/ss的测试内容放到ss_test而不是新建一个独立的新文件! |
Summary
This PR is now rebased onto the latest
main(01b50b6) and only keeps the SS parsing fix.It addresses two user-visible problems that share the same root cause:
userinfofail to parse.ss2022nodes then fail latency / URL tests, which makes them look like Mihomo does not support those links.Root Cause
DecodeSSURLcurrently does an unconditional base64 decode onuserinfobefore splittingcipher:password:ss://base64(cipher:password)@host:portss://cipher:password@host:portFor the plain SIP002 form, the current code decodes the already-plain
userinfoagain, so valid links such asss://2022-blake3-aes-256-gcm:...@host:portare rejected before Mihomo ever gets a usable adapter.In practice that shows up as two symptoms:
URLTest/ latency test fails for those samess2022nodes, not because Mihomo necessarily lacksss2022support, but because the adapter creation path already failed in SublinkProFix
decodeSSAuthto accept both SS auth encodings:userinfocipher:passworduserinfoPathUnescapeplainuserinfo, so reserved characters are preservedTests
userinfoss2022materialgo test ./node/protocolManual Validation On Latest Main
I reproduced this on the latest
mainfirst, then re-tested with this patch.On the latest unpatched
main, previously failingss2022sample links still timed out in real Mihomo URL tests because adapter creation failed first.After applying this patch on top of the latest
main, the samess2022samples passed URL testing successfully.