mirror of
https://github.com/DeBrosOfficial/network.git
synced 2025-12-13 01:18:49 +00:00
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:
parent
681cef999a
commit
7126c4068b
@ -128,24 +128,24 @@ func TestNormalizePeers(t *testing.T) {
|
|||||||
expectCount: 0,
|
expectCount: 0,
|
||||||
expectError: false,
|
expectError: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "single peer",
|
name: "single peer",
|
||||||
input: "/ip4/10.0.0.1/tcp/4001/p2p/12D3KooWKZbRzL9PoGN2T3P5GqDxJQw7QABEbNp3TkYMZJqFgFx",
|
input: "/ip4/10.0.0.1/tcp/4001/p2p/12D3KooWHbcFcrGPXKUrHcxvd8MXEeUzRYyvY8fQcpEBxncSUwhj",
|
||||||
expectCount: 1,
|
expectCount: 1,
|
||||||
expectError: false,
|
expectError: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "multiple peers",
|
name: "multiple peers",
|
||||||
input: "/ip4/10.0.0.1/tcp/4001/p2p/12D3KooWKZbRzL9PoGN2T3P5GqDxJQw7QABEbNp3TkYMZJqFgFx,/ip4/10.0.0.2/tcp/4001/p2p/12D3KooWJwUy2VBT9V4VrCYnHddWvQw7TKkWN7PoXRSLTQDrYPj",
|
input: "/ip4/10.0.0.1/tcp/4001/p2p/12D3KooWHbcFcrGPXKUrHcxvd8MXEeUzRYyvY8fQcpEBxncSUwhj,/ip4/10.0.0.2/tcp/4001/p2p/12D3KooWJzL4SHW3o7sZpzjfEPJzC6Ky7gKvJxY8vQVDR2jHc8F1",
|
||||||
expectCount: 2,
|
expectCount: 2,
|
||||||
expectError: false,
|
expectError: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "duplicate peers deduplicated",
|
name: "duplicate peers deduplicated",
|
||||||
input: "/ip4/10.0.0.1/tcp/4001/p2p/12D3KooWKZbRzL9PoGN2T3P5GqDxJQw7QABEbNp3TkYMZJqFgFx,/ip4/10.0.0.1/tcp/4001/p2p/12D3KooWKZbRzL9PoGN2T3P5GqDxJQw7QABEbNp3TkYMZJqFgFx",
|
input: "/ip4/10.0.0.1/tcp/4001/p2p/12D3KooWHbcFcrGPXKUrHcxvd8MXEeUzRYyvY8fQcpEBxncSUwhj,/ip4/10.0.0.1/tcp/4001/p2p/12D3KooWHbcFcrGPXKUrHcxvd8MXEeUzRYyvY8fQcpEBxncSUwhj",
|
||||||
expectCount: 1,
|
expectCount: 1,
|
||||||
expectError: false,
|
expectError: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "invalid multiaddr",
|
name: "invalid multiaddr",
|
||||||
input: "not-a-multiaddr",
|
input: "not-a-multiaddr",
|
||||||
|
|||||||
@ -29,7 +29,6 @@ func TestRenderNodeConfig(t *testing.T) {
|
|||||||
"id: \"node2\"",
|
"id: \"node2\"",
|
||||||
"tcp/4002",
|
"tcp/4002",
|
||||||
"rqlite_port: 5002",
|
"rqlite_port: 5002",
|
||||||
"rqlite_raft_port: 7002",
|
|
||||||
"rqlite_join_address: \"localhost:5001\"",
|
"rqlite_join_address: \"localhost:5001\"",
|
||||||
bootstrapMultiaddr,
|
bootstrapMultiaddr,
|
||||||
"cluster_api_url: \"http://localhost:9104\"",
|
"cluster_api_url: \"http://localhost:9104\"",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user