Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use re-exported crates #81

Merged
merged 1 commit into from
Feb 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ A HTTP proxy server library intended to be a backend of application like Burp pr
use std::path::PathBuf;

use clap::{Args, Parser};
use http_mitm_proxy::{DefaultClient, MitmProxy};
use hyper::service::service_fn;
use moka::sync::Cache;
use http_mitm_proxy::{hyper::service::service_fn, moka::sync::Cache, DefaultClient, MitmProxy};
use tracing_subscriber::EnvFilter;

#[derive(Parser)]
Expand Down
8 changes: 5 additions & 3 deletions examples/dev_proxy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ use axum::{routing::get, Router};
use bytes::Bytes;
use clap::{Args, Parser};
use http_body_util::{BodyExt, Full};
use http_mitm_proxy::{DefaultClient, MitmProxy};
use hyper::{service::service_fn, Response};
use moka::sync::Cache;
use http_mitm_proxy::{
hyper::{service::service_fn, Response},
moka::sync::Cache,
DefaultClient, MitmProxy,
};

#[derive(Parser)]
struct Opt {
Expand Down
4 changes: 1 addition & 3 deletions examples/https.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
use std::{path::PathBuf, sync::Arc};

use clap::{Args, Parser};
use http_mitm_proxy::{DefaultClient, MitmProxy};
use hyper::service::service_fn;
use http_mitm_proxy::{hyper::service::service_fn, moka::sync::Cache, DefaultClient, MitmProxy};
use hyper_util::rt::{TokioExecutor, TokioIo};
use moka::sync::Cache;
use tokio::net::TcpListener;
use tokio_rustls::{
rustls::{self, pki_types::PrivatePkcs8KeyDer, ServerConfig},
Expand Down
4 changes: 1 addition & 3 deletions examples/proxy.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
use std::path::PathBuf;

use clap::{Args, Parser};
use http_mitm_proxy::{DefaultClient, MitmProxy};
use hyper::service::service_fn;
use moka::sync::Cache;
use http_mitm_proxy::{hyper::service::service_fn, moka::sync::Cache, DefaultClient, MitmProxy};
use tracing_subscriber::EnvFilter;

#[derive(Parser)]
Expand Down
8 changes: 5 additions & 3 deletions examples/reqwest_proxy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ use std::path::PathBuf;

use bytes::Bytes;
use clap::{Args, Parser};
use http_mitm_proxy::MitmProxy;
use hyper::{body::Body, service::service_fn};
use moka::sync::Cache;
use http_mitm_proxy::{
hyper::{body::Body, service::service_fn},
moka::sync::Cache,
MitmProxy,
};
use tracing_subscriber::EnvFilter;

#[derive(Parser)]
Expand Down
7 changes: 4 additions & 3 deletions examples/websocket.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
use std::path::PathBuf;

use clap::{Args, Parser};
use http_mitm_proxy::{default_client::Upgraded, DefaultClient, MitmProxy};
use hyper::service::service_fn;
use moka::sync::Cache;
use http_mitm_proxy::{
default_client::Upgraded, hyper::service::service_fn, moka::sync::Cache, DefaultClient,
MitmProxy,
};
use tokio::io::{AsyncReadExt, AsyncWriteExt};
use tracing_subscriber::EnvFilter;
use winnow::Parser as _;
Expand Down