add interface filter config (#502)

* add interface filter config

* Update config-sample.yaml

Co-authored-by: David Zhao <david@davidzhao.com>

* better description

Co-authored-by: David Zhao <david@davidzhao.com>
This commit is contained in:
cnderrauber
2022-03-11 14:08:41 +08:00
committed by GitHub
co-authored by David Zhao
parent cd2a7c2447
commit e4c321de02
3 changed files with 51 additions and 10 deletions
+15 -9
View File
@@ -46,15 +46,16 @@ type Config struct {
}
type RTCConfig struct {
UDPPort uint32 `yaml:"udp_port,omitempty"`
TCPPort uint32 `yaml:"tcp_port,omitempty"`
ICEPortRangeStart uint32 `yaml:"port_range_start,omitempty"`
ICEPortRangeEnd uint32 `yaml:"port_range_end,omitempty"`
NodeIP string `yaml:"node_ip,omitempty"`
STUNServers []string `yaml:"stun_servers,omitempty"`
TURNServers []TURNServer `yaml:"turn_servers,omitempty"`
UseExternalIP bool `yaml:"use_external_ip"`
UseICELite bool `yaml:"use_ice_lite,omitempty"`
UDPPort uint32 `yaml:"udp_port,omitempty"`
TCPPort uint32 `yaml:"tcp_port,omitempty"`
ICEPortRangeStart uint32 `yaml:"port_range_start,omitempty"`
ICEPortRangeEnd uint32 `yaml:"port_range_end,omitempty"`
NodeIP string `yaml:"node_ip,omitempty"`
STUNServers []string `yaml:"stun_servers,omitempty"`
TURNServers []TURNServer `yaml:"turn_servers,omitempty"`
UseExternalIP bool `yaml:"use_external_ip"`
UseICELite bool `yaml:"use_ice_lite,omitempty"`
Interfaces InterfacesConfig `yaml:"interfaces"`
// Number of packets to buffer for NACK
PacketBufferSize int `yaml:"packet_buffer_size,omitempty"`
@@ -92,6 +93,11 @@ type CongestionControlConfig struct {
ProbeMode CongestionControlProbeMode `yaml:"padding_mode,omitempty"`
}
type InterfacesConfig struct {
Includes []string `yaml:"includes"`
Excludes []string `yaml:"excludes"`
}
type AudioConfig struct {
// minimum level to be considered active, 0-127, where 0 is loudest
ActiveLevel uint8 `yaml:"active_level"`