Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config: Remove legacy inbound/outbound/detours #3769

Merged
merged 3 commits into from
Sep 6, 2024

Conversation

mmmray
Copy link
Collaborator

@mmmray mmmray commented Sep 6, 2024

These things seem entirely undocumented, make it a hard error to set them.

@RPRX
Copy link
Member

RPRX commented Sep 6, 2024

这些不像 transport,Xray 的文档中就没有出现过,可以直接删掉,不必 left for returning error

看起来我们正在执行 #1967 ,对 3 有什么想法吗,比如说底层传输那里要找到最终的 dial 简直是一坨,尤其是 UDP 实在太混乱了每次看都把我绕进去,根本记不住架构看一次痛苦一次,急需简化一下

@mmmray
Copy link
Collaborator Author

mmmray commented Sep 6, 2024

In the end, I am still new to the codebase, and do some superficial refactoring as I encounter issues. I think it will take a long time to warm up to this kind of work.

I found that when adding a new transport, a lot of new interfaces have to be added. I wish that instead of parsing JSON, building a protobuf struct from it, there is instead one config struct per transport and that's it. This is my personal vendetta. I haven't done any research on how to achieve this. Originally I said, I want to remove protobuf, but I don't think it's realistic anymore unless there is a decision to remove grpc API and replace it with some JSON/REST API.

Right now I am trying to compile infra/conf to wasm, in order to use it in some online "config validation" tool. Of course, I underestimated this. I need to strictly separate the struct definitions in infra/conf from any code that imports things like sys/unix.

I also noticed that there are wasm-related build tags in the code, but the codebase definitely does not compile to wasm at all.

Anyway, all of this is totally unrelated, but I might propose a PR to split up the config-related code so that some parts can be compiled separately. I don't know what exactly to do yet.

@RPRX RPRX changed the title Remove inbound/outbound/inboundDetours/outboundDetours Config: Remove legacy inbound/outbound/detours Sep 6, 2024
@RPRX RPRX merged commit 6838a0a into XTLS:main Sep 6, 2024
35 of 36 checks passed
@RPRX
Copy link
Member

RPRX commented Sep 6, 2024

I found that when adding a new transport, a lot of new interfaces have to be added. I wish that instead of parsing JSON, building a protobuf struct from it, there is instead one config struct per transport and that's it. This is my personal vendetta.

看来你也发现了当前的基础架构有多么 shit,据说是 java 的锅,我也想把 Xray-core 的基础架构改得简洁直观,让我们一起努力

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants