Skip to content
Draft
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
179 changes: 179 additions & 0 deletions Cargo.lock

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

5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,18 @@ edition = "2024"

[dependencies]
anyhow = "1.0.100"
asn1 = "0.23.1"
bytes = "1.11.0"
chrono = "0.4.43"
clap = { version = "4.5.57", features = ["derive", "string"] }
cryptoki = "0.12.0"
fast-socks5 = "1.0.0"
hyper = { version = "1.8.1", features = ["full"] }
nix = { version = "0.31.1", features = ["socket", "uio", "net"] }
peekable = { version = "0.4.1", features = ["tokio"] }
regex = "1.12.2"
rustls-pemfile = "2.2.0"
rustls-webpki = "0.103.9"
serde = { version = "1.0.228", features = ["derive"] }
serde_json = "1.0.149"
serde_with = { version = "3.16.1", features = ["chrono"] }
Expand All @@ -24,3 +28,4 @@ tracing = "0.1.44"
tracing-subscriber = { version = "0.3.22", features = ["env-filter"] }
varlink = { version = "13.0.0", features = ["tokio"] }
winnow = "0.7.14"
x509-certificate = "0.25.0"
7 changes: 6 additions & 1 deletion src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ pub struct EscapeSettings {
pub cacert_file: Option<PathBuf>,
pub tls_privkey: Option<PathBuf>,
pub tls_certificate: Option<PathBuf>,
pub pkcs11_uri: Option<String>,

/// If set, PKCS#11 is used to resolve client certificates automatically.
pub pkcs11_library: Option<PathBuf>,
}

#[serde_with::serde_as]
Expand Down Expand Up @@ -59,7 +61,10 @@ pub struct Settings {

/// Settings for the workload socket (e.g. this is where clients connect to, e.g. Firefox or
/// another instance of this proxy via routing)
/// If this is unset, there's no TLS on incoming connections.
/// Use this when you are binding a local daemon.
pub listener: Option<ListenSettings>,

/// Settings for connecting to other proxy instances or websites via client certificate
/// authentication.
pub escaper: Option<EscapeSettings>,
Expand Down
1 change: 1 addition & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ mod proxy;
mod rpc;
mod state;
mod systemd;
mod pkcs11;

#[derive(Parser)]
#[command(name = "Portail")]
Expand Down
Loading