migration. migrate all sudoku kernel-related code to mihomo#2456
migration. migrate all sudoku kernel-related code to mihomo#2456wwqgtxx merged 4 commits intoMetaCubeX:Alphafrom
Conversation
|
Why use a name like xhttp? It confuses users. A more meaningful name should be used. |
| } | ||
|
|
||
| transport := &http.Transport{ | ||
| Proxy: http.ProxyFromEnvironment, |
| } | ||
|
|
||
| transport := &http.Transport{ | ||
| Proxy: http.ProxyFromEnvironment, |
|
Well, I referred to some of the xhttp/pht code because my original HTTP obfuscation was quite rudimentary, so I casually added the Sudoku version of xhttp and pht. This was based on the original implementation but has some differences from the original version. In short, to some extent, Sudoku can now ride on the coattails of these two, behaving more like HTTP requests in ASCII mode, and inadvertently able to bypass CDN as well. This is also the source of its name. In fact, I personally recommend using 'auto' and 'legacy' as parameters, but I haven't abandoned xhttp and pht. Please let me know how to delete or modify anything you think is inappropriate |
| IdleConnTimeout: 30 * time.Second, | ||
| TLSHandshakeTimeout: 10 * time.Second, | ||
| DialContext: func(dialCtx context.Context, network, addr string) (net.Conn, error) { | ||
| if addr == urlHost { |
| IdleConnTimeout: 30 * time.Second, | ||
| TLSHandshakeTimeout: 10 * time.Second, | ||
| DialContext: func(dialCtx context.Context, network, addr string) (net.Conn, error) { | ||
| if addr == urlHost { |
|
Since it's different from the original, it shouldn't use a name like |
|
|
|
Furthermore, I don't think automatically determining whether to enable TLS based on the port is a good design; users should know exactly what they are doing. |
|
What you said makes a lot of sense. , I am making changes, may takes a few time since sudoku-seld needs change first |
|
Looking at the code, there are three almost identical code snippets in |
|
In our use case, fallback of |
|
For |
|
I have made changes as you suggested while ensuring backward compatibility. Currently, after my own testing, all functions are working properly. |
|
Should we provide an |
|
It is not needed for now, because I have already completed testing in the Sudoku repository itself. Furthermore, this new feature was tested in Mihomo in the previous version of Httpmask. There are essentially no changes in this new version; for the server side, it only needs to strip external HTTP obfuscation. |
|
mihomo's own Moreover, it's not complicated; simply copy an existing function and add tests for the four parameters of |
|
It can be observed that |
|
It seems that the current race condition only occurs on Windows, which is strange. I don't know how to fix it immediately. |
|
For now, we can temporarily use |
|
Hold on, I think I've found the reason. Previously, you added Singmux's inbound to Sudoku, but I didn't handle the related logic afterward; I just stacked code on the original basis. The issue may lie within this part of the related logic. I'm working on it now. It's probably related to the area near |
|
Damn, it seems like it can't be resolved tonight. I'll skip for now as you suggested and then merge |
|
I found a small problem in your code and fixed it for you. You can sync the correct code to the repository later when you have time: c456370 Of course, this doesn't solve the problem of the test failing on Windows. |
The reason for this substantial code change is that I completely removed the reference to Sudoku in the Go module and instead placed a separate version of the code within Mihomo. This accomplished the work mentioned in this comment and synchronized the new features from this release.