mirror of
https://github.com/openziti/ziti.git
synced 2026-10-07 21:31:16 +00:00
2110aba5c1
- Rename host.v1 dialIntercepted* properties to forward* - Add allowed* properties to whitelist destinations that are dialed via forward* - Add allowedSourceAddresses, which serves as a whitelist for source IPs/CIDRs and informs the hosting tunneler of the local routes to establish when hosting a service
25 lines
828 B
Go
25 lines
828 B
Go
package persistence
|
|
|
|
import (
|
|
"github.com/openziti/foundation/storage/boltz"
|
|
log "github.com/sirupsen/logrus"
|
|
)
|
|
|
|
func (m *Migrations) createInterceptV1ConfigType(step *boltz.MigrationStep) {
|
|
cfg, _ := m.stores.ConfigType.LoadOneByName(step.Ctx.Tx(), interceptV1ConfigType.Name)
|
|
if cfg == nil {
|
|
step.SetError(m.stores.ConfigType.Create(step.Ctx, interceptV1ConfigType))
|
|
} else {
|
|
log.Debugf("'%s' config type already exists. not creating.", interceptV1ConfigType.Name)
|
|
}
|
|
}
|
|
|
|
func (m *Migrations) createHostV1ConfigType(step *boltz.MigrationStep) {
|
|
cfg, _ := m.stores.ConfigType.LoadOneByName(step.Ctx.Tx(), hostV1ConfigType.Name)
|
|
if cfg == nil {
|
|
step.SetError(m.stores.ConfigType.Create(step.Ctx, hostV1ConfigType))
|
|
} else {
|
|
log.Debugf("'%s' config type already exists. not creating.", hostV1ConfigType.Name)
|
|
}
|
|
}
|