Skip to content

Commit

Permalink
chore: release v1.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
micooz committed Jan 30, 2022
1 parent fcaa067 commit d841e31
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy-manually.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:
required: true
version:
description: 'Asset version to deploy'
default: 'v1.1.1'
default: 'v1.1.2'
required: true
arch:
description: 'Asset binary architecture (Rust format)'
Expand Down
8 changes: 4 additions & 4 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bp"
version = "1.1.1"
version = "1.1.2"
authors = ["Micooz Lee <[email protected]>"]
description = "bp is a lightweight and efficient proxy written in pure Rust."
repository = "https://github.com/micooz/bp"
Expand Down
2 changes: 1 addition & 1 deletion USAGE.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
bp 1.1.1
bp 1.1.2
Lightweight and efficient proxy written in pure Rust

USAGE:
Expand Down
2 changes: 1 addition & 1 deletion bp-cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bp-cli"
version = "1.1.1"
version = "1.1.2"
edition = "2021"

[features]
Expand Down
25 changes: 19 additions & 6 deletions bp-cli/src/bootstrap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,18 @@ async fn start_main_service(opts: Options, sender_ready: Sender<StartupInfo>) ->
});

let handle = tokio::spawn(async move {
let cnt = Arc::new(Mutex::new(Counter::default()));
let mut total_cnt = 0usize;
let live_cnt = Arc::new(Mutex::new(Counter::default()));

while let Some(socket) = receiver.recv().await {
if socket.is_none() {
break;
}

let cnt = cnt.clone();
cnt.lock().inc();
total_cnt += 1;

let live_cnt = live_cnt.clone();
live_cnt.lock().inc();

let socket = socket.unwrap();
let opts = opts.clone();
Expand All @@ -116,7 +119,12 @@ async fn start_main_service(opts: Options, sender_ready: Sender<StartupInfo>) ->
tokio::spawn(async move {
let peer_addr = socket.peer_addr();

log::info!("[{}] connected, {} live connections", peer_addr, cnt.lock());
log::info!(
"[{}] connected, {} live connections, {} in total",
peer_addr,
live_cnt.lock(),
total_cnt
);

let mut conn = Connection::new(socket, opts);

Expand All @@ -125,9 +133,14 @@ async fn start_main_service(opts: Options, sender_ready: Sender<StartupInfo>) ->
let _ = conn.close().await;
}

cnt.lock().dec();
live_cnt.lock().dec();

log::info!("[{}] closed, {} live connections", peer_addr, cnt.lock());
log::info!(
"[{}] closed, {} live connections, {} in total",
peer_addr,
live_cnt.lock(),
total_cnt
);
});
}
});
Expand Down
2 changes: 1 addition & 1 deletion bp-core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bp-core"
version = "1.1.1"
version = "1.1.2"
edition = "2021"

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion bp-core/src/net/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ impl Connection {

if !acl.is_host_hit(&dest_addr_host) {
log::warn!(
"[{}] [{}] [{}] is not matched in white list",
"[{}] [{}] [{}] is NOT matched in white list",
self.peer_addr,
self.inbound.socket_type(),
dest_addr_host,
Expand Down
2 changes: 1 addition & 1 deletion e2e/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "e2e"
version = "1.1.1"
version = "1.1.2"
authors = ["Micooz Lee <[email protected]>"]
description = "bp is a lightweight and efficient proxy written in pure Rust."
repository = "https://github.com/micooz/bp"
Expand Down

0 comments on commit d841e31

Please sign in to comment.