59 lines
2.0 KiB
Go
59 lines
2.0 KiB
Go
|
package render_data
|
||
|
|
||
|
type ServerSetting struct {
|
||
|
EndpointAddress string `json:"endpointAddress"`
|
||
|
DnsServer []string `json:"dnsServer"`
|
||
|
MTU int `json:"MTU"`
|
||
|
PersistentKeepalive int `json:"persistentKeepalive"`
|
||
|
FirewallMark string `json:"firewallMark"`
|
||
|
Table string `json:"table"`
|
||
|
ConfigFilePath string `json:"configFilePath"`
|
||
|
}
|
||
|
|
||
|
type Server struct {
|
||
|
Address []string `json:"ipScope"`
|
||
|
ListenPort uint64 `json:"listenPort"`
|
||
|
PrivateKey string `json:"privateKey"`
|
||
|
PublicKey string `json:"publicKey" `
|
||
|
MTU int `json:"MTU"`
|
||
|
PostUp string `json:"postUpScript"`
|
||
|
PreDown string `json:"preDownScript"`
|
||
|
PostDown string `json:"postDownScript"`
|
||
|
Table string `json:"table"`
|
||
|
Clients []Client `json:"clients"`
|
||
|
}
|
||
|
|
||
|
type Client struct {
|
||
|
ID string `json:"id"`
|
||
|
Name string `json:"name"`
|
||
|
Email string `json:"email"`
|
||
|
PublicKey string `json:"publicKey"`
|
||
|
PresharedKey string `json:"presharedKey"`
|
||
|
AllowedIPS string `json:"allowedIps"`
|
||
|
PersistentKeepalive string `json:"persistentKeepalive"`
|
||
|
Endpoint string `json:"endpoint"`
|
||
|
CreateUser string `json:"createUser"`
|
||
|
Enabled bool `json:"enabled"`
|
||
|
CreatedAt string `json:"createdAt"`
|
||
|
UpdatedAt string `json:"updatedAt"`
|
||
|
}
|
||
|
|
||
|
type Keys struct {
|
||
|
PrivateKey string `json:"privateKey"`
|
||
|
PublicKey string `json:"publicKey"`
|
||
|
PresharedKey string `json:"presharedKey"`
|
||
|
}
|
||
|
|
||
|
type ClientConfig struct {
|
||
|
PrivateKey string `json:"privateKey"`
|
||
|
IpAllocation string `json:"ipAllocation"`
|
||
|
MTU int `json:"MTU"`
|
||
|
DNS string `json:"DNS"`
|
||
|
PublicKey string `json:"publicKey"`
|
||
|
PresharedKey string `json:"presharedKey"`
|
||
|
AllowedIPS string `json:"allowedIPS"`
|
||
|
Endpoint string `json:"endpoint"`
|
||
|
ListenPort int `json:"listenPort"`
|
||
|
PersistentKeepalive int `json:"persistentKeepalive"`
|
||
|
}
|