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

Make udprelay/crypto_io public #1172

Merged
merged 1 commit into from
Apr 14, 2023

Conversation

XOR-op
Copy link
Contributor

@XOR-op XOR-op commented Apr 14, 2023

Since the ProxySocket interface is not versatlie enough (i.e. require a ShadowUdpSocket under it), developers may need write their own structs based on cryptography tools the crate offers. However, the corresponding module udprelay/crypto_io is private, making this difficult.

This pull request makes udprelay/crypto_io module public to solve this problem. It's also the counterpart of tcprelay/crypto_io, which has been public in the latest release.

@zonyitoo
Copy link
Collaborator

How developers use the functions in crypto_io?

@XOR-op
Copy link
Contributor Author

XOR-op commented Apr 14, 2023

For example, use encrypt_client_payload to encrypt udp packets.

@zonyitoo
Copy link
Collaborator

So the connection is not UDP?

@XOR-op
Copy link
Contributor Author

XOR-op commented Apr 14, 2023

I don't quite get your meaning. But developers may want other underlying "connections", such as TCP, another Shadowsocks UDP stream or some homebrew protocols. Since ProxySocket does not support this, the easiest way is to export the underlying cryptography methods.

@zonyitoo zonyitoo merged commit 8be8047 into shadowsocks:master Apr 14, 2023
6 checks passed
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