aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.rs22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/main.rs b/src/main.rs
index ccfb81e..43de71b 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -85,10 +85,10 @@ async fn proxy(
let unauthorized_hosts = currently_unauthorized_hosts(config);
if block_uri(&unauthorized_hosts, uri) {
- info!("Blocked: {:?}", uri);
+ debug!("Blocked: {:?}", uri);
Ok(Response::new(Body::empty()))
} else {
- info!("Authorized: {:?}", uri);
+ debug!("Authorized: {:?}", uri);
if req.method() == Method::CONNECT {
if let Some(addr) = host_addr(uri) {
@@ -146,7 +146,7 @@ async fn tunnel(upgraded: Upgraded, addr: &str) -> std::io::Result<()> {
);
}
Err(e) => {
- warn!("tunnel error: {}", e);
+ debug!("tunnel error: {}", e);
}
};
Ok(())
@@ -211,13 +211,15 @@ fn parse_days(str: &str) -> Vec<i32> {
let xs = str.split("-").collect::<Vec<&str>>();
let from = parse_day(xs[0]);
let to = parse_day(xs[1]);
- (1..8).filter(|d| {
- if from < to {
- d >= &from && d <= &to
- } else {
- d >= &from || d <= &to
- }
- }).collect()
+ (1..8)
+ .filter(|d| {
+ if from < to {
+ d >= &from && d <= &to
+ } else {
+ d >= &from || d <= &to
+ }
+ })
+ .collect()
}
fn parse_day(str: &str) -> i32 {