Revert "embed types without alias properly"
This reverts commit b7ed21f2ec
.
This commit is contained in:
parent
f0ffa166f8
commit
c579372eaa
@ -20,7 +20,7 @@ type PeerConfig struct {
|
||||
// Description of what the host is and/or does
|
||||
Description string `validate:"required,gte=1,lte=255"`
|
||||
// Internal VPN IP address. Added to AllowedIPs in server config as a /32
|
||||
net.IP `validate:"required`
|
||||
IP net.IP `validate:"required`
|
||||
PublicKey JSONKey `validate:"required,len=44"`
|
||||
PrivateKey JSONKey `json:"-"` // omitted from config!
|
||||
PresharedKey JSONKey `validate:"required,len=44"`
|
||||
@ -40,7 +40,7 @@ type DsnetConfig struct {
|
||||
// IP network from which to allocate automatic sequential addresses
|
||||
// Network is chosen randomly when not specified
|
||||
Network JSONIPNet `validate:"required"`
|
||||
net.IP `validate:"required"`
|
||||
IP net.IP `validate:"required"`
|
||||
DNS net.IP `validate:"required"`
|
||||
// TODO Default subnets to route via VPN
|
||||
ReportFile string `validate:"required"`
|
||||
|
@ -8,7 +8,7 @@ import (
|
||||
)
|
||||
|
||||
type JSONIPNet struct {
|
||||
net.IPNet
|
||||
IPNet net.IPNet
|
||||
}
|
||||
|
||||
func (n JSONIPNet) MarshalJSON() ([]byte, error) {
|
||||
@ -28,7 +28,7 @@ func (n *JSONIPNet) String() string {
|
||||
}
|
||||
|
||||
type JSONKey struct {
|
||||
wgtypes.Key
|
||||
Key wgtypes.Key
|
||||
}
|
||||
|
||||
func (k JSONKey) MarshalJSON() ([]byte, error) {
|
||||
|
@ -51,7 +51,7 @@ type DsnetReport struct {
|
||||
// IP network from which to allocate automatic sequential addresses
|
||||
// Network is chosen randomly when not specified
|
||||
Network JSONIPNet
|
||||
net.IP
|
||||
IP net.IP
|
||||
DNS net.IP
|
||||
Peers []PeerReport
|
||||
}
|
||||
@ -74,8 +74,8 @@ type PeerReport struct {
|
||||
// Description of what the host is and/or does
|
||||
Description string
|
||||
// Internal VPN IP address. Added to AllowedIPs in server config as a /32
|
||||
net.IP
|
||||
Status
|
||||
IP net.IP
|
||||
Status Status
|
||||
// TODO ExternalIP support (Endpoint)
|
||||
//ExternalIP net.UDPAddr `validate:"required,udp4_addr"`
|
||||
// TODO support routing additional networks (AllowedIPs)
|
||||
|
Loading…
Reference in New Issue
Block a user