added relay functionality to proxy

This commit is contained in:
Abhishek Kondur
2022-11-04 01:24:48 +05:30
parent 4e55242cb1
commit acae6c3aed
17 changed files with 430 additions and 144 deletions

View File

@@ -1,6 +1,10 @@
package models
import "golang.zx2c4.com/wireguard/wgctrl/wgtypes"
import (
"net"
"golang.zx2c4.com/wireguard/wgctrl/wgtypes"
)
// PeerUpdate - struct
type PeerUpdate struct {
@@ -10,6 +14,8 @@ type PeerUpdate struct {
Peers []wgtypes.PeerConfig `json:"peers" bson:"peers" yaml:"peers"`
DNS string `json:"dns" bson:"dns" yaml:"dns"`
PeerIDs PeerMap `json:"peerids" bson:"peerids" yaml:"peerids"`
IsRelayed bool `json:"is_relayed" bson:"is_relayed" yaml:"is_relayed"`
RelayTo *net.UDPAddr `json:"relay_to" bson:"relay_to" yaml:"relay_to"`
}
// KeyUpdate - key update struct