Skip to content

Commit

Permalink
Bump version 0.1.11
Browse files Browse the repository at this point in the history
  • Loading branch information
ssrlive committed Mar 9, 2024
1 parent 2f99f55 commit a778e78
Show file tree
Hide file tree
Showing 2 changed files with 78 additions and 26 deletions.
77 changes: 57 additions & 20 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "socks-hub"
version = "0.1.10"
version = "0.1.11"
license = "MIT"
repository = "https://github.com/ssrlive/socks-hub"
homepage = "https://github.com/ssrlive/socks-hub"
Expand All @@ -13,29 +13,66 @@ edition = "2021"
crate-type = ["staticlib", "cdylib", "lib"]

[features]
default = ["acl"]
acl = ["idna", "ipnet", "iprange", "once_cell", "regex"]
default = ["sockshub", "acl"]
acl = [
"idna",
"ipnet",
"iprange",
"once_cell",
"regex",
"socks5-impl",
"tokio",
"log",
]
base64 = ["dep:base64"]
sockshub = [
"base64",
"socks5-impl",
"tokio",
"ctrlc2",
"env_logger",
"serde",
"serde_derive",
"serde_json",
"clap",
"chrono",
"http-body-util",
"hyper",
"dotenvy",
"as-any",
"bytes",
"pin-project-lite",
"log",
]

[dependencies]
as-any = "0.3"
base64 = "0.22"
bytes = "1.5"
chrono = "0.4"
clap = { version = "4.5", features = ["derive"] }
ctrlc2 = { version = "3.5", features = ["termination", "tokio"] }
dotenvy = "0.15"
env_logger = "0.11"
http-body-util = "0.1"
hyper = { version = "1.1", features = ["full"] }
as-any = { version = "0.3", optional = true }
base64 = { version = "0.22", optional = true }
bytes = { version = "1.5", optional = true }
cfg-if = "1.0"
chrono = { version = "0.4", optional = true }
clap = { version = "4.5", features = ["derive"], optional = true }
ctrlc2 = { version = "3.5", features = [
"termination",
"tokio",
], optional = true }
dotenvy = { version = "0.15", optional = true }
env_logger = { version = "0.11", optional = true }
http-body-util = { version = "0.1", optional = true }
hyper = { version = "1.1", features = ["full"], optional = true }
idna = { version = "0.5", optional = true }
ipnet = { version = "2.9", optional = true }
iprange = { version = "0.6", optional = true }
log = "0.4"
log = { version = "0.4", optional = true }
once_cell = { version = "1.19", optional = true }
pin-project-lite = { version = "0.2" }
pin-project-lite = { version = "0.2", optional = true }
regex = { version = "1.10", optional = true }
serde = "1.0"
serde_derive = "1.0"
serde_json = "1.0"
socks5-impl = "0.5"
tokio = { version = "1", features = ["full"] }
serde = { version = "1.0", optional = true }
serde_derive = { version = "1.0", optional = true }
serde_json = { version = "1.0", optional = true }
socks5-impl = { version = "0.5", optional = true }
tokio = { version = "1", features = ["full"], optional = true }

[[bin]]
name = "socks-hub"
required-features = ["sockshub", "acl"]
27 changes: 21 additions & 6 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,17 +1,29 @@
pub mod config;
pub use config::{ArgVerbosity, Config, Credentials, ProxyType};
cfg_if::cfg_if! {
if #[cfg(feature = "base64")] {
mod base64_wrapper;
pub use base64_wrapper::{base64_decode, base64_encode, Base64Engine};
}
}

cfg_if::cfg_if! {
if #[cfg(feature = "acl")] {
mod acl;
pub use acl::AccessControl;
}
}

pub mod base64_wrapper;
pub use base64_wrapper::{base64_decode, base64_encode, Base64Engine};
cfg_if::cfg_if! {
if #[cfg(feature = "sockshub")] {

mod config;
pub use config::{ArgVerbosity, Config, Credentials, ProxyType};

mod tokiort;
use tokiort::TokioIo;

mod http2socks;
mod socks2socks;

#[cfg(feature = "acl")]
pub mod acl;
mod api;
mod dump_logger;
mod ffi;
Expand Down Expand Up @@ -54,3 +66,6 @@ pub(crate) async fn create_s5_connect<A: ToSocketAddrs>(
pub(crate) fn std_io_error_other<E: Into<BoxError>>(err: E) -> std::io::Error {
std::io::Error::new(std::io::ErrorKind::Other, err)
}

}
}

0 comments on commit a778e78

Please sign in to comment.