2024-03-08 10:43:22 +08:00
|
|
|
package template_data
|
|
|
|
|
|
|
|
type Server struct {
|
|
|
|
Address string `json:"address"`
|
|
|
|
ListenPort int `json:"listenPort"`
|
|
|
|
PrivateKey string `json:"privateKey"`
|
|
|
|
MTU int `json:"mtu"`
|
|
|
|
PostUp string `json:"postUp"`
|
|
|
|
PreDown string `json:"preDown"`
|
|
|
|
PostDown string `json:"postDown"`
|
|
|
|
Table string `json:"table"`
|
|
|
|
Clients []Client `json:"clients"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type Client struct {
|
2024-03-11 11:30:36 +08:00
|
|
|
ID string `json:"id"`
|
|
|
|
Name string `json:"name"`
|
2024-03-11 14:53:28 +08:00
|
|
|
Email string `json:"email"`
|
2024-03-08 10:43:22 +08:00
|
|
|
PublicKey string `json:"publicKey"`
|
|
|
|
PresharedKey string `json:"presharedKey"`
|
|
|
|
AllowedIPS string `json:"allowedIps"`
|
|
|
|
PersistentKeepalive string `json:"persistentKeepalive"`
|
|
|
|
Endpoint string `json:"endpoint"`
|
2024-03-11 11:30:36 +08:00
|
|
|
CreateUser string `json:"createUser"`
|
2024-03-11 14:53:28 +08:00
|
|
|
Enabled bool `json:"enabled"`
|
2024-03-11 11:30:36 +08:00
|
|
|
CreatedAt string `json:"createdAt"`
|
|
|
|
UpdatedAt string `json:"updatedAt"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type Keys struct {
|
2024-03-13 17:05:02 +08:00
|
|
|
PrivateKey string `json:"privateKey"`
|
|
|
|
PublicKey string `json:"publicKey"`
|
|
|
|
PresharedKey string `json:"presharedKey"`
|
2024-03-08 10:43:22 +08:00
|
|
|
}
|
2024-03-14 15:23:16 +08:00
|
|
|
|
|
|
|
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"`
|
|
|
|
}
|