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

feat: add hysteria2 protocol dialer support #9

Merged
merged 13 commits into from
Jun 10, 2024
Merged

Conversation

mnixry
Copy link
Contributor

@mnixry mnixry commented Jun 1, 2024

This PR vendors the core components from the official Hysteria2 repository into project.

Rationale for Vendoring:

  • There are only three publicly available implementations of Hysteria2:
    • sing-box: This implementation is heavily coupled with its own utility functions, making it less modular.
    • mihomo: This codebase mixes implementations of both Hysteria1 and Hysteria2 protocols. Since Hysteria1 has become a legacy protocol, it will not be addressed in this PR.
    • Re-implementing the protocol details from scratch is challenging and prone to introducing errors.

Request for Reviews and Comments:

As I am very new to Golang, any reviews or comments are welcome.

TODO:

  • Add a license claim for the original repository.
  • Implement the ability to choose a congestion control protocol (e.g., BBR/brutal), though it's unclear how to pass the bandwidth parameter into dialer.
  • Reduce codebase size by reusing existing code (e.g., sharing congestion control algorithms code with TUIC). Alternatively, it might be better to leave the code as is to facilitate easier merging of upstream changes.

Related Issues:

@mnixry
Copy link
Contributor Author

mnixry commented Jun 2, 2024

I've manually tested this PR, and it appears to be functioning for dae. I believe it's now ready for review.

@xmapst
Copy link
Contributor

xmapst commented Jun 6, 2024

太棒了 终于有望不用再开一个hysteria进程了

@mzz2017

This comment has been minimized.

mzz2017 and others added 2 commits June 7, 2024 13:07
Signed-off-by: Mix <32300164+mnixry@users.noreply.github.com>
@mnixry
Copy link
Contributor Author

mnixry commented Jun 7, 2024

This is my patch to reuse tuic code, could you please apply it?

@mzz2017 Thank you. The patch you provided has been applied in commit 8f1cb0a.

@xmapst
Copy link
Contributor

xmapst commented Jun 10, 2024

还在进行中吗?

@mzz2017 mzz2017 merged commit ce576b5 into daeuniverse:main Jun 10, 2024
@mzz2017
Copy link
Contributor

mzz2017 commented Jun 10, 2024

LGTM! Thanks for your contribution!

@mzz2017
Copy link
Contributor

mzz2017 commented Jun 10, 2024

For better testing, I merged this PR first. Subsequent progress and updates can continue in the new PR.

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.

3 participants