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: Implementing the Copy trait for Extension #126

Merged
merged 1 commit into from
Jan 25, 2025
Merged

feat: Implementing the Copy trait for Extension #126

merged 1 commit into from
Jan 25, 2025

Conversation

0x676e67
Copy link
Owner

No description provided.

@0x676e67 0x676e67 merged commit e1d806b into main Jan 25, 2025
1 check passed
@0x676e67 0x676e67 deleted the feat branch January 25, 2025 15:12
@0x676e67
Copy link
Owner Author

This pull request involves several changes to the src/connect.rs and src/socks/server/mod.rs files, focusing on modifying the way Extension is passed to various functions. The changes primarily involve passing Extension by value instead of by reference.

Key changes include:

Changes in src/connect.rs:

  • Modified the assign_ipv4_from_extension and assign_ipv6_from_extension functions to take Extension by value instead of by reference. [1] [2]
  • Updated methods in TcpConnector and UdpConnector to pass Extension by value instead of by reference. This includes methods like connect, create_socket_with_cidr, and create_socket_with_cidr_and_fallback. [1] [2] [3] [4] [5] [6] [7] [8] [9]
  • Modified the combined function to take Extension by value instead of by reference.
  • Updated the test_assign_ipv4_from_extension test to pass Extension by value.

Changes in src/extension.rs:

  • Changed the Extension enum to derive the Copy trait, allowing it to be passed by value more easily.

Changes in src/socks/server/mod.rs:

  • Updated the hanlde_connect_proxy function to pass Extension by value instead of by reference.

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

1 participant