Xray-core icon indicating copy to clipboard operation
Xray-core copied to clipboard

refactor: separate the logic of `inbound fallback` so that it can be reused

Open Grvzard opened this issue 1 year ago • 1 comments

works fine in deployment

Grvzard avatar May 29 '24 17:05 Grvzard

~~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?~~)

Fangliding avatar May 29 '24 17:05 Fangliding

Couple of thought:

  1. Write Everything Twice, then de-duplicate if more than three times
  2. Trojan is sunsetting, not worth much refactor So I think current code is ok, thanks for your effort though

yuhan6665 avatar May 30 '24 19:05 yuhan6665

如 @yuhan6665 所言,这部分代码其实没必要动,如果觉得代码重复我们可以删掉 Trojan 的 fallbacks 支持,但目前来说没必要动

RPRX avatar May 31 '24 01:05 RPRX

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.

Grvzard avatar May 31 '24 03:05 Grvzard

总之还是感谢 PR

RPRX avatar May 31 '24 05:05 RPRX