mirror of
https://github.com/m1k1o/neko.git
synced 2025-06-06 21:04:11 +02:00
code fmt change.
This commit is contained in:
parent
00fc3afcd7
commit
d7671942a6
10 changed files with 54 additions and 52 deletions
|
@ -13,6 +13,15 @@ import (
|
|||
"demodesk/neko/internal/utils"
|
||||
)
|
||||
|
||||
// default port range - min
|
||||
const defEprMin = 59000
|
||||
|
||||
// default port range - max
|
||||
const defEprMax = 59100
|
||||
|
||||
// default stun server
|
||||
const defStunSrv = "stun:stun.l.google.com:19302"
|
||||
|
||||
type WebRTC struct {
|
||||
ICELite bool
|
||||
ICETrickle bool
|
||||
|
@ -24,12 +33,6 @@ type WebRTC struct {
|
|||
IpRetrievalUrl string
|
||||
}
|
||||
|
||||
const (
|
||||
defEprMin = 59000
|
||||
defEprMax = 59100
|
||||
defStun = "stun:stun.l.google.com:19302"
|
||||
)
|
||||
|
||||
func (WebRTC) Init(cmd *cobra.Command) error {
|
||||
cmd.PersistentFlags().Bool("webrtc.icelite", false, "configures whether or not the ICE agent should be a lite agent")
|
||||
if err := viper.BindPFlag("webrtc.icelite", cmd.PersistentFlags().Lookup("webrtc.icelite")); err != nil {
|
||||
|
@ -76,7 +79,7 @@ func (s *WebRTC) Set() {
|
|||
|
||||
if len(s.ICEServers) == 0 {
|
||||
s.ICEServers = append(s.ICEServers, types.ICEServer{
|
||||
URLs: []string{defStun},
|
||||
URLs: []string{defStunSrv},
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue