🆕为实现数据迁移以及备份新增配置导出
This commit is contained in:
@@ -7,3 +7,46 @@ type SettingItem struct {
|
||||
Data string `json:"data"`
|
||||
Describe string `json:"describe"`
|
||||
}
|
||||
|
||||
type Export struct {
|
||||
Global Global `json:"global"`
|
||||
Server Server `json:"server"`
|
||||
Clients []Client `json:"clients"`
|
||||
}
|
||||
|
||||
type Global struct {
|
||||
MTU int `json:"MTU"`
|
||||
ConfigFilePath string `json:"configFilePath"`
|
||||
DnsServer []string `json:"dnsServer"`
|
||||
EndpointAddress string `json:"endpointAddress"`
|
||||
FirewallMark string `json:"firewallMark"`
|
||||
PersistentKeepalive int `json:"persistentKeepalive"`
|
||||
Table string `json:"table"`
|
||||
}
|
||||
|
||||
type Server struct {
|
||||
IpScope []string `json:"ipScope"`
|
||||
ListenPort int `json:"listenPort"`
|
||||
PrivateKey string `json:"privateKey"`
|
||||
PublicKey string `json:"publicKey"`
|
||||
PostUpScript string `json:"postUpScript"`
|
||||
PostDownScript string `json:"postDownScript"`
|
||||
}
|
||||
|
||||
type Client struct {
|
||||
Name string `json:"name"`
|
||||
Email string `json:"email"`
|
||||
SubnetRange string `json:"subnetRange"`
|
||||
IpAllocation []string `json:"ipAllocation"`
|
||||
AllowedIps []string `json:"allowedIps"`
|
||||
ExtraAllowedIps []string `json:"extraAllowedIps"`
|
||||
Endpoint string `json:"endpoint"`
|
||||
UseServerDns int `json:"useServerDns"`
|
||||
Keys struct {
|
||||
PresharedKey string `json:"presharedKey"`
|
||||
PrivateKey string `json:"privateKey"`
|
||||
PublicKey string `json:"publicKey"`
|
||||
} `json:"keys"`
|
||||
Enabled int `json:"enabled"`
|
||||
OfflineMonitoring int `json:"offlineMonitoring"`
|
||||
}
|
||||
|
Reference in New Issue
Block a user