mirror of
https://github.com/ergochat/ergo.git
synced 2025-12-20 02:00:11 -08:00
WebSocket support
This commit is contained in:
parent
a83dc6e10d
commit
f5930444f7
31 changed files with 3860 additions and 5 deletions
|
|
@ -50,9 +50,10 @@ type TLSListenConfig struct {
|
|||
|
||||
// This is the YAML-deserializable type of the value of the `Server.Listeners` map
|
||||
type listenerConfigBlock struct {
|
||||
TLS TLSListenConfig
|
||||
Tor bool
|
||||
STSOnly bool `yaml:"sts-only"`
|
||||
TLS TLSListenConfig
|
||||
Tor bool
|
||||
STSOnly bool `yaml:"sts-only"`
|
||||
WebSocket bool
|
||||
}
|
||||
|
||||
// listenerConfig is the config governing a particular listener (bound address),
|
||||
|
|
@ -62,6 +63,7 @@ type listenerConfig struct {
|
|||
Tor bool
|
||||
STSOnly bool
|
||||
ProxyBeforeTLS bool
|
||||
WebSocket bool
|
||||
}
|
||||
|
||||
type PersistentStatus uint
|
||||
|
|
@ -778,6 +780,7 @@ func (conf *Config) prepareListeners() (err error) {
|
|||
lconf.TLSConfig = tlsConfig
|
||||
lconf.ProxyBeforeTLS = block.TLS.Proxy
|
||||
}
|
||||
lconf.WebSocket = block.WebSocket
|
||||
conf.Server.trueListeners[addr] = lconf
|
||||
}
|
||||
return nil
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue