Files
EdgeNode/internal/configs/protocol_udp_config.go
2020-07-21 11:18:47 +08:00

15 lines
364 B
Go

package configs
type UDPProtocolConfig struct {
IsOn bool `yaml:"isOn"` // 是否开启
Listen []string `yaml:"listen" json:"listen"` // 监听地址
}
func (this *UDPProtocolConfig) Addresses() []string {
result := []string{}
for _, listen := range this.Listen {
result = append(result, ProtocolUDP+"://"+listen)
}
return result
}