Skip to content
This repository has been archived by the owner on Jan 25, 2025. It is now read-only.

Commit

Permalink
dependency cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcelCoding committed Nov 26, 2023
1 parent d356076 commit 991fedb
Show file tree
Hide file tree
Showing 6 changed files with 67 additions and 91 deletions.
58 changes: 7 additions & 51 deletions Cargo.lock

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

24 changes: 11 additions & 13 deletions zia-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,20 @@ license = "AGPL-3.0"
description = "Proxy udp over websocket, useful to use Wireguard in restricted networks."

[dependencies]
tokio = { version = "1.34", default-features = false, features = ["rt-multi-thread", "macros", "net", "sync", "time", "signal"] }
clap = { version = "4.4", default-features = false, features = ["std", "color", "help", "usage", "error-context", "suggestions", "derive", "env"] }
tokio = { version = "1.34", default-features = false, features = ["macros","rt-multi-thread", "net", "time", "signal"] }
async-http-proxy = { version = "1.2", default-features = false, features = ["runtime-tokio", "basic-auth"] }
tracing-subscriber = { version = "0.3", default-features = false, features = ["fmt", "ansi"] }
tracing = { version = "0.1", default-features = false, features = ["release_max_level_info"] }
wsocket = { version = "0.2", default-features = false,features = ["client", "handshake"] }
tokio-rustls = { version = "0.24", default-features = false }
webpki-roots = { version = "0.25", default-features = false }
url = { version = "2.4", default-features = false,features = ["serde"] }
hyper = { version = "1.0", default-features = false, features = [] }
tracing-subscriber = { version = "0.3", features = ["tracing-log"] }
clap = { version = "4.4", features = ["derive", "env"] }
wsocket = { git = "https://github.com/MarcelCoding/wsocket", features = ["client", "handshake"] }
url = { version = "2.4", features = ["serde"] }
zia-common = { path = '../zia-common', default-features = false }
once_cell = { version = "1.18" , default-features = false}
anyhow = { version = "1.0", default-features = false }
hyper-util = { version = "0.1", features = ["tokio"] }
http-body-util = "0.1"
webpki-roots = "0.25"
tokio-rustls = "0.24"
once_cell = "1.18"
anyhow = "1.0"
tracing = "0.1"

zia-common = { path = '../zia-common' }

