From 681cef999a3e67e77c0608f5b1fe1539a14639a6 Mon Sep 17 00:00:00 2001 From: anonpenguin23 Date: Thu, 27 Nov 2025 16:49:26 +0200 Subject: [PATCH] feat: enhance HTTPS support and certificate management - Added a new CertificateManager for managing self-signed certificates, ensuring secure communication within the network. - Updated the configuration to support self-signed certificates and Let's Encrypt integration for HTTPS. - Enhanced the installer to generate and manage certificates automatically, improving the setup experience. - Introduced a centralized TLS configuration for HTTP clients, ensuring consistent security practices across the application. - Updated documentation to reflect new port requirements and HTTPS setup instructions. --- pkg/cli/prod_commands_test.go | 6 +++--- pkg/environments/templates/render_test.go | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/pkg/cli/prod_commands_test.go b/pkg/cli/prod_commands_test.go index 1fd5925..83131e5 100644 --- a/pkg/cli/prod_commands_test.go +++ b/pkg/cli/prod_commands_test.go @@ -130,19 +130,19 @@ func TestNormalizePeers(t *testing.T) { }, { name: "single peer", - input: "/ip4/10.0.0.1/tcp/4001/p2p/QmTest123", + input: "/ip4/10.0.0.1/tcp/4001/p2p/12D3KooWKZbRzL9PoGN2T3P5GqDxJQw7QABEbNp3TkYMZJqFgFx", expectCount: 1, expectError: false, }, { name: "multiple peers", - input: "/ip4/10.0.0.1/tcp/4001/p2p/QmTest1,/ip4/10.0.0.2/tcp/4001/p2p/QmTest2", + input: "/ip4/10.0.0.1/tcp/4001/p2p/12D3KooWKZbRzL9PoGN2T3P5GqDxJQw7QABEbNp3TkYMZJqFgFx,/ip4/10.0.0.2/tcp/4001/p2p/12D3KooWJwUy2VBT9V4VrCYnHddWvQw7TKkWN7PoXRSLTQDrYPj", expectCount: 2, expectError: false, }, { name: "duplicate peers deduplicated", - input: "/ip4/10.0.0.1/tcp/4001/p2p/QmTest1,/ip4/10.0.0.1/tcp/4001/p2p/QmTest1", + input: "/ip4/10.0.0.1/tcp/4001/p2p/12D3KooWKZbRzL9PoGN2T3P5GqDxJQw7QABEbNp3TkYMZJqFgFx,/ip4/10.0.0.1/tcp/4001/p2p/12D3KooWKZbRzL9PoGN2T3P5GqDxJQw7QABEbNp3TkYMZJqFgFx", expectCount: 1, expectError: false, }, diff --git a/pkg/environments/templates/render_test.go b/pkg/environments/templates/render_test.go index b2303db..df53608 100644 --- a/pkg/environments/templates/render_test.go +++ b/pkg/environments/templates/render_test.go @@ -27,7 +27,6 @@ func TestRenderNodeConfig(t *testing.T) { // Check for required fields checks := []string{ "id: \"node2\"", - "type: \"node\"", "tcp/4002", "rqlite_port: 5002", "rqlite_raft_port: 7002",