mirror of
https://github.com/SagerNet/sing-box.git
synced 2024-12-27 17:05:38 +08:00
Fix reloading of tls.certificate_path, tls.key_path and tls.ech.key_path
This commit is contained in:
parent
97c47e72c4
commit
1d81996ceb
|
@ -98,7 +98,7 @@ func (c *echServerConfig) startWatcher() error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
c.watcher = watcher
|
c.watcher = watcher
|
||||||
return nil
|
return c.watcher.Start()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *echServerConfig) credentialsUpdated(path string) error {
|
func (c *echServerConfig) credentialsUpdated(path string) error {
|
||||||
|
@ -232,7 +232,7 @@ func NewECHServer(ctx context.Context, logger log.Logger, options option.Inbound
|
||||||
var echKey []byte
|
var echKey []byte
|
||||||
if len(options.ECH.Key) > 0 {
|
if len(options.ECH.Key) > 0 {
|
||||||
echKey = []byte(strings.Join(options.ECH.Key, "\n"))
|
echKey = []byte(strings.Join(options.ECH.Key, "\n"))
|
||||||
} else if options.KeyPath != "" {
|
} else if options.ECH.KeyPath != "" {
|
||||||
content, err := os.ReadFile(options.ECH.KeyPath)
|
content, err := os.ReadFile(options.ECH.KeyPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, E.Cause(err, "read ECH key")
|
return nil, E.Cause(err, "read ECH key")
|
||||||
|
|
|
@ -107,7 +107,7 @@ func (c *STDServerConfig) startWatcher() error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
c.watcher = watcher
|
c.watcher = watcher
|
||||||
return nil
|
return c.watcher.Start()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *STDServerConfig) certificateUpdated(path string) error {
|
func (c *STDServerConfig) certificateUpdated(path string) error {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user