mirror of
https://github.com/giongto35/cloud-game.git
synced 2026-07-24 10:37:11 +00:00
* Config STUN by server * Move ice timeout log under condition * STUN TURN defaut when give empty string * Update git ignore to ignore prod file * Update readme
19 lines
765 B
Go
19 lines
765 B
Go
package config
|
|
|
|
import (
|
|
"flag"
|
|
"time"
|
|
)
|
|
|
|
const defaultoverlord = "ws://localhost:9000/wso"
|
|
const DefaultSTUNTURN = `[{"urls":"stun:stun-turn.webgame2d.com:3478"},{"urls":"turn:stun-turn.webgame2d.com:3478","username":"root","credential":"root"}]`
|
|
|
|
var IsDebug = flag.Bool("debug", false, "Is game running in debug mode?")
|
|
var OverlordHost = flag.String("overlordhost", defaultoverlord, "Specify the path for overlord. If the flag is `overlord`, the server will be run as overlord")
|
|
var Port = flag.String("port", "8000", "Port of the game")
|
|
var IsMonitor = flag.Bool("monitor", false, "Turn on monitor")
|
|
var FrontendSTUNTURN = flag.String("stunturn", DefaultSTUNTURN, "Frontend STUN TURN servers")
|
|
|
|
var Width = 256
|
|
var Height = 240
|
|
var WSWait = 20 * time.Second
|