Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
octol committed Oct 26, 2023
1 parent 0da2773 commit 90c5d4e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions gateway/src/commands/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ use nym_node::error::NymNodeError;
use std::net::IpAddr;
use std::path::PathBuf;

use super::helpers::OverrideIpForwarderConfig;

#[derive(Args, Clone)]
pub struct Run {
/// Id of the gateway we want to run
Expand Down Expand Up @@ -88,6 +90,10 @@ pub struct Run {
#[clap(long)]
with_network_requester: Option<bool>,

/// Allows this gateway to run an embedded network requester for minimal network overhead
#[clap(long)]
with_ip_forwarder: Option<bool>,

// ##### NETWORK REQUESTER FLAGS #####
/// Specifies whether this network requester should run in 'open-proxy' mode
#[arg(long)]
Expand Down Expand Up @@ -175,6 +181,10 @@ impl<'a> From<&'a Run> for OverrideNetworkRequesterConfig {
}
}

impl From<Run> for OverrideIpForwarderConfig {
fn from(ip_config:

Check failure on line 185 in gateway/src/commands/run.rs

View workflow job for this annotation

GitHub Actions / build (custom-linux)

mismatched closing delimiter: `}`

Check failure on line 185 in gateway/src/commands/run.rs

View workflow job for this annotation

GitHub Actions / build (custom-runner-mac-m1)

mismatched closing delimiter: `}`

Check failure on line 185 in gateway/src/commands/run.rs

View workflow job for this annotation

GitHub Actions / build (custom-linux)

mismatched closing delimiter: `}`

Check failure on line 185 in gateway/src/commands/run.rs

View workflow job for this annotation

GitHub Actions / build (custom-runner-mac-m1)

mismatched closing delimiter: `}`
}

fn show_binding_warning(address: IpAddr) {
eprintln!("\n##### NOTE #####");
eprintln!(
Expand Down Expand Up @@ -217,6 +227,7 @@ pub async fn execute(args: Run) -> anyhow::Result<()> {
let output = args.output;
let custom_mixnet = args.custom_mixnet.clone();
let nr_opts = (&args).into();
let ip_opts = (&args).into();

let config = build_config(id, args)?;
ensure_config_version_compatibility(&config)?;
Expand Down

0 comments on commit 90c5d4e

Please sign in to comment.