Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

print info on exit policy on embedded NR init #4086

Merged
merged 1 commit into from
Nov 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions common/types/src/gateway.rs
Original file line number Diff line number Diff line change
@@ -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
@@ -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)?;
1 change: 1 addition & 0 deletions gateway/src/commands/helpers.rs
Original file line number Diff line number Diff line change
@@ -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(),
1 change: 1 addition & 0 deletions gateway/src/node/helpers.rs
Original file line number Diff line number Diff line change
@@ -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),