From 0d223ea6f6dbb87e7f6454652c038cf0c2f7ecb5 Mon Sep 17 00:00:00 2001 From: Jonathan Zernik Date: Sat, 26 Mar 2022 00:45:37 -0700 Subject: [PATCH] Fix external port config (#2023) --- squeaknode/config/config.py | 3 +++ squeaknode/node/squeak_controller.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/squeaknode/config/config.py b/squeaknode/config/config.py index 2eb3190a..82810f6b 100644 --- a/squeaknode/config/config.py +++ b/squeaknode/config/config.py @@ -41,6 +41,7 @@ DEFAULT_MAX_SQUEAKS = 10000 DEFAULT_MAX_SQUEAKS_PER_PUBLIC_KEY_PER_BLOCK = 100 DEFAULT_SERVER_RPC_HOST = "0.0.0.0" DEFAULT_SERVER_RPC_PORT = None +DEFAULT_EXTERNAL_PORT = 8555 DEFAULT_ADMIN_RPC_HOST = "0.0.0.0" DEFAULT_ADMIN_RPC_PORT = 8994 DEFAULT_WEBADMIN_HOST = "0.0.0.0" @@ -103,6 +104,8 @@ class ServerConfig(Config): host = key(cast=str, required=False, default=DEFAULT_SERVER_RPC_HOST) port = key(cast=int, required=False, default=DEFAULT_SERVER_RPC_PORT) external_address = key(cast=str, required=False, default="") + external_port = key(cast=int, required=False, + default=DEFAULT_EXTERNAL_PORT) @section('rpc') diff --git a/squeaknode/node/squeak_controller.py b/squeaknode/node/squeak_controller.py index 04c75b02..278a6f21 100644 --- a/squeaknode/node/squeak_controller.py +++ b/squeaknode/node/squeak_controller.py @@ -447,7 +447,7 @@ class SqueakController: return PeerAddress( network=Network.IPV4, host=self.config.server.external_address or '', - port=self.config.server.port or 0, + port=self.config.server.external_port or 0, ) def get_default_peer_port(self) -> int: