Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
25b2f4b
gateway: Add wavekv backend
kvinwang Nov 30, 2025
94cc986
gateway: Rename run_in_dstack to danger_disable_attestation
kvinwang Nov 30, 2025
8d9de10
gw: Add peer urls config
kvinwang Nov 30, 2025
f4b1b4e
gw: Sync data from wavekv to state
kvinwang Dec 1, 2025
2ffc448
gw: Sync certificates
kvinwang Dec 1, 2025
34d678a
gw: Recycle instances according to kvdb last seem
kvinwang Dec 1, 2025
f9c3236
gw: Fix admin rpc error in non dstack agent env
kvinwang Dec 1, 2025
1bdc5a1
gw: Add cluster.sh
kvinwang Dec 1, 2025
0c40446
gw: Use standalone uuid instead of wg pubkey
kvinwang Dec 1, 2025
b397d1f
gw: Add uuid on par of id
kvinwang Dec 1, 2025
6e8d118
gw: Add all nodes info in RegisterCvmResponse
kvinwang Dec 1, 2025
26a97ce
gw: Multiple line last seem
kvinwang Dec 1, 2025
7039823
gw: Rename to insecure config fields
kvinwang Dec 1, 2025
d1c5736
gw: Refactor timeout in config
kvinwang Dec 1, 2025
90674aa
gateway: Fix panic when dropping workers_rt
kvinwang Dec 1, 2025
7ffcfed
gw: gz compress sync message
kvinwang Dec 2, 2025
6c25ea9
gw: Use new rocket addrees syntax
kvinwang Dec 2, 2025
00def34
gw: Refactor RPC and add bootnode support
kvinwang Dec 2, 2025
1369757
gw: Rename test script
kvinwang Dec 2, 2025
f81f11f
gw: Rename wavekv_data_dir to data_dir
kvinwang Dec 2, 2025
f99b5d4
gw: Drop legacy state support
kvinwang Dec 2, 2025
65624a1
gw: Fix config files
kvinwang Dec 2, 2025
d9f5d20
gw: Add periodic persistence
kvinwang Dec 2, 2025
bcc8ee5
gw: Use msgpack instead of bincode
kvinwang Dec 4, 2025
12b0ce9
gw: Refactor HttpSyncNetwork structure
kvinwang Dec 4, 2025
197d4d4
gw: Use wavekv from crates.io
kvinwang Dec 5, 2025
6c48d12
gw: Sync handshakes to kv
kvinwang Dec 8, 2025
4654b0a
gw: Show more info on the page
kvinwang Dec 8, 2025
72eef9a
gw: Remove last_seen of instance
kvinwang Dec 8, 2025
0797969
gw: Only returns active gw nodes from register cvm
kvinwang Dec 8, 2025
29eefec
gw: Add two more test cases
kvinwang Dec 8, 2025
886b238
cargo fmt
kvinwang Dec 8, 2025
d50bc91
gw: Add SPDX header in scripts
kvinwang Dec 8, 2025
24fb553
Merge remote-tracking branch 'ds/master' into gateway-wavekv-recover
kvinwang Jan 19, 2026
48dea7f
gw: Add multi-domain certificate support with SNI-based resolution
kvinwang Jan 16, 2026
55a4d94
gw: Complete multi-domain certificate management with RPC API
kvinwang Jan 16, 2026
56ce5d1
certbot: Config for cf_api_url
kvinwang Jan 17, 2026
120bd8e
Add mock-cf-dns-api
kvinwang Jan 17, 2026
d90e928
Multiple certs works
kvinwang Jan 18, 2026
fec8833
Add config web ui for certs
kvinwang Jan 18, 2026
963c2a5
Remove acme_url and enabled from Domain config
kvinwang Jan 18, 2026
d4ef30e
Rename DomainCert to ZtDomain
kvinwang Jan 18, 2026
2f82b3b
cargo fmt
kvinwang Jan 18, 2026
cc79b22
Improve cert resolver performance
kvinwang Jan 18, 2026
0423b8b
WIP: Remove base_domain from config
kvinwang Jan 18, 2026
62a308e
Refine gateway e2e/test.sh
kvinwang Jan 18, 2026
91bf739
Add port/node/priority to ZtDomainConfig
kvinwang Jan 19, 2026
0272e51
refactor ZtDomainInfo in proto
kvinwang Jan 19, 2026
cb4e511
Fill base_domain in RPC response
kvinwang Jan 19, 2026
a789182
Add ACME account attestation
kvinwang Jan 19, 2026
49058a5
gw: Attestation using agent api
kvinwang Jan 19, 2026
a479d65
gw: Fix e2e
kvinwang Jan 19, 2026
18f6597
Fix SPDX error
kvinwang Jan 19, 2026
bc1a13a
Auto renew cert when ZtDomainConfig changed
kvinwang Jan 19, 2026
fea17be
Remove unused functions
kvinwang Jan 19, 2026
73b3cec
Fix unit tests
kvinwang Jan 19, 2026
0f638ea
Merge branch 'master' into gateway-wavekv
kvinwang Jan 21, 2026
0e153cd
Enable client auth on gateway TLS cert
kvinwang Jan 21, 2026
53bc3c3
Fix gateway e2e
kvinwang Jan 21, 2026
dc8bce3
gw: Discover peers in background
kvinwang Jan 21, 2026
7190b24
gw: Remove unused e2e files
kvinwang Jan 21, 2026
3e44d36
Merge remote-tracking branch 'ds/master' into gateway-wavekv
kvinwang Jan 22, 2026
03d87b4
Merge remote-tracking branch 'ds/gateway-wavekv' into gateway-wavekv
kvinwang Jan 22, 2026
4f673ba
gw: Support for editing zt-domain on UI
kvinwang Jan 22, 2026
fd55568
gw: Better error logging
kvinwang Jan 22, 2026
c0fbbbe
gw: More clear cert gen logic
kvinwang Jan 22, 2026
e8fc392
gw: Better debug keys setting
kvinwang Jan 22, 2026
890f9e8
gw: Update reg_time when wg pubkey changed
kvinwang Jan 22, 2026
0360b85
gw: Tune web ui layout
kvinwang Jan 22, 2026
91b148a
gw: Fix WaveKV status dashboard to use pRPC
kvinwang Jan 22, 2026
6e5b7ba
gw: Sync peers from persistent to ephemeral store on startup
kvinwang Jan 22, 2026
51152d5
gw: Fix IP leak when instance IP changes via KvStore sync
kvinwang Jan 22, 2026
ac34fbf
gw: Validate IP is within client_ip_range in valid_ip()
kvinwang Jan 22, 2026
da3db7a
Fix CI error
kvinwang Jan 22, 2026
099bab8
gw: Treat empty dns_cred_id as None (use default) in ZT domain
kvinwang Jan 22, 2026
dc394c9
gw: Set default port to 443 for ZT domain
kvinwang Jan 22, 2026
0c6b262
gw: Add cluster-deployment.md
kvinwang Jan 22, 2026
4455f4c
gw: Auto strip wildcard prefix from UI
kvinwang Jan 23, 2026
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
102 changes: 101 additions & 1 deletion Cargo.lock

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

10 changes: 9 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,11 @@ serde-duration = { path = "serde-duration" }
dstack-mr = { path = "dstack-mr" }
dstack-verifier = { path = "verifier", default-features = false }
size-parser = { path = "size-parser" }
wavekv = "1.0.0"

# Core dependencies
anyhow = { version = "1.0.97", default-features = false }
arc-swap = "1"
or-panic = { version = "1.0", default-features = false }
chrono = "0.4.40"
clap = { version = "4.5.32", features = ["derive", "string"] }
Expand All @@ -109,6 +111,7 @@ sd-notify = "0.4.5"
jemallocator = "0.5.4"

# Serialization/Parsing
flate2 = "1.1"
borsh = { version = "1.5.7", default-features = false, features = ["derive"] }
bon = { version = "3.4.0", default-features = false }
base64 = "0.22.1"
Expand All @@ -122,6 +125,7 @@ scale = { version = "3.7.4", package = "parity-scale-codec", features = [
] }
serde = { version = "1.0.228", features = ["derive"], default-features = false }
serde-human-bytes = "0.1.2"
rmp-serde = "1.3.0"
serde_json = { version = "1.0.140", default-features = false }
serde_ini = "0.2.0"
toml = "0.8.20"
Expand All @@ -145,6 +149,11 @@ hyper-util = { version = "0.1.10", features = [
"client-legacy",
"http1",
] }
hyper-rustls = { version = "0.27", default-features = false, features = [
"ring",
"http1",
"tls12",
] }
hyperlocal = "0.9.1"
ipnet = { version = "2.11.0", features = ["serde"] }
reqwest = { version = "0.12.14", default-features = false, features = [
Expand Down Expand Up @@ -233,7 +242,6 @@ yaml-rust2 = "0.10.4"

luks2 = "0.5.0"
scopeguard = "1.2.0"
flate2 = "1.1"
tar = "0.4"

[profile.release]
Expand Down
9 changes: 9 additions & 0 deletions REUSE.toml
Original file line number Diff line number Diff line change
Expand Up @@ -191,3 +191,12 @@ SPDX-License-Identifier = "CC0-1.0"
path = "guest-agent/fixtures/*"
SPDX-FileCopyrightText = "NONE"
SPDX-License-Identifier = "CC0-1.0"

[[annotations]]
path = [
"gateway/test-run/e2e/certs/*",
"gateway/test-run/e2e/configs/*",
"gateway/test-run/e2e/pebble-config.json",
]
SPDX-FileCopyrightText = "NONE"
SPDX-License-Identifier = "CC0-1.0"
3 changes: 3 additions & 0 deletions certbot/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@ license.workspace = true
[dependencies]
anyhow.workspace = true
bon.workspace = true
bytes.workspace = true
enum_dispatch.workspace = true
fs-err.workspace = true
hickory-resolver.workspace = true
http.workspace = true
http-body-util.workspace = true
instant-acme.workspace = true
path-absolutize.workspace = true
rcgen.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion certbot/cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ async fn main() -> Result<()> {
{
use tracing_subscriber::{fmt, EnvFilter};
let filter = EnvFilter::try_from_default_env().unwrap_or_else(|_| EnvFilter::new("info"));
fmt().with_env_filter(filter).init();
fmt().with_env_filter(filter).with_ansi(false).init();
}
rustls::crypto::ring::default_provider()
.install_default()
Expand Down
9 changes: 7 additions & 2 deletions certbot/src/acme_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ use tracing::{debug, error, info};
use x509_parser::prelude::{GeneralName, Pem};

use super::dns01_client::{Dns01Api, Dns01Client};
use super::http_client::ReqwestHttpClient;

/// A AcmeClient instance.
pub struct AcmeClient {
Expand Down Expand Up @@ -63,7 +64,9 @@ impl AcmeClient {
dns_txt_ttl: u32,
) -> Result<Self> {
let credentials: Credentials = serde_json::from_str(encoded_credentials)?;
let account = Account::from_credentials(credentials.credentials).await?;
let http_client = Box::new(ReqwestHttpClient::new()?);
let account =
Account::from_credentials_and_http(credentials.credentials, http_client).await?;
let credentials: Credentials = serde_json::from_str(encoded_credentials)?;
Ok(Self {
account,
Expand All @@ -81,14 +84,16 @@ impl AcmeClient {
max_dns_wait: Duration,
dns_txt_ttl: u32,
) -> Result<Self> {
let (account, credentials) = Account::create(
let http_client = Box::new(ReqwestHttpClient::new()?);
let (account, credentials) = Account::create_with_http(
&NewAccount {
contact: &[],
terms_of_service_agreed: true,
only_return_existing: false,
},
acme_url,
None,
http_client,
)
.await
.with_context(|| format!("failed to create ACME account for {acme_url}"))?;
Expand Down
1 change: 1 addition & 0 deletions certbot/src/acme_client/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ async fn new_acme_client() -> Result<AcmeClient> {
let dns01_client = Dns01Client::new_cloudflare(
std::env::var("CLOUDFLARE_ZONE_ID").expect("CLOUDFLARE_ZONE_ID not set"),
std::env::var("CLOUDFLARE_API_TOKEN").expect("CLOUDFLARE_API_TOKEN not set"),
std::env::var("CLOUDFLARE_API_URL").ok(),
);
let credentials =
std::env::var("LETSENCRYPT_CREDENTIAL").expect("LETSENCRYPT_CREDENTIAL not set");
Expand Down
9 changes: 7 additions & 2 deletions certbot/src/bot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ pub struct CertBotConfig {
credentials_file: PathBuf,
auto_create_account: bool,
cf_api_token: String,
cf_api_url: Option<String>,
cert_file: PathBuf,
key_file: PathBuf,
cert_dir: PathBuf,
Expand Down Expand Up @@ -94,8 +95,12 @@ impl CertBot {
.trim_start_matches("*.")
.trim_end_matches('.')
.to_string();
let dns01_client =
Dns01Client::new_cloudflare(config.cf_api_token.clone(), base_domain).await?;
let dns01_client = Dns01Client::new_cloudflare(
base_domain,
config.cf_api_token.clone(),
config.cf_api_url.clone(),
)
.await?;
let acme_client = match fs::read_to_string(&config.credentials_file) {
Ok(credentials) => {
if acme_matches(&credentials, &config.acme_url) {
Expand Down
11 changes: 7 additions & 4 deletions certbot/src/dns01_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,12 @@ pub enum Dns01Client {
}

impl Dns01Client {
pub async fn new_cloudflare(api_token: String, base_domain: String) -> Result<Self> {
Ok(Self::Cloudflare(
CloudflareClient::new(api_token, base_domain).await?,
))
pub async fn new_cloudflare(
base_domain: String,
api_token: String,
api_url: Option<String>,
) -> Result<Self> {
let client = CloudflareClient::new(base_domain, api_token, api_url).await?;
Ok(Self::Cloudflare(client))
}
}
Loading