mirror of
https://github.com/jech/galene.git
synced 2024-11-26 02:25:58 +01:00
Implement command-line option "relay-only".
This commit is contained in:
parent
a0418d26ec
commit
89a9e6c738
2 changed files with 6 additions and 0 deletions
|
@ -39,6 +39,8 @@ func main() {
|
|||
flag.StringVar(&mutexprofile, "mutexprofile", "",
|
||||
"store mutex profile in `file`")
|
||||
flag.BoolVar(&group.UseMDNS, "mdns", false, "gather mDNS addresses")
|
||||
flag.BoolVar(&group.ICERelayOnly, "relay-only", false,
|
||||
"require use of TURN relays for all media traffic")
|
||||
flag.Parse()
|
||||
|
||||
if cpuprofile != "" {
|
||||
|
|
|
@ -22,6 +22,7 @@ type RTCConfiguration struct {
|
|||
}
|
||||
|
||||
var ICEFilename string
|
||||
var ICERelayOnly bool
|
||||
|
||||
var iceConf RTCConfiguration
|
||||
var iceOnce sync.Once
|
||||
|
@ -44,6 +45,9 @@ func ICEConfiguration() *RTCConfiguration {
|
|||
iceConf = RTCConfiguration{
|
||||
ICEServers: iceServers,
|
||||
}
|
||||
if ICERelayOnly {
|
||||
iceConf.ICETransportPolicy = "relay"
|
||||
}
|
||||
})
|
||||
|
||||
return &iceConf
|
||||
|
|
Loading…
Reference in a new issue