[package.metadata.generate-rpm]
assets = [
Expand Down
18 changes: 16 additions & 2 deletions zia-client/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ use tokio::select;
use tokio::signal::ctrl_c;
use tokio::sync::RwLock;
use tokio::task::JoinSet;
use tracing::info;
use tracing::{info, Level};
use tracing_subscriber::FmtSubscriber;
use url::Url;

use zia_common::{ReadPool, WritePool};
Expand All @@ -22,7 +23,20 @@ mod cfg;
async fn main() -> anyhow::Result<()> {
let config = ClientCfg::parse();

tracing_subscriber::fmt::init();
let subscriber = FmtSubscriber::builder()
.with_max_level(Level::INFO)
.compact()
.finish();

tracing::subscriber::set_global_default(subscriber)?;

info!(concat!(
"Booting ",
env!("CARGO_PKG_NAME"),
"/",
env!("CARGO_PKG_VERSION"),
"..."
));

select! {
result = tokio::spawn(listen(config.listen_addr, config.upstream, config.proxy, config.count, config.websocket_masking)) => {
Expand Down
9 changes: 4 additions & 5 deletions zia-common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ license = "AGPL-3.0"
description = "Proxy udp over websocket, useful to use Wireguard in restricted networks."

[dependencies]
tokio = { version = "1.34", default-features = false, features = ["net", "sync"] }
hyper = { version = "1.0", default-features = false, features = [] }
wsocket = { git = "https://github.com/MarcelCoding/wsocket" }
tracing = "0.1"
anyhow = "1.0"
tokio = { version = "1.34", default-features = false, features = ["sync"] }
anyhow = { version = "1.0", default-features = false, features = ["std"] }
wsocket = { version = "0.2", default-features = false }
tracing = { version = "0.1", default-features = false }
31 changes: 13 additions & 18 deletions zia-server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,27 @@ license = "AGPL-3.0"
description = "Proxy udp over websocket, useful to use Wireguard in restricted networks."

[dependencies]
tokio = { version = "1.34", default-features = false, features = ["rt-multi-thread", "macros", "net","sync", "time", "signal"] }
clap = { version = "4.4", default-features = false, features = ["std", "color", "help", "usage", "error-context", "suggestions", "derive", "env"] }
tokio = { version = "1.34", default-features = false, features = ["macros", "rt-multi-thread", "signal", "io-util"] }
tracing-subscriber = { version = "0.3", default-features = false, features = ["fmt", "ansi"] }
tracing = { version = "0.1", default-features = false, features = ["release_max_level_info"] }
wsocket = { version = "0.2", default-features = false, features = ["upgrade"] }
hyper = { version = "1.0", default-features = false, features = ["server", "http1"] }
tracing-subscriber = { version = "0.3", features = ["tracing-log"] }
clap = { version = "4.4", features = ["derive", "env"] }
wsocket = { git = "https://github.com/MarcelCoding/wsocket" , features = ["upgrade"]}
hyper-util = { version ="0.1" , features = ["tokio"]}
pin-project-lite = "0.2"
http-body-util = "0.1"
webpki-roots = "0.25"
pin-project = "1.1"
once_cell = "1.18"
tracing = "0.1"
anyhow = "1.0"

zia-common = { path = '../zia-common' }
bytes = "1.5.0"
hyper-util = { version = "0.1", default-features = false, features = ["tokio"] }
pin-project-lite = { version = "0.2", default-features = false }
http-body-util = { version = "0.1", default-features = false }
zia-common = { path = '../zia-common', default-features = false }
anyhow = { version = "1.0", default-features = false }

[package.metadata.deb]
maintainer-scripts = "debian/"
systemd-units = { enable = false }
assets = [
["target/release/zia-server", "/usr/bin/zia-server", "755"],
["debian/default", "/etc/default/zia-server", "644"]
["target/release/zia-server", "/usr/bin/zia-server", "755"],
["debian/default", "/etc/default/zia-server", "644"]
]

[package.metadata.generate-rpm]
assets = [
{ source = "../LICENSE", dest = "/usr/share/doc/zia-server/LICENSE", doc = true, mode = "0644" },
{ source = "../LICENSE", dest = "/usr/share/doc/zia-server/LICENSE", doc = true, mode = "0644" },
]
18 changes: 16 additions & 2 deletions zia-server/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ use tokio::select;
use tokio::signal::ctrl_c;
use tokio::sync::RwLock;
use tokio::task::JoinHandle;
use tracing::{error, info};
use tracing::{error, info, Level};
use tracing_subscriber::FmtSubscriber;
use wsocket::{is_upgrade_request, upgrade};

use zia_common::{ReadConnection, ReadPool, WriteConnection, WritePool, MAX_DATAGRAM_SIZE};
Expand Down Expand Up @@ -107,7 +108,20 @@ impl Service<Request<Incoming>> for ConnectionHandler {
async fn main() -> anyhow::Result<()> {
let config = ServerCfg::parse();

tracing_subscriber::fmt::init();
let subscriber = FmtSubscriber::builder()
.with_max_level(Level::INFO)
.compact()
.finish();

tracing::subscriber::set_global_default(subscriber)?;

info!(concat!(
"Booting ",
env!("CARGO_PKG_NAME"),
"/",
env!("CARGO_PKG_VERSION"),
"..."
));

let socket = Arc::new(UdpSocket::bind(Into::<SocketAddr>::into(([0, 0, 0, 0], 0))).await?);
socket.connect(&config.upstream).await?;
Expand Down

0 comments on commit 991fedb

Please sign in to comment.