Skip to content

Commit

Permalink
chore: publish trust_cert\core\rule
Browse files Browse the repository at this point in the history
Signed-off-by: zu1k <i@zu1k.com>
  • Loading branch information
zu1k committed Sep 12, 2022
1 parent 6384cff commit 742427f
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 16 deletions.
5 changes: 2 additions & 3 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion crates/core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "good-mitm-core"
version = "0.1.2"
version = "0.1.3"
edition = "2021"
description = "Use MITM technology to provide features like rewrite, redirect."
homepage = "https://github.com/zu1k/good-mitm"
Expand Down
6 changes: 5 additions & 1 deletion crates/rule/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@
name = "good-mitm-rule"
version = "0.1.0"
edition = "2021"

description = "Use MITM technology to provide features like rewrite, redirect."
homepage = "https://github.com/zu1k/good-mitm"
repository = "https://github.com/zu1k/good-mitm"
license = "MIT"

[dependencies]
mitm-core = { path = "../core", package = "good-mitm-core" }
# mitm-core = { version = "0.1.3", package = "good-mitm-core" }

anyhow = "1.0"
async-trait = "0.1"
Expand Down
7 changes: 5 additions & 2 deletions crates/trust_cert/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
[package]
name = "trust_cert"
version = "0.0.2"
version = "0.0.3"
edition = "2021"
description = "Install certificate to your system trust zone."
homepage = "https://github.com/zu1k/good-mitm"
repository = "https://github.com/zu1k/good-mitm"
license = "MIT"

[dependencies]
cfg-if = "1"
rcgen = { version = "0.9", features = ["x509-parser"] }

[target.'cfg(unix)'.dependencies]
Expand Down
13 changes: 4 additions & 9 deletions crates/trust_cert/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,8 @@ mod linux;

#[allow(unused_variables)]
pub fn trust_cert(cert: Certificate) {
cfg_if::cfg_if! {
if #[cfg(windows)] {
windows::install_cert(cert);
} else if #[cfg(target_os = "linux")] {
linux::install_cert(cert);
} else {
panic!("not implemented on this target")
}
}
#[cfg(windows)]
return windows::install_cert(cert);
#[cfg(target_os = "linux")]
return linux::install_cert(cert);
}

1 comment on commit 742427f

@vercel
Copy link

@vercel vercel bot commented on 742427f Sep 12, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.