Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
65412e0
feat: add private network validator for known relay auth
suisun2022 Oct 17, 2025
ab20004
fix: resolve type check error
suisun2022 Oct 19, 2025
0e37412
fix: resolve type check error
suisun2022 Oct 19, 2025
0317d2e
fix: resolve test code errors
suisun2022 Oct 20, 2025
b0f296a
chore: update private network validator loaders
suisun2022 Oct 20, 2025
b202c8f
chore: make web-ui as default ui
suisun2022 Oct 21, 2025
96f9b0d
chore: update cli default config for private releays
suisun2022 Oct 21, 2025
681c21e
chore: update emissary-cli config can use private network configuration
suisun2022 Oct 21, 2025
023ca7d
feat: implement backend reseed api integration module
suisun2022 Oct 31, 2025
3fb5b83
feat: implement upload netdb module
suisun2022 Oct 31, 2025
547de22
chore: implement backend-api integration for store netdb
suisun2022 Oct 31, 2025
5831888
chore: modify reseeder can works with our backend
suisun2022 Oct 31, 2025
99e72ba
feat: implement update relay list module
suisun2022 Nov 3, 2025
70441b5
fix: resolve get static key function can use base url config param
suisun2022 Nov 3, 2025
f85f903
chore: add log for updated knwon relay list
suisun2022 Nov 3, 2025
0c3b0b2
fix: resolve nat, upnp issue
suisun2022 Nov 3, 2025
049dcbb
chore: make ui host to public for test purpose
suisun2022 Nov 3, 2025
a41ac0f
chore: disable fetch relay router module for test
suisun2022 Nov 4, 2025
8ee7713
chore: disable fetch relay router module for test
suisun2022 Nov 4, 2025
7a36ca7
chore: update private_network log type
suisun2022 Nov 4, 2025
5ffeac6
chore: set inbound/outbound hops count for http proxy
suisun2022 Nov 5, 2025
7e7f08a
chore: restore reseed module
suisun2022 Nov 11, 2025
63dc4bd
fix: add decryption module for facke local record
suisun2022 Nov 12, 2025
d86f572
fix: add decryption module for facke local record
suisun2022 Nov 12, 2025
f441e1b
fix: add decryption module for facke local record
suisun2022 Nov 12, 2025
274379a
fix: add decryption module for facke local record
suisun2022 Nov 12, 2025
943e7f5
Merge remote-tracking branch 'origin/master' into feat/allow-known-re…
suisun2022 Nov 12, 2025
8bbad85
fix: resolve conflicts with master branch updates
suisun2022 Nov 12, 2025
9f97bfb
chore: remove block routing table
suisun2022 Nov 13, 2025
ceb5bb1
chore: make app use web-ui
suisun2022 Nov 13, 2025
e7ff08c
feat: enhance hop select architecture
suisun2022 Nov 13, 2025
39311e2
chore: remove routing table restriction
suisun2022 Nov 13, 2025
dc22620
fix: resolve conflicts with emissary updates
suisun2022 Nov 25, 2025
08c92b5
chore: increase window size and mtu size for speed upgrade
suisun2022 Nov 26, 2025
49edb28
chore: revert const changes
suisun2022 Nov 26, 2025
bbf34d4
fix: resolve conflicts with main emissary updates
soaring-shota Dec 8, 2025
532a6c8
fix: resolve conflicts with emissary updates
soaring-shota Jan 21, 2026
c88306a
Merge branch 'master' into feat/allow-known-relays
soaring-shota Jan 26, 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
25 changes: 18 additions & 7 deletions Cargo.lock

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

9 changes: 6 additions & 3 deletions emissary-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,15 @@ serde_json = { version = "1.0.140", optional = true }
thiserror = "2.0.12"
tokio-tungstenite = { version = "0.27.0", default-features = false, features = ["native-tls"], optional = true }
url = "2.5.4"
base64 = "0.21"

# workspace dependencies
anyhow = { workspace = true }
parking_lot = { workspace = true }
rand = { workspace = true }
reqwest = { workspace = true }
reqwest = { workspace = true, features = ["json", "http2"] }
smol = { workspace = true }
tokio-util = { workspace = true }
serde = { workspace = true, features = ["derive"] }
tempfile = { workspace = true }
tokio = { workspace = true }
Expand All @@ -43,7 +46,7 @@ yosemite = { workspace = true }
fast-socks5 = { version = "0.10.0", features = ["socks4"] }

[features]
default = ["native-ui"]
native-ui = ["chrono", "iced", "plotters", "plotters-iced"]
default = ["web-ui"]
native-ui = ["chrono", "iced", "plotters", "plotters-iced", "serde_json"]
web-ui = ["axum", "serde_json", "tokio-tungstenite"]
metrics = ["emissary-util/metrics"]
77 changes: 53 additions & 24 deletions emissary-cli/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,27 +51,27 @@ pub struct ExploratoryConfig {
pub outbound_count: Option<usize>,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
#[derive(Debug, Serialize, Deserialize, Clone)]
pub struct Ntcp2Config {
pub port: u16,
pub host: Option<Ipv4Addr>,
pub publish: Option<bool>,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
#[derive(Debug, Serialize, Deserialize, Clone)]
pub struct Ssu2Config {
pub port: u16,
pub host: Option<Ipv4Addr>,
pub publish: Option<bool>,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
#[derive(Debug, Serialize, Deserialize, Clone)]
pub struct I2cpConfig {
pub port: u16,
pub host: Option<String>,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
#[derive(Debug, Serialize, Deserialize, Clone)]
pub struct SamConfig {
pub tcp_port: u16,
pub udp_port: u16,
Expand Down Expand Up @@ -162,7 +162,14 @@ pub struct RouterUiConfig {
pub port: Option<u16>,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
#[derive(Debug, Default, Clone, Serialize, Deserialize)]
pub struct PrivateNetworkConfig {
pub enabled: bool,
pub known_relays: Vec<String>,
pub min_bandwidth: Option<String>,
}

#[derive(Debug, Serialize, Deserialize, Clone)]
pub struct EmissaryConfig {
#[serde(rename = "address-book")]
pub address_book: Option<AddressBookConfig>,
Expand Down Expand Up @@ -194,19 +201,25 @@ pub struct EmissaryConfig {
#[serde(rename = "server-tunnels")]
pub server_tunnels: Option<Vec<ServerTunnelConfig>>,
#[serde(rename = "router-ui")]
pub router_ui: Option<RouterUiConfig>,
router_ui: Option<RouterUiConfig>,
#[serde(rename = "private-network")]
private_network: Option<PrivateNetworkConfig>,
#[serde(rename = "reseed-api-url")]
reseed_api_url: Option<String>,
}

impl Default for EmissaryConfig {
fn default() -> Self {
Self {
address_book: Some(AddressBookConfig {
default: Some(String::from(
"http://udhdrtrcetjm5sxzskjyr5ztpeszydbh4dpl3pl4utgqqw2v4jna.b32.i2p/hosts.txt",
)),
subscriptions: None,
}),
caps: Some(String::from("XR")),
net_id: Some(27u8), //27=echo net
address_book: None,
// address_book: Some(AddressBookConfig {
// default: Some(String::from(
// "http://udhdrtrcetjm5sxzskjyr5ztpeszydbh4dpl3pl4utgqqw2v4jna.b32.i2p/hosts.txt",
// )),
// subscriptions: None,
// }),
caps: Some(String::from("XfR")), //XfR = Floodfill Router, L = Local Router
http_proxy: Some(HttpProxyConfig {
host: "127.0.0.1".to_string(),
port: 4444u16,
Expand All @@ -231,11 +244,12 @@ impl Default for EmissaryConfig {
host: None,
publish: Some(true),
}),
port_forwarding: Some(PortForwardingConfig {
nat_pmp: true,
upnp: true,
name: String::from("emissary"),
}),
port_forwarding: None,
// port_forwarding: Some(PortForwardingConfig {
// nat_pmp: true,
// upnp: true,
// name: String::from("emissary"),
// }),
reseed: Some(ReseedConfig {
reseed_threshold: 25usize,
hosts: None,
Expand All @@ -255,13 +269,18 @@ impl Default for EmissaryConfig {
}),
allow_local: false,
exploratory: None,
floodfill: false,
floodfill: true, //true = Floodfill Router, false = Local Router
insecure_tunnels: false,
log: None,
net_id: None,
ssu2: None,
client_tunnels: None,
server_tunnels: None,
private_network: Some(PrivateNetworkConfig {
enabled: false,
known_relays: vec![],
min_bandwidth: Some("O".to_string()),
}),
reseed_api_url: None,
}
}
}
Expand Down Expand Up @@ -349,6 +368,12 @@ pub struct Config {
/// Transit tunnel config.
pub transit: Option<emissary_core::TransitConfig>,

/// Private network config.
pub private_network: Option<emissary_core::PrivateNetworkConfig>,

/// Optional reseed API server URL for private network mode.
/// If not provided, API calls to update router info are skipped.
pub reseed_api_url: Option<String>,
/// Config which is stored on disk.
///
/// This is passed onto the UI.
Expand Down Expand Up @@ -376,6 +401,8 @@ impl From<Config> for emissary_core::Config {
static_key: Some(val.static_key),
transit: val.transit,
refresh_interval: val.router_ui.map(|config| config.refresh_interval),
private_network: val.private_network,
reseed_api_url: val.reseed_api_url,
}
}
}
Expand Down Expand Up @@ -603,6 +630,12 @@ impl Config {
transit: config.transit.map(|config| emissary_core::TransitConfig {
max_tunnels: config.max_tunnels,
}),
private_network: config.private_network.map(|config| emissary_core::PrivateNetworkConfig {
enabled: config.enabled,
known_relays: config.known_relays,
min_bandwidth: config.min_bandwidth,
}),
reseed_api_url: config.reseed_api_url,
config: Some(config_copy),
})
}
Expand Down Expand Up @@ -840,10 +873,6 @@ mod tests {
base_path: None,
command: None,
log: None,
#[cfg(any(
all(feature = "native-ui", not(feature = "web-ui")),
all(not(feature = "native-ui"), feature = "web-ui")
))]
router_ui: crate::cli::RouterUiOptions {
disable_ui: None,
refresh_interval: None,
Expand Down
Loading