-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* upgrade to tokio v1.0 - removed tokio::prelude - upgrade hyper to v0.14, tokio-rustls to v0.22 still working on migrating trust-dns-* and tokio-native-tls ref #354 * tokio v1.0 removed with_poll fix #355, ref #354 * removed CTRL-BREAK signal handler ref #354 * fixes compliation error, add missing return fixes #355 * allow setting SO_SNDBUF and SO_RCVBUF for sockets ref #352 * completely removed unix socket based DNS resolving ref shadowsocks/shadowsocks-android#2622 * fix build issue on Windows * fixed uds poll_write loop, fixed udp outbound loopback check ref #355 * disable default trust-dns resolver for andorid, macos, ios This commit also: - Optimized resolve() logging with elapsed time - updated tokio-native-tls * local-dns removed from default features * fix rustc version with rust-toolchain * Bump bytes from 0.6.0 to 1.0.0 * add dependabot badge * indirectly depend on trust_dns_proto via trust_dns_resolver * auto reconnect if udp sendto failed * recreate proxied socket if recv() returns failure * increase score precision to 0.0001 * example of log4rs configuration * PingBalancer instance shouldn't kill probing task when dropping - Probing task should be controlled by the internal shared state * switch to trust-dns main for latest tokio 1.0 support
- Loading branch information
Showing
54 changed files
with
1,906 additions
and
1,180 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,10 @@ | ||
use futures::{ | ||
future::{self, Either, FutureExt}, | ||
StreamExt, | ||
}; | ||
use log::info; | ||
use std::io; | ||
use tokio::signal::{ctrl_c, windows::ctrl_break}; | ||
use tokio::signal::ctrl_c; | ||
|
||
pub async fn create_signal_monitor() -> io::Result<()> { | ||
let cc = ctrl_c(); | ||
let cb = ctrl_break()?; | ||
|
||
let signal_name = match future::select(cc.boxed(), cb.into_future().boxed()).await { | ||
Either::Left(..) => "CTRL-C", | ||
Either::Right(..) => "CTRL-BREAK", | ||
}; | ||
|
||
info!("received {}, exiting", signal_name); | ||
ctrl_c().await; | ||
info!("received CTRL-C, exiting"); | ||
|
||
Ok(()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
refresh_rate: 30 seconds | ||
appenders: | ||
stdout: | ||
kind: console | ||
encoder: | ||
pattern: "{d} {h({l}):<5} {m}{n}" | ||
file: | ||
kind: rolling_file | ||
path: shadowsocks.log | ||
encoder: | ||
kind: pattern | ||
pattern: "{d} {h({l}):<5} {m}{n}" | ||
policy: | ||
trigger: | ||
kind: size | ||
limit: 10 mb | ||
roller: | ||
kind: fixed_window | ||
pattern: shadowsocks.{}.log | ||
count: 5 | ||
root: | ||
level: debug | ||
appenders: | ||
- stdout | ||
- file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.