From 9f358d47938420717fe9d63dc669cbe7ab3f7991 Mon Sep 17 00:00:00 2001 From: Koro Date: Sun, 3 Jul 2022 15:07:57 -0400 Subject: [PATCH] Add socket mode to configuration struct. --- server/config.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/config.go b/server/config.go index e34eefb..90597f2 100644 --- a/server/config.go +++ b/server/config.go @@ -1,12 +1,14 @@ package server import ( + "io/fs" "time" ) // Defines default config settings (excluding limits, see below) const ( DefaultListenHTTP = ":80" + DefaultListenUnixMode = 0777 DefaultCacheDuration = 12 * time.Hour DefaultKeepaliveInterval = 45 * time.Second // Not too frequently to save battery (Android read timeout used to be 77s!) DefaultManagerInterval = time.Minute @@ -52,6 +54,7 @@ type Config struct { ListenHTTP string ListenHTTPS string ListenUnix string + ListenUnixMode fs.FileMode KeyFile string CertFile string FirebaseKeyFile string @@ -105,6 +108,7 @@ func NewConfig() *Config { ListenHTTP: DefaultListenHTTP, ListenHTTPS: "", ListenUnix: "", + ListenUnixMode: DefaultListenUnixMode, KeyFile: "", CertFile: "", FirebaseKeyFile: "",