mirror of
https://github.com/cedar2025/hysteria.git
synced 2025-09-12 03:14:33 +00:00
feat: provide HYSTERIA_ACME_DIR to control acme data directory
This commit is contained in:
@@ -24,6 +24,7 @@ const (
|
||||
appLogLevelEnv = "HYSTERIA_LOG_LEVEL"
|
||||
appLogFormatEnv = "HYSTERIA_LOG_FORMAT"
|
||||
appDisableUpdateCheckEnv = "HYSTERIA_DISABLE_UPDATE_CHECK"
|
||||
appACMEDirEnv = "HYSTERIA_ACME_DIR"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@@ -232,7 +232,11 @@ func (c *serverConfig) fillTLSConfig(hyConfig *server.Config) error {
|
||||
// ACME
|
||||
dataDir := c.ACME.Dir
|
||||
if dataDir == "" {
|
||||
dataDir = "acme"
|
||||
// If not specified in the config, check the environment variable
|
||||
// before resorting to the default "acme" value. The main reason
|
||||
// we have this is so that our setup script can set it to the
|
||||
// user's home directory.
|
||||
dataDir = envOrDefaultString(appACMEDirEnv, "acme")
|
||||
}
|
||||
cmCfg := &certmagic.Config{
|
||||
RenewalWindowRatio: certmagic.DefaultRenewalWindowRatio,
|
||||
|
Reference in New Issue
Block a user