-
Notifications
You must be signed in to change notification settings - Fork 0
/
constant.go
33 lines (24 loc) · 859 Bytes
/
constant.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package main
const PORT = 8080
const PORT_SECURE = 8443
const SERVE_SECURE = true
// EMAIL_RGX will only fit 99% of all emails...
const EMAIL_RGX = `(?i)[A-Z0-9._%+-]+@(?:[A-Z0-9-]+\.)+[A-Z]{2,6}`
const INVALID_ROOM = 9
const STUN = "stun:stun.l.google.com:19302"
const TURN = "" //"turn:turn.votebin.com:3478"
/*
func getStunServers() []byte {
return []byte(fmt.Sprintf(`{"event":"stunservers","data":[{"url": "%s"}]}`, STUN))
}
func getTurnServers() []byte {
{ "url": "turn:your.turn.server.here",
"secret": "turnserversharedsecret",
"expiry": 86400 }
{ "url": "turn:your.turn.server.here",
"credential": "turnserversharedsecret",
"username": 86400 }
// From secret generate credential and push over
// Also need to add credential information if has turnserver
return []byte(`{"event":"turnservers","data":[]}`)
}*/