Skip to content

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
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.

2 participants