Block non-public IPR/NR checks (#6670)
* Block non-public IPR/NR checks * Add CLI override flag
This commit is contained in:
@@ -5,7 +5,7 @@ use crate::config::upgrade_helpers::try_load_current_config;
|
||||
use crate::error::NymNodeError;
|
||||
use crate::node::NymNode;
|
||||
use crate::node::bonding_information::BondingInformation;
|
||||
use crate::node::mixnet::packet_forwarding::global::is_global_ip;
|
||||
use nym_bin_common::ip_check::is_global_ip;
|
||||
use std::fs;
|
||||
use std::net::IpAddr;
|
||||
use tracing::{debug, info, trace, warn};
|
||||
|
||||
@@ -512,6 +512,26 @@ pub(crate) struct ExitGatewayArgs {
|
||||
env = NYMNODE_OPEN_PROXY_ARG,
|
||||
)]
|
||||
pub(crate) open_proxy: Option<bool>,
|
||||
|
||||
/// Allow the network requester to forward traffic to non-globally-routable
|
||||
/// addresses. Intended for local development, private-network deployments,
|
||||
/// and testnet scenarios.
|
||||
/// Not recommended on production exit gateway unless you know what you're doing.
|
||||
#[clap(
|
||||
long,
|
||||
env = NYMNODE_NR_ALLOW_LOCAL_IPS_ARG,
|
||||
)]
|
||||
pub(crate) nr_allow_local_ips: Option<bool>,
|
||||
|
||||
/// Allow the IP packet router to forward traffic to non-globally-routable
|
||||
/// addresses. Intended for local development, private-network deployments,
|
||||
/// and testnet scenarios.
|
||||
/// Not recommended on production exit gateway unless you know what you're doing.
|
||||
#[clap(
|
||||
long,
|
||||
env = NYMNODE_IPR_ALLOW_LOCAL_IPS_ARG,
|
||||
)]
|
||||
pub(crate) ipr_allow_local_ips: Option<bool>,
|
||||
}
|
||||
|
||||
impl ExitGatewayArgs {
|
||||
@@ -533,6 +553,12 @@ impl ExitGatewayArgs {
|
||||
if let Some(open_proxy) = self.open_proxy {
|
||||
section.open_proxy = open_proxy
|
||||
}
|
||||
if let Some(allow_local_ips) = self.nr_allow_local_ips {
|
||||
section.network_requester.allow_local_ips = allow_local_ips
|
||||
}
|
||||
if let Some(allow_local_ips) = self.ipr_allow_local_ips {
|
||||
section.ip_packet_router.allow_local_ips = allow_local_ips
|
||||
}
|
||||
|
||||
section
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user