Skip to content

Commit

Permalink
print info on exit policy on embedded NR init (#4086)
Browse files Browse the repository at this point in the history
  • Loading branch information
jstuczyn authored and gala1234 committed Dec 4, 2023
1 parent c67cfc4 commit e9ebf43
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions common/types/src/gateway.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ pub struct GatewayNetworkRequesterDetails {
pub encryption_key: String,

pub open_proxy: bool,
pub exit_policy: bool,
pub enabled_statistics: bool,

// just a convenience wrapper around all the keys
Expand All @@ -140,6 +141,7 @@ impl fmt::Display for GatewayNetworkRequesterDetails {
writeln!(f, "\taddress: {}", self.address)?;

writeln!(f, "\tuses open proxy: {}", self.open_proxy)?;
writeln!(f, "\tuses exit policy: {}", self.exit_policy)?;
writeln!(f, "\tsends statistics: {}", self.enabled_statistics)?;

writeln!(f, "\tallow list path: {}", self.allow_list_path)?;
Expand Down
1 change: 1 addition & 0 deletions gateway/src/commands/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ pub(crate) async fn initialise_local_network_requester(
enabled: gateway_config.network_requester.enabled,
identity_key: address.identity().to_string(),
encryption_key: address.encryption_key().to_string(),
exit_policy: !nr_cfg.network_requester.use_deprecated_allow_list,
open_proxy: nr_cfg.network_requester.open_proxy,
enabled_statistics: nr_cfg.network_requester.enabled_statistics,
address: address.to_string(),
Expand Down
1 change: 1 addition & 0 deletions gateway/src/node/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ pub(crate) fn node_details(config: &Config) -> Result<GatewayNodeDetailsResponse
identity_key: nr_identity_public_key.to_base58_string(),
encryption_key: nr_encryption_key.to_base58_string(),
open_proxy: cfg.network_requester.open_proxy,
exit_policy: !cfg.network_requester.use_deprecated_allow_list,
enabled_statistics: cfg.network_requester.enabled_statistics,
address: address.to_string(),
config_path: display_path(nr_cfg_path),
Expand Down

0 comments on commit e9ebf43

Please sign in to comment.