mirror of
https://github.com/gravitl/netmaker.git
synced 2025-09-12 08:04:25 +08:00
add turn config to host model
This commit is contained in:
parent
91b4d237c8
commit
851fdbfee1
3 changed files with 14 additions and 8 deletions
|
@ -97,6 +97,8 @@ func GetProxyUpdateForHost(ctx context.Context, host *models.Host) (models.Proxy
|
|||
Proxy: peerHost.ProxyEnabled,
|
||||
PublicListenPort: int32(GetPeerListenPort(peerHost)),
|
||||
ProxyListenPort: GetProxyListenPort(peerHost),
|
||||
ShouldUseTurn: peerHost.ShouldUseTurn,
|
||||
TurnRelayAddr: peerHost.TurnRelayAddr,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -54,6 +54,8 @@ type Host struct {
|
|||
Interfaces []Iface `json:"interfaces" yaml:"interfaces"`
|
||||
DefaultInterface string `json:"defaultinterface" yaml:"defaultinterface"`
|
||||
EndpointIP net.IP `json:"endpointip" yaml:"endpointip"`
|
||||
ShouldUseTurn bool `json:"should_use_turn" yaml:"should_use_turn"`
|
||||
TurnRelayAddr net.PacketConn `json:"turn_relay_addr" yaml:"turn_relay_addr"`
|
||||
ProxyEnabled bool `json:"proxy_enabled" yaml:"proxy_enabled"`
|
||||
ProxyEnabledSet bool `json:"proxy_enabled_updated" yaml:"proxy_enabled_updated"`
|
||||
IsDocker bool `json:"isdocker" yaml:"isdocker"`
|
||||
|
|
|
@ -35,14 +35,16 @@ type RelayedConf struct {
|
|||
|
||||
// PeerConf - struct for peer config in the network
|
||||
type PeerConf struct {
|
||||
Proxy bool `json:"proxy"`
|
||||
PublicListenPort int32 `json:"public_listen_port"`
|
||||
ProxyListenPort int `json:"proxy_listen_port"`
|
||||
IsExtClient bool `json:"is_ext_client"`
|
||||
Address net.IP `json:"address"`
|
||||
ExtInternalIp net.IP `json:"ext_internal_ip"`
|
||||
IsRelayed bool `json:"is_relayed"`
|
||||
RelayedTo *net.UDPAddr `json:"relayed_to"`
|
||||
Proxy bool `json:"proxy"`
|
||||
PublicListenPort int32 `json:"public_listen_port"`
|
||||
ProxyListenPort int `json:"proxy_listen_port"`
|
||||
IsExtClient bool `json:"is_ext_client"`
|
||||
Address net.IP `json:"address"`
|
||||
ExtInternalIp net.IP `json:"ext_internal_ip"`
|
||||
IsRelayed bool `json:"is_relayed"`
|
||||
RelayedTo *net.UDPAddr `json:"relayed_to"`
|
||||
ShouldUseTurn bool `json:"should_use_turn"`
|
||||
TurnRelayAddr net.PacketConn `json:"turn_relay_addr"`
|
||||
}
|
||||
|
||||
// ProxyManagerPayload - struct for proxy manager payload
|
||||
|
|
Loading…
Add table
Reference in a new issue