Skip to content

Commit

Permalink
feat(portal-bridge): add network and subnetworks flags for fluffy (#1339
Browse files Browse the repository at this point in the history
)
  • Loading branch information
kdeme authored Jul 10, 2024
1 parent 4520750 commit 0e60828
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions portal-bridge/src/client_handles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,25 @@ pub fn fluffy_handle(bridge_config: &BridgeConfig) -> anyhow::Result<Child> {
let mut command = Command::new(bridge_config.executable_path.clone());
let listen_all_ips = SocketAddr::new("0.0.0.0".parse().expect("to parse ip"), udp_port);
let ip = stun_for_external(&listen_all_ips).expect("to stun for external ip");
let portal_subnetworks = bridge_config
.portal_subnetworks
.iter()
.map(|n| n.to_string())
.collect::<Vec<_>>()
.join(",");

command
.kill_on_drop(true)
.arg("--storage-capacity:0")
.arg("--rpc")
.arg(format!("--rpc-port:{rpc_port}"))
.arg(format!("--udp-port:{udp_port}"))
.arg(format!("--nat:extip:{}", ip.ip()))
.arg(format!(
"--network:{}",
bridge_config.network.get_network_name()
))
.arg(format!("--portal-subnetworks:{}", &portal_subnetworks))
.arg(format!("--netkey-unsafe:{private_key}"));
if let Some(client_metrics_url) = bridge_config.client_metrics_url {
let address = client_metrics_url.ip().to_string();
Expand Down

0 comments on commit 0e60828

Please sign in to comment.