mirror of
https://github.com/ergochat/ergo.git
synced 2025-12-20 02:00:11 -08:00
TLS support
This commit is contained in:
parent
e625f62baa
commit
db0f494604
4 changed files with 38 additions and 9 deletions
|
|
@ -7,7 +7,7 @@ import (
|
|||
|
||||
type Config struct {
|
||||
Name string
|
||||
Listen string
|
||||
Listeners []ListenerConfig
|
||||
Password string
|
||||
Operators []OperatorConfig
|
||||
Debug map[string]bool
|
||||
|
|
@ -18,6 +18,16 @@ type OperatorConfig struct {
|
|||
Password string
|
||||
}
|
||||
|
||||
type ListenerConfig struct {
|
||||
Address string
|
||||
Key string
|
||||
Certificate string
|
||||
}
|
||||
|
||||
func (config *ListenerConfig) IsTLS() bool {
|
||||
return (config.Key != "") && (config.Certificate != "")
|
||||
}
|
||||
|
||||
func LoadConfig() (config *Config, err error) {
|
||||
config = &Config{}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue