mirror of
https://github.com/luscis/openlan.git
synced 2025-10-07 17:40:54 +08:00
29 lines
577 B
Go
29 lines
577 B
Go
package config
|
|
|
|
type IPSecTunnel struct {
|
|
Left string `json:"local"`
|
|
LeftId string `json:"localid"`
|
|
LeftPort string `json:"localport"`
|
|
Right string `json:"remote"`
|
|
RightId string `json:"remoteid"`
|
|
RightPort string `json:"remoteport"`
|
|
Transport string `json:"transport"`
|
|
}
|
|
|
|
func (s *IPSecTunnel) Correct() {
|
|
if s.Left == "" {
|
|
s.Left = "%defaultroute"
|
|
}
|
|
}
|
|
|
|
type IPSecSpecifies struct {
|
|
Name string `json:"name"`
|
|
Tunnels []IPSecTunnel `json:"tunnels"`
|
|
}
|
|
|
|
func (s *IPSecSpecifies) Correct() {
|
|
for _, t := range s.Tunnels {
|
|
t.Correct()
|
|
}
|
|
}
|