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.
This commit is contained in:
anonpenguin23 2025-11-27 16:52:49 +02:00
parent 681cef999a
commit 7126c4068b
2 changed files with 18 additions and 19 deletions

View File

@ -128,24 +128,24 @@ func TestNormalizePeers(t *testing.T) {
expectCount: 0,
expectError: false,
},
{
name: "single peer",
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/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/12D3KooWKZbRzL9PoGN2T3P5GqDxJQw7QABEbNp3TkYMZJqFgFx,/ip4/10.0.0.1/tcp/4001/p2p/12D3KooWKZbRzL9PoGN2T3P5GqDxJQw7QABEbNp3TkYMZJqFgFx",
expectCount: 1,
expectError: false,
},
{
name: "single peer",
input: "/ip4/10.0.0.1/tcp/4001/p2p/12D3KooWHbcFcrGPXKUrHcxvd8MXEeUzRYyvY8fQcpEBxncSUwhj",
expectCount: 1,
expectError: false,
},
{
name: "multiple peers",
input: "/ip4/10.0.0.1/tcp/4001/p2p/12D3KooWHbcFcrGPXKUrHcxvd8MXEeUzRYyvY8fQcpEBxncSUwhj,/ip4/10.0.0.2/tcp/4001/p2p/12D3KooWJzL4SHW3o7sZpzjfEPJzC6Ky7gKvJxY8vQVDR2jHc8F1",
expectCount: 2,
expectError: false,
},
{
name: "duplicate peers deduplicated",
input: "/ip4/10.0.0.1/tcp/4001/p2p/12D3KooWHbcFcrGPXKUrHcxvd8MXEeUzRYyvY8fQcpEBxncSUwhj,/ip4/10.0.0.1/tcp/4001/p2p/12D3KooWHbcFcrGPXKUrHcxvd8MXEeUzRYyvY8fQcpEBxncSUwhj",
expectCount: 1,
expectError: false,
},
{
name: "invalid multiaddr",
input: "not-a-multiaddr",

View File

@ -29,7 +29,6 @@ func TestRenderNodeConfig(t *testing.T) {
"id: \"node2\"",
"tcp/4002",
"rqlite_port: 5002",
"rqlite_raft_port: 7002",
"rqlite_join_address: \"localhost:5001\"",
bootstrapMultiaddr,
"cluster_api_url: \"http://localhost:9104\"",