2020-10-11 21:11:30 +00:00
|
|
|
package config
|
|
|
|
|
2020-10-17 10:07:39 +00:00
|
|
|
import (
|
|
|
|
"time"
|
|
|
|
|
|
|
|
"github.com/lestrrat-go/backoff"
|
|
|
|
)
|
|
|
|
|
2020-10-11 21:11:30 +00:00
|
|
|
var ServerName string = "Hoernschen's Matrix Server"
|
|
|
|
var Version string = "0.1"
|
|
|
|
|
|
|
|
var Homeserver string
|
|
|
|
var Port string
|
|
|
|
|
|
|
|
var PrivateKey []byte
|
|
|
|
var PublicKey []byte
|
|
|
|
var KeyId string
|
|
|
|
var VerifyKeys map[string]map[string][]byte
|
|
|
|
|
2020-10-17 10:07:39 +00:00
|
|
|
var Packetloss int
|
|
|
|
var UnavailableTill int64
|
|
|
|
var Consensus bool
|
2020-10-11 21:11:30 +00:00
|
|
|
var AuthentificationCheck bool
|
|
|
|
var Signing bool
|
|
|
|
var Encryption bool
|
|
|
|
var HttpString string
|
2020-10-17 10:07:39 +00:00
|
|
|
|
|
|
|
var BackoffPolicy *backoff.Exponential
|
|
|
|
|
|
|
|
func SetDefaultParams() {
|
|
|
|
Packetloss = 0.0
|
|
|
|
UnavailableTill = time.Now().Unix()
|
|
|
|
Consensus = true
|
|
|
|
AuthentificationCheck = true
|
|
|
|
Signing = true
|
|
|
|
Encryption = true
|
|
|
|
HttpString = "https"
|
|
|
|
}
|