mirror of
https://github.com/kairos-io/kairos-agent.git
synced 2025-06-03 01:44:53 +00:00

* 🎨 Split off cli into separate binaries This commit splits off the cli into 3 binaries: - agent - cli - provider The provider now is a separate component that can be tested by itself and have its own lifecycle. This paves the way to a ligher c3os variant, HA support and other features that can be provided on runtime. This is working, but still there are low hanging fruit to care about. Fixes #14 * 🤖 Add provider bin to releases * ⚙️ Handle signals * ⚙️ Reduce buildsize footprint * 🎨 Scan for providers also in /system/providers * 🤖 Run goreleaser * 🎨 Refactoring
51 lines
1.1 KiB
Go
51 lines
1.1 KiB
Go
package config
|
|
|
|
import (
|
|
"runtime"
|
|
"time"
|
|
|
|
"github.com/mudler/edgevpn/pkg/config"
|
|
)
|
|
|
|
func Network(token, address, loglevel, i string) *config.Config {
|
|
return &config.Config{
|
|
NetworkToken: token,
|
|
Address: address,
|
|
Libp2pLogLevel: "error",
|
|
FrameTimeout: "30s",
|
|
BootstrapIface: true,
|
|
LogLevel: loglevel,
|
|
LowProfile: true,
|
|
VPNLowProfile: true,
|
|
Interface: i,
|
|
Concurrency: runtime.NumCPU(),
|
|
PacketMTU: 1420,
|
|
InterfaceMTU: 1200,
|
|
Ledger: config.Ledger{
|
|
AnnounceInterval: time.Duration(30) * time.Second,
|
|
SyncInterval: time.Duration(30) * time.Second,
|
|
},
|
|
NAT: config.NAT{
|
|
Service: true,
|
|
Map: true,
|
|
RateLimit: true,
|
|
RateLimitGlobal: 10,
|
|
RateLimitPeer: 10,
|
|
RateLimitInterval: time.Duration(10) * time.Second,
|
|
},
|
|
Discovery: config.Discovery{
|
|
DHT: true,
|
|
MDNS: true,
|
|
Interval: time.Duration(120) * time.Second,
|
|
},
|
|
Connection: config.Connection{
|
|
RelayV1: true,
|
|
|
|
AutoRelay: true,
|
|
MaxConnections: 100,
|
|
MaxStreams: 100,
|
|
HolePunch: true,
|
|
},
|
|
}
|
|
}
|