-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Split library in separated crates #326
Comments
这个是在哪个分支上? shadowsocks-crypto 是已经拆出来了吗? |
Yes. shadowsocks-crypto. |
感觉下面每个独立成一个 crate,方便复用 协议相关:
接入方式:
|
So if I want to make a release, I will have to release at least 7 crates. http/https are implemented with hyper, anyone who wants to write a HTTP proxy could use hyper from scratch.
|
I think it is not recommended to try to be compatible with all available async runtime, because tokio's |
These protocol related crates should be very stable. We don't release them often. Most of time, we just need to release |
So, each protocol crate only need to implement its own |
Protocol don't need to implement the |
If |
The impl Socks5TcpStream {
pub async fn new(socks_server_addr: SocketAddr, remote_addr: &str, user_name: Option<String>, password: Option<String>)
} |
Your So it there must be a let mut server = Socks5Server::builder()
.authenticate_handler(...)
.connect_handler(...)
.udp_associate_handler(...)
.bind_handler(...);
server.run().await?; which will envolve too many things that won't be used in this project. I suggest it should have lower priority. For the
|
Step 1: Splits binaries and the library into 2 crates, |
- shadowsocks-core is a library contains all necessary functions for running shadowsocks - shadowsocks is a binary crate that ships end-user products ref #326
这样拆分你们看如何:
至于终端 App,如果他只需要一个 socks2socks 的话,那么只依赖一个就行了。 至于我,可以帮忙做 tun2socks 和 ACL 这两部分。 |
个人建议这部分的动作先放到 PR 里,实现完了再合并。 |
That is a compiler bug, which will be fixed in the next nightly build. |
We should keep 2 crates:
|
- ref #326 - Binary crate will keep shadowsocks-rust's name
- ref #326 - Binary crate will keep shadowsocks-rust's name
Already finished library refactor in branch |
merged to master. |
Moved from #199 . Work to do:
shadowsocks-core (will be released as
shadowsocks
crate), which contains:Context
:shadowsocks binaries (will be released as
shadowsocks-rust
crate), which contains:log4rs
, could be customizedCrypto Library, shadowsocks-crypto
The text was updated successfully, but these errors were encountered: