refactor: separate the logic of `inbound fallback` so that it can be reused
works fine in deployment
~~Can you provide a detailed explanation of the changes?~~ It looks like integrated the separate fallback implementation of trojan and vless together Now we can easily add fallback in other protocols (~~is it really exits?~~)
Couple of thought:
- Write Everything Twice, then de-duplicate if more than three times
- Trojan is sunsetting, not worth much refactor So I think current code is ok, thanks for your effort though
如 @yuhan6665 所言,这部分代码其实没必要动,如果觉得代码重复我们可以删掉 Trojan 的 fallbacks 支持,但目前来说没必要动
1. Write Everything Twice, then de-duplicate if more than three times
Totally agree.
I think current code is ok
I think xray-core is a tool for creating new protocols, so these changes are made for my convenience. It's okay if the upstream doesn't need them.
总之还是感谢 PR