exposed announce ports to nym-node CLI
This commit is contained in:
@@ -188,6 +188,15 @@ pub(crate) struct MixnetArgs {
|
||||
)]
|
||||
pub(crate) mixnet_bind_address: Option<SocketAddr>,
|
||||
|
||||
/// If applicable, custom port announced in the self-described API that other clients and nodes
|
||||
/// will use.
|
||||
/// Useful when the node is behind a proxy.
|
||||
#[clap(
|
||||
long,
|
||||
env = NYMNODE_MIXNET_ANNOUNCE_PORT_ARG
|
||||
)]
|
||||
pub(crate) mixnet_announce_port: Option<u16>,
|
||||
|
||||
/// Addresses to nym APIs from which the node gets the view of the network.
|
||||
#[clap(
|
||||
long,
|
||||
@@ -223,6 +232,9 @@ impl MixnetArgs {
|
||||
if let Some(bind_address) = self.mixnet_bind_address {
|
||||
section.bind_address = bind_address
|
||||
}
|
||||
if let Some(mixnet_announce_port) = self.mixnet_announce_port {
|
||||
section.announce_port = Some(mixnet_announce_port)
|
||||
}
|
||||
if let Some(nym_api_urls) = self.nym_api_urls {
|
||||
section.nym_api_urls = nym_api_urls
|
||||
}
|
||||
@@ -321,6 +333,15 @@ pub(crate) struct MixnodeArgs {
|
||||
env = NYMNODE_VERLOC_BIND_ADDRESS_ARG
|
||||
)]
|
||||
pub(crate) verloc_bind_address: Option<SocketAddr>,
|
||||
|
||||
/// If applicable, custom port announced in the self-described API that other clients and nodes
|
||||
/// will use.
|
||||
/// Useful when the node is behind a proxy.
|
||||
#[clap(
|
||||
long,
|
||||
env = NYMNODE_VERLOC_ANNOUNCE_PORT_ARG
|
||||
)]
|
||||
pub(crate) verloc_announce_port: Option<u16>,
|
||||
}
|
||||
|
||||
impl MixnodeArgs {
|
||||
@@ -336,6 +357,9 @@ impl MixnodeArgs {
|
||||
if let Some(bind_address) = self.verloc_bind_address {
|
||||
section.verloc.bind_address = bind_address
|
||||
}
|
||||
if let Some(announce_port) = self.verloc_announce_port {
|
||||
section.verloc.announce_port = Some(announce_port)
|
||||
}
|
||||
section
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,6 +35,7 @@ pub mod vars {
|
||||
|
||||
// mixnet:
|
||||
pub const NYMNODE_MIXNET_BIND_ADDRESS_ARG: &str = "NYMNODE_MIXNET_BIND_ADDRESS";
|
||||
pub const NYMNODE_MIXNET_ANNOUNCE_PORT_ARG: &str = "NYMNODE_MIXNET_ANNOUNCE_PORT";
|
||||
pub const NYMNODE_NYM_APIS_ARG: &str = "NYMNODE_NYM_APIS";
|
||||
pub const NYMNODE_NYXD_URLS_ARG: &str = "NYMNODE_NYXD";
|
||||
pub const NYMNODE_UNSAFE_DISABLE_NOISE: &str = "UNSAFE_DISABLE_NOISE";
|
||||
@@ -48,6 +49,7 @@ pub mod vars {
|
||||
|
||||
// mixnode:
|
||||
pub const NYMNODE_VERLOC_BIND_ADDRESS_ARG: &str = "NYMNODE_VERLOC_BIND_ADDRESS";
|
||||
pub const NYMNODE_VERLOC_ANNOUNCE_PORT_ARG: &str = "NYMNODE_VERLOC_ANNOUNCE_PORT";
|
||||
|
||||
// entry gateway:
|
||||
pub const NYMNODE_ENTRY_BIND_ADDRESS_ARG: &str = "NYMNODE_ENTRY_BIND_ADDRESS";
|
||||
|
||||
Reference in New Issue
Block a user