Browse Source

Add new server flag.

pull/242/head
Evan Theurer 11 years ago
parent
commit
3f4642d49a
  1. 2
      server.conf.in
  2. 18
      src/app/spreed-webrtc-server/config.go

2
server.conf.in

@ -57,6 +57,8 @@ listen = 127.0.0.1:8080
; See http://tools.ietf.org/html/draft-uberti-behave-turn-rest-00 for details. ; See http://tools.ietf.org/html/draft-uberti-behave-turn-rest-00 for details.
; A supported TURN server is https://code.google.com/p/rfc5766-turn-server/. ; A supported TURN server is https://code.google.com/p/rfc5766-turn-server/.
;turnSecret = the-default-turn-shared-secret-do-not-keep ;turnSecret = the-default-turn-shared-secret-do-not-keep
; Enable adding TURN servers inside of the clientside webui under settings
;turnURIsClientSideSetable = false
; Enable renegotiation support. Set to true to tell clients that they can ; Enable renegotiation support. Set to true to tell clients that they can
; renegotiate peer connections when required. Firefox support is not complete, ; renegotiate peer connections when required. Firefox support is not complete,
; so do not enable if you want compatibility with Firefox clients. ; so do not enable if you want compatibility with Firefox clients.

18
src/app/spreed-webrtc-server/config.go

@ -39,6 +39,7 @@ type Config struct {
Renegotiation bool // Renegotiation flag Renegotiation bool // Renegotiation flag
StunURIs []string // STUN server URIs StunURIs []string // STUN server URIs
TurnURIs []string // TURN server URIs TurnURIs []string // TURN server URIs
TurnURIsClientSideSetable bool // Enable TURN server customization under settings in web ui
Tokens bool // True when we got a tokens file Tokens bool // True when we got a tokens file
Version string // Server version number Version string // Server version number
UsersEnabled bool // Flag if users are enabled UsersEnabled bool // Flag if users are enabled
@ -108,14 +109,15 @@ func NewConfig(container phoenix.Container, tokens bool) *Config {
log.Println("Enabled modules:", modules) log.Println("Enabled modules:", modules)
return &Config{ return &Config{
Title: container.GetStringDefault("app", "title", "Spreed WebRTC"), Title: container.GetStringDefault("app", "title", "Spreed WebRTC"),
ver: ver, ver: ver,
S: fmt.Sprintf("static/ver=%s", ver), S: fmt.Sprintf("static/ver=%s", ver),
B: basePath, B: basePath,
Token: serverToken, Token: serverToken,
Renegotiation: container.GetBoolDefault("app", "renegotiation", false), Renegotiation: container.GetBoolDefault("app", "renegotiation", false),
StunURIs: stunURIs, StunURIs: stunURIs,
TurnURIs: turnURIs, TurnURIs: turnURIs,
TurnURIsClientSideSetable: container.GetBoolDefault("app", "turnClientSideSetable", true),
Tokens: tokens, Tokens: tokens,
Version: version, Version: version,
UsersEnabled: container.GetBoolDefault("users", "enabled", false), UsersEnabled: container.GetBoolDefault("users", "enabled", false),

Loading…
Cancel
Save