mirror of
https://github.com/netbirdio/netbird.git
synced 2026-10-23 05:49:07 +02:00
Add transparent proxy inspection engine with envoy sidecar support
This commit is contained in:
@@ -97,6 +97,9 @@ type ConfigInput struct {
|
||||
LazyConnectionEnabled *bool
|
||||
|
||||
MTU *uint16
|
||||
|
||||
InspectionCACertPath string
|
||||
InspectionCAKeyPath string
|
||||
}
|
||||
|
||||
// Config Configuration type
|
||||
@@ -171,6 +174,13 @@ type Config struct {
|
||||
LazyConnectionEnabled bool
|
||||
|
||||
MTU uint16
|
||||
|
||||
// InspectionCACertPath is the path to a PEM CA certificate for transparent proxy MITM.
|
||||
// Local CA takes priority over management-pushed CA.
|
||||
InspectionCACertPath string
|
||||
|
||||
// InspectionCAKeyPath is the path to the PEM CA private key for transparent proxy MITM.
|
||||
InspectionCAKeyPath string
|
||||
}
|
||||
|
||||
var ConfigDirOverride string
|
||||
@@ -603,6 +613,17 @@ func (config *Config) apply(input ConfigInput) (updated bool, err error) {
|
||||
updated = true
|
||||
}
|
||||
|
||||
if input.InspectionCACertPath != "" && input.InspectionCACertPath != config.InspectionCACertPath {
|
||||
log.Infof("updating inspection CA cert path to %s", input.InspectionCACertPath)
|
||||
config.InspectionCACertPath = input.InspectionCACertPath
|
||||
updated = true
|
||||
}
|
||||
if input.InspectionCAKeyPath != "" && input.InspectionCAKeyPath != config.InspectionCAKeyPath {
|
||||
log.Infof("updating inspection CA key path to %s", input.InspectionCAKeyPath)
|
||||
config.InspectionCAKeyPath = input.InspectionCAKeyPath
|
||||
updated = true
|
||||
}
|
||||
|
||||
return updated, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user