Reduce cache time and Remove chown
This commit is contained in:
@ -15,7 +15,7 @@ import (
|
||||
const (
|
||||
listenAddr = "127.0.0.1:28262"
|
||||
usersFile = "/etc/hysteria/users.json"
|
||||
cacheTTL = 15 * time.Second
|
||||
cacheTTL = 5 * time.Second
|
||||
)
|
||||
|
||||
type User struct {
|
||||
|
||||
@ -15,7 +15,6 @@ compile_auth_binary() {
|
||||
go mod init hysteria-auth >/dev/null 2>&1
|
||||
go mod tidy >/dev/null 2>&1
|
||||
if go build -o user_auth .; then
|
||||
chown hysteria:hysteria user_auth
|
||||
chmod +x user_auth
|
||||
echo "Authentication binary compiled successfully."
|
||||
else
|
||||
|
||||
@ -48,8 +48,7 @@ After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=hysteria
|
||||
Group=hysteria
|
||||
User=root
|
||||
ExecStart=/etc/hysteria/core/scripts/auth/user_auth
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
|
||||
Reference in New Issue
Block a user