start on wireguard config

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
This commit is contained in:
Evan Hazlett 2019-10-04 07:47:16 -04:00
parent f0719ee8a9
commit 2e34c8746e
No known key found for this signature in database
GPG key ID: A519480096146526
11 changed files with 504 additions and 27 deletions

View file

@ -166,6 +166,9 @@ func (m *ConnectResponse) GetMaster() *Master {
type Node struct {
ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Addr string `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"`
PrivateKey string `protobuf:"bytes,3,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"`
ListenPort uint64 `protobuf:"varint,4,opt,name=listen_port,json=listenPort,proto3" json:"listen_port,omitempty"`
GatewayAddress string `protobuf:"bytes,5,opt,name=gateway_address,json=gatewayAddress,proto3" json:"gateway_address,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@ -209,6 +212,27 @@ func (m *Node) GetAddr() string {
return ""
}
func (m *Node) GetPrivateKey() string {
if m != nil {
return m.PrivateKey
}
return ""
}
func (m *Node) GetListenPort() uint64 {
if m != nil {
return m.ListenPort
}
return 0
}
func (m *Node) GetGatewayAddress() string {
if m != nil {
return m.GatewayAddress
}
return ""
}
type NodesRequest struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@ -277,6 +301,68 @@ func (m *NodesResponse) GetNodes() []*Node {
return nil
}
type Peer struct {
PrivateKey string `protobuf:"bytes,1,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"`
PublicKey string `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
AllowedIPs []string `protobuf:"bytes,3,rep,name=allowed_ips,json=allowedIps,proto3" json:"allowed_ips,omitempty"`
Endpoint string `protobuf:"bytes,4,opt,name=endpoint,proto3" json:"endpoint,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Peer) Reset() { *m = Peer{} }
func (m *Peer) String() string { return proto.CompactTextString(m) }
func (*Peer) ProtoMessage() {}
func (*Peer) Descriptor() ([]byte, []int) {
return fileDescriptor_b6184fc395da86b1, []int{6}
}
func (m *Peer) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Peer.Unmarshal(m, b)
}
func (m *Peer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Peer.Marshal(b, m, deterministic)
}
func (m *Peer) XXX_Merge(src proto.Message) {
xxx_messageInfo_Peer.Merge(m, src)
}
func (m *Peer) XXX_Size() int {
return xxx_messageInfo_Peer.Size(m)
}
func (m *Peer) XXX_DiscardUnknown() {
xxx_messageInfo_Peer.DiscardUnknown(m)
}
var xxx_messageInfo_Peer proto.InternalMessageInfo
func (m *Peer) GetPrivateKey() string {
if m != nil {
return m.PrivateKey
}
return ""
}
func (m *Peer) GetPublicKey() string {
if m != nil {
return m.PublicKey
}
return ""
}
func (m *Peer) GetAllowedIPs() []string {
if m != nil {
return m.AllowedIPs
}
return nil
}
func (m *Peer) GetEndpoint() string {
if m != nil {
return m.Endpoint
}
return ""
}
func init() {
proto.RegisterType((*Master)(nil), "io.stellarproject.heimdall.api.v1.Master")
proto.RegisterType((*ConnectRequest)(nil), "io.stellarproject.heimdall.api.v1.ConnectRequest")
@ -284,6 +370,7 @@ func init() {
proto.RegisterType((*Node)(nil), "io.stellarproject.heimdall.api.v1.Node")
proto.RegisterType((*NodesRequest)(nil), "io.stellarproject.heimdall.api.v1.NodesRequest")
proto.RegisterType((*NodesResponse)(nil), "io.stellarproject.heimdall.api.v1.NodesResponse")
proto.RegisterType((*Peer)(nil), "io.stellarproject.heimdall.api.v1.Peer")
}
func init() {
@ -291,31 +378,39 @@ func init() {
}
var fileDescriptor_b6184fc395da86b1 = []byte{
// 375 bytes of a gzipped FileDescriptorProto
0x1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5c, 0x7c, 0xd1, 0x35, 0xfc, 0xef, 0x6a, 0x97, 0xc1, 0x1b,
0x38, 0x2b, 0x0c, 0x10, 0x7a, 0xc3, 0xfa, 0xc8, 0x9f, 0x9c, 0x9f, 0x10, 0x81, 0x69, 0x40, 0xac,
0x2a, 0xfa, 0xe9, 0x41, 0x63, 0x81, 0xf8, 0x60, 0x26, 0xef, 0xc1, 0x4c, 0xcf, 0x00, 0xc4, 0x76,
0xc5, 0x68, 0xf6, 0xc7, 0xfb, 0xb4, 0x2d, 0x62, 0xae, 0x13, 0xf0, 0x53, 0xc6, 0xf8, 0x1d, 0xe6,
0x4b, 0x2a, 0x54, 0x58, 0x1f, 0xd6, 0x47, 0xed, 0x59, 0xf7, 0x78, 0x18, 0xc0, 0xd4, 0xc2, 0xf3,
0x85, 0x22, 0xe0, 0x28, 0x73, 0xa1, 0x82, 0x3e, 0xb4, 0xb0, 0xc8, 0x05, 0xa7, 0x85, 0x0d, 0xa8,
0x4d, 0xaa, 0x7a, 0xf2, 0x1d, 0x5a, 0xef, 0x9d, 0xe9, 0x40, 0xc0, 0x7f, 0xee, 0xdd, 0x83, 0xf1,
0x09, 0xc3, 0xdd, 0xff, 0x6e, 0xfd, 0xc9, 0xbf, 0x48, 0x6c, 0xa4, 0xb3, 0xf8, 0xf3, 0x8b, 0x93,
0x57, 0xf5, 0xf5, 0x6e, 0xbc, 0x6a, 0x96, 0xcb, 0xf6, 0xf2, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff,
0x41, 0x0d, 0xf8, 0xa1, 0xe1, 0x03, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.

View file

@ -32,6 +32,9 @@ message ConnectResponse {
message Node {
string id = 1 [(gogoproto.customname) = "ID"];
string addr = 2;
string private_key = 3;
uint64 listen_port = 4;
string gateway_address = 5;
}
message NodesRequest {}
@ -39,3 +42,10 @@ message NodesRequest {}
message NodesResponse {
repeated Node nodes = 1;
}
message Peer {
string private_key = 1;
string public_key = 2;
repeated string allowed_ips = 3 [(gogoproto.customname) = "AllowedIPs"];
string endpoint = 4;
}