Skip to content

Commit

Permalink
https & someting
Browse files Browse the repository at this point in the history
  • Loading branch information
Dev 1 committed Jul 30, 2023
1 parent d02ad1b commit 300714c
Show file tree
Hide file tree
Showing 24 changed files with 688 additions and 145 deletions.
208 changes: 207 additions & 1 deletion Cargo.Bazel.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"checksum": "e89acea9bd04dd56b7348acd3f61745f139fb8fa5ec97035a22ba430f0a0eefa",
"checksum": "ce7c31601716f140663a3d2a302a4fae2d302be9f11b2f84d42912131fdf5655",
"crates": {
"addr2line 0.20.0": {
"name": "addr2line",
Expand Down Expand Up @@ -532,6 +532,36 @@
},
"license": "BSD-3-Clause"
},
"antidote 1.0.0": {
"name": "antidote",
"version": "1.0.0",
"repository": {
"Http": {
"url": "https://crates.io/api/v1/crates/antidote/1.0.0/download",
"sha256": "34fde25430d87a9388dadbe6e34d7f72a462c8b43ac8d309b42b0a8505d7e2a5"
}
},
"targets": [
{
"Library": {
"crate_name": "antidote",
"crate_root": "src/lib.rs",
"srcs": [
"**/*.rs"
]
}
}
],
"library_target_name": "antidote",
"common_attrs": {
"compile_data_glob": [
"**"
],
"edition": "2015",
"version": "1.0.0"
},
"license": "MIT/Apache-2.0"
},
"anyhow 1.0.72": {
"name": "anyhow",
"version": "1.0.72",
Expand Down Expand Up @@ -682,6 +712,53 @@
},
"license": "MIT OR Apache-2.0"
},
"async-recursion 1.0.4": {
"name": "async-recursion",
"version": "1.0.4",
"repository": {
"Http": {
"url": "https://crates.io/api/v1/crates/async-recursion/1.0.4/download",
"sha256": "0e97ce7de6cf12de5d7226c73f5ba9811622f4db3a5b91b55c53e987e5f91cba"
}
},
"targets": [
{
"ProcMacro": {
"crate_name": "async_recursion",
"crate_root": "src/lib.rs",
"srcs": [
"**/*.rs"
]
}
}
],
"library_target_name": "async_recursion",
"common_attrs": {
"compile_data_glob": [
"**"
],
"deps": {
"common": [
{
"id": "proc-macro2 1.0.66",
"target": "proc_macro2"
},
{
"id": "quote 1.0.31",
"target": "quote"
},
{
"id": "syn 2.0.26",
"target": "syn"
}
],
"selects": {}
},
"edition": "2018",
"version": "1.0.4"
},
"license": "MIT OR Apache-2.0"
},
"async-trait 0.1.71": {
"name": "async-trait",
"version": "0.1.71",
Expand Down Expand Up @@ -2539,6 +2616,10 @@
"id": "hyper 0.14.27",
"target": "hyper"
},
{
"id": "hyper-boring 2.1.2",
"target": "hyper_boring"
},
{
"id": "ipnet 2.8.0",
"target": "ipnet"
Expand Down Expand Up @@ -2685,6 +2766,10 @@
"edition": "2021",
"proc_macro_deps": {
"common": [
{
"id": "async-recursion 1.0.4",
"target": "async_recursion"
},
{
"id": "async-trait 0.1.71",
"target": "async_trait"
Expand Down Expand Up @@ -6196,6 +6281,7 @@
"h2",
"http1",
"http2",
"runtime",
"server",
"socket2",
"tcp"
Expand Down Expand Up @@ -6276,6 +6362,87 @@
},
"license": "MIT"
},
"hyper-boring 2.1.2": {
"name": "hyper-boring",
"version": "2.1.2",
"repository": {
"Git": {
"remote": "https://github.com/Watfaq/boring.git",
"commitish": {
"Branch": "bazel"
},
"strip_prefix": "hyper-boring"
}
},
"targets": [
{
"Library": {
"crate_name": "hyper_boring",
"crate_root": "src/lib.rs",
"srcs": [
"**/*.rs"
]
}
}
],
"library_target_name": "hyper_boring",
"common_attrs": {
"compile_data_glob": [
"**"
],
"crate_features": {
"common": [
"default",
"runtime"
],
"selects": {}
},
"deps": {
"common": [
{
"id": "antidote 1.0.0",
"target": "antidote"
},
{
"id": "boring 2.1.0",
"target": "boring"
},
{
"id": "http 0.2.9",
"target": "http"
},
{
"id": "hyper 0.14.27",
"target": "hyper"
},
{
"id": "linked_hash_set 0.1.4",
"target": "linked_hash_set"
},
{
"id": "once_cell 1.18.0",
"target": "once_cell"
},
{
"id": "tokio 1.29.1",
"target": "tokio"
},
{
"id": "tokio-boring 2.1.5",
"target": "tokio_boring"
},
{
"id": "tower-layer 0.3.2",
"target": "tower_layer"
}
],
"selects": {}
},
"edition": "2018",
"version": "2.1.2"
},
"license": "MIT/Apache-2.0"
},
"idna 0.2.3": {
"name": "idna",
"version": "0.2.3",
Expand Down Expand Up @@ -7304,6 +7471,45 @@
},
"license": "MIT/Apache-2.0"
},
"linked_hash_set 0.1.4": {
"name": "linked_hash_set",
"version": "0.1.4",
"repository": {
"Http": {
"url": "https://crates.io/api/v1/crates/linked_hash_set/0.1.4/download",
"sha256": "47186c6da4d81ca383c7c47c1bfc80f4b95f4720514d860a5407aaf4233f9588"
}
},
"targets": [
{
"Library": {
"crate_name": "linked_hash_set",
"crate_root": "src/lib.rs",
"srcs": [
"**/*.rs"
]
}
}
],
"library_target_name": "linked_hash_set",
"common_attrs": {
"compile_data_glob": [
"**"
],
"deps": {
"common": [
{
"id": "linked-hash-map 0.5.6",
"target": "linked_hash_map"
}
],
"selects": {}
},
"edition": "2018",
"version": "0.1.4"
},
"license": "Apache-2.0"
},
"linux-raw-sys 0.3.8": {
"name": "linux-raw-sys",
"version": "0.3.8",
Expand Down
44 changes: 44 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions clash_lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ async-trait = "0.1"
anyhow = "1.0"
futures = "0.3"
bytes = "1.1"
async-recursion = "1"
ipnet = "2.5"
url = "2.2"
regex = "1"
Expand All @@ -34,6 +35,7 @@ base64 = "0.21"
uuid = { version = "1.2.1", features = ["v4", "fast-rng", "macro-diagnostics"] }
boring = { git = "https://github.com/Watfaq/boring.git", branch = "bazel" }
boring-sys = { git = "https://github.com/Watfaq/boring.git", branch = "bazel" }
hyper-boring = { git = "https://github.com/Watfaq/boring.git", branch = "bazel" }
tokio-boring = { git = "https://github.com/Watfaq/boring.git", branch = "bazel" }
crc32fast = "1.3.2"
brotli = "3.3.4"
Expand Down
2 changes: 1 addition & 1 deletion clash_lib/src/app/dispatcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ impl Dispatcher {
info!("remote connection established {}", sess);
match copy_bidirectional(&mut lhs, &mut rhs).await {
Ok((up, down)) => {
info!(
debug!(
"connection {} closed with {} bytes up, {} bytes down",
sess, up, down
);
Expand Down
4 changes: 3 additions & 1 deletion clash_lib/src/app/outbound/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ impl OutboundManager {

for outbound_group in outbound_groups.iter() {
match outbound_group {
OutboundGroupProtocol::Relay(_proto) => {}
OutboundGroupProtocol::Relay(proto) => {
handlers.insert(proto.name.clone(), proto.try_into()?);
}
OutboundGroupProtocol::UrlTest(_proto) => todo!(),
OutboundGroupProtocol::Fallback(_proto) => todo!(),
OutboundGroupProtocol::LoadBalance(_proto) => todo!(),
Expand Down
Loading

0 comments on commit 300714c

Please sign in to comment.