Skip to content

Commit af80824

Browse files
authored
Merge pull request #81 from hatoo/use-re-exports
Use re-exported crates
2 parents 596ae27 + 8fc281d commit af80824

File tree

6 files changed

+17
-18
lines changed

6 files changed

+17
-18
lines changed

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@ A HTTP proxy server library intended to be a backend of application like Burp pr
1414
use std::path::PathBuf;
1515
1616
use clap::{Args, Parser};
17-
use http_mitm_proxy::{DefaultClient, MitmProxy};
18-
use hyper::service::service_fn;
19-
use moka::sync::Cache;
17+
use http_mitm_proxy::{hyper::service::service_fn, moka::sync::Cache, DefaultClient, MitmProxy};
2018
use tracing_subscriber::EnvFilter;
2119
2220
#[derive(Parser)]

examples/dev_proxy.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ use axum::{routing::get, Router};
44
use bytes::Bytes;
55
use clap::{Args, Parser};
66
use http_body_util::{BodyExt, Full};
7-
use http_mitm_proxy::{DefaultClient, MitmProxy};
8-
use hyper::{service::service_fn, Response};
9-
use moka::sync::Cache;
7+
use http_mitm_proxy::{
8+
hyper::{service::service_fn, Response},
9+
moka::sync::Cache,
10+
DefaultClient, MitmProxy,
11+
};
1012

1113
#[derive(Parser)]
1214
struct Opt {

examples/https.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
use std::{path::PathBuf, sync::Arc};
22

33
use clap::{Args, Parser};
4-
use http_mitm_proxy::{DefaultClient, MitmProxy};
5-
use hyper::service::service_fn;
4+
use http_mitm_proxy::{hyper::service::service_fn, moka::sync::Cache, DefaultClient, MitmProxy};
65
use hyper_util::rt::{TokioExecutor, TokioIo};
7-
use moka::sync::Cache;
86
use tokio::net::TcpListener;
97
use tokio_rustls::{
108
rustls::{self, pki_types::PrivatePkcs8KeyDer, ServerConfig},

examples/proxy.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
use std::path::PathBuf;
22

33
use clap::{Args, Parser};
4-
use http_mitm_proxy::{DefaultClient, MitmProxy};
5-
use hyper::service::service_fn;
6-
use moka::sync::Cache;
4+
use http_mitm_proxy::{hyper::service::service_fn, moka::sync::Cache, DefaultClient, MitmProxy};
75
use tracing_subscriber::EnvFilter;
86

97
#[derive(Parser)]

examples/reqwest_proxy.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@ use std::path::PathBuf;
33

44
use bytes::Bytes;
55
use clap::{Args, Parser};
6-
use http_mitm_proxy::MitmProxy;
7-
use hyper::{body::Body, service::service_fn};
8-
use moka::sync::Cache;
6+
use http_mitm_proxy::{
7+
hyper::{body::Body, service::service_fn},
8+
moka::sync::Cache,
9+
MitmProxy,
10+
};
911
use tracing_subscriber::EnvFilter;
1012

1113
#[derive(Parser)]

examples/websocket.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
use std::path::PathBuf;
22

33
use clap::{Args, Parser};
4-
use http_mitm_proxy::{default_client::Upgraded, DefaultClient, MitmProxy};
5-
use hyper::service::service_fn;
6-
use moka::sync::Cache;
4+
use http_mitm_proxy::{
5+
default_client::Upgraded, hyper::service::service_fn, moka::sync::Cache, DefaultClient,
6+
MitmProxy,
7+
};
78
use tokio::io::{AsyncReadExt, AsyncWriteExt};
89
use tracing_subscriber::EnvFilter;
910
use winnow::Parser as _;

0 commit comments

Comments
 (0)