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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support TUIC #332

Merged
merged 19 commits into from
Mar 25, 2024
Merged

Support TUIC #332

merged 19 commits into from
Mar 25, 2024

Conversation

Itsusinn
Copy link
Member

@Itsusinn Itsusinn commented Mar 20, 2024

馃 This is a ...

  • New feature

馃敆 Related issue link

Impl #190

Work in progress

Features

  • TCP Relay
  • UDP
    • UDP Relay
    • UDP Full-Cone
    • Timeout test
  • Port migrate(hotpoping)?
  • ZeroRTT
  • DisableSNI
  • CustomSNI
  • Custom certificates
  • All ClashMeta configurations
  • Documention
  • Unit tests
  • Benchmark?

PR

  • Ready for review
  • Ready for merge

@Itsusinn Itsusinn marked this pull request as ready for review March 22, 2024 14:46
clash_lib/Cargo.toml Outdated Show resolved Hide resolved
clash_lib/src/lib.rs Show resolved Hide resolved
Copy link
Member

@ibigbug ibigbug left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

lgtm and a few comments

clash_lib/src/proxy/tuic/handle_task.rs Show resolved Hide resolved
clash_lib/src/proxy/tuic/mod.rs Show resolved Hide resolved
.congestion_controller_factory(Arc::new(CubicConfig::default()));
quinn_config.transport_config(Arc::new(quinn_transport_config));
// Try to create an IPv4 socket as the placeholder first, if it fails, try IPv6.
let socket =
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would this work if server is v6 only and v4 is used locally?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I won't think it will work. Should we check server dns record is A or AAAA?
And if server is daul-stack, does clash-rs supply options prefer IPv4 or IPv6?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think we should check.

if you use clash resolver, it will try v6 first https://github.com/Watfaq/clash-rs/blob/master/clash_lib/src/app/dns/resolver.rs#L423

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm approving this for now. feel free to check in and make a separate PR for this as well as other features mentioned in the PR desc.

thanks!

clash_lib/src/proxy/tuic/mod.rs Outdated Show resolved Hide resolved
clash_lib/src/proxy/tuic/mod.rs Outdated Show resolved Hide resolved
clash_lib/src/proxy/tuic/mod.rs Show resolved Hide resolved
clash_lib/src/proxy/tuic/handle_task.rs Outdated Show resolved Hide resolved
clash_lib/src/proxy/tuic/types.rs Show resolved Hide resolved
@ibigbug
Copy link
Member

ibigbug commented Mar 24, 2024

plz do a cargo fmt too

@ibigbug ibigbug merged commit bfddc52 into Watfaq:master Mar 25, 2024
15 checks passed
This was referenced Mar 28, 2024
@Itsusinn Itsusinn deleted the feat-tuic branch April 10, 2024 15:57
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.

None yet

2 participants