mirror of
https://github.com/DeBrosOfficial/network.git
synced 2025-12-11 07:58:50 +00:00
- 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.
84 lines
2.3 KiB
YAML
84 lines
2.3 KiB
YAML
node:
|
|
id: "{{.NodeID}}"
|
|
listen_addresses:
|
|
- "/ip4/0.0.0.0/tcp/{{.P2PPort}}"
|
|
data_dir: "{{.DataDir}}"
|
|
max_connections: 50
|
|
domain: "{{.Domain}}"
|
|
|
|
database:
|
|
data_dir: "{{.DataDir}}/rqlite"
|
|
replication_factor: 3
|
|
shard_count: 16
|
|
max_database_size: 1073741824
|
|
backup_interval: "24h"
|
|
rqlite_port: {{.RQLiteHTTPPort}}
|
|
rqlite_raft_port: {{.RQLiteRaftInternalPort}}
|
|
rqlite_join_address: "{{.RQLiteJoinAddress}}"
|
|
cluster_sync_interval: "30s"
|
|
peer_inactivity_limit: "24h"
|
|
min_cluster_size: 3
|
|
ipfs:
|
|
cluster_api_url: "http://localhost:{{.ClusterAPIPort}}"
|
|
api_url: "http://localhost:{{.IPFSAPIPort}}"
|
|
timeout: "60s"
|
|
replication_factor: 3
|
|
enable_encryption: true
|
|
|
|
discovery:
|
|
bootstrap_peers:
|
|
{{range .BootstrapPeers}} - "{{.}}"
|
|
{{end}}
|
|
discovery_interval: "15s"
|
|
bootstrap_port: {{.P2PPort}}
|
|
http_adv_address: "{{.HTTPAdvAddress}}"
|
|
raft_adv_address: "{{.RaftAdvAddress}}"
|
|
node_namespace: "default"
|
|
|
|
security:
|
|
enable_tls: false
|
|
|
|
logging:
|
|
level: "info"
|
|
format: "console"
|
|
|
|
http_gateway:
|
|
enabled: true
|
|
listen_addr: "{{if .EnableHTTPS}}:{{.HTTPSPort}}{{else}}:{{.UnifiedGatewayPort}}{{end}}"
|
|
node_name: "{{.NodeID}}"
|
|
|
|
{{if .EnableHTTPS}}https:
|
|
enabled: true
|
|
domain: "{{.Domain}}"
|
|
auto_cert: true
|
|
cache_dir: "{{.TLSCacheDir}}"
|
|
http_port: {{.HTTPPort}}
|
|
https_port: {{.HTTPSPort}}
|
|
email: "admin@{{.Domain}}"
|
|
{{end}}
|
|
|
|
{{if .EnableHTTPS}}sni:
|
|
enabled: true
|
|
listen_addr: ":{{.RQLiteRaftPort}}"
|
|
cert_file: "{{.TLSCacheDir}}/{{.Domain}}.crt"
|
|
key_file: "{{.TLSCacheDir}}/{{.Domain}}.key"
|
|
routes:
|
|
raft.{{.Domain}}: "localhost:{{.RQLiteRaftInternalPort}}"
|
|
ipfs.{{.Domain}}: "localhost:4101"
|
|
ipfs-cluster.{{.Domain}}: "localhost:9096"
|
|
olric.{{.Domain}}: "localhost:3322"
|
|
{{end}}
|
|
|
|
# Full gateway configuration (for API, auth, pubsub, and internal service routing)
|
|
client_namespace: "default"
|
|
rqlite_dsn: "http://localhost:{{.RQLiteHTTPPort}}"
|
|
olric_servers:
|
|
- "127.0.0.1:3320"
|
|
olric_timeout: "10s"
|
|
ipfs_cluster_api_url: "http://localhost:{{.ClusterAPIPort}}"
|
|
ipfs_api_url: "http://localhost:{{.IPFSAPIPort}}"
|
|
ipfs_timeout: "60s"
|
|
|
|
# Routes for internal service reverse proxy (kept for backwards compatibility but not used by full gateway)
|
|
routes: {}
|