accounts/config/account.yaml
2026-01-23 23:16:37 +08:00

96 lines
2.0 KiB
YAML

mode: "server-agent"
log:
level: info
auth:
enable: true
token:
# Fixed token authentication mechanism
publicToken: "xcontrol-public-token-2024"
refreshSecret: "xcontrol-refresh-secret-2024"
accessSecret: "xcontrol-access-secret-2024"
accessExpiry: "1h"
refreshExpiry: "168h"
server:
addr: ":8080"
readTimeout: 15s
writeTimeout: 15s
publicUrl: "https://accounts.svc.plus"
allowedOrigins:
- "https://dev.svc.plus"
- "https://dev-homepage.svc.plus"
- "https://www.svc.plus"
- "https://global-homepage.svc.plus"
- "https://accounts.svc.plus"
- "https://localhost:8443"
- "http://localhost:8080"
- "http://127.0.0.1:8080"
- "http://localhost:3001"
- "http://127.0.0.1:3001"
- "http://localhost:3000"
- "http://127.0.0.1:3000"
tls:
enabled: false
certFile: ""
keyFile: ""
caFile: ""
clientCAFile: ""
redirectHttp: false
store:
driver: "postgres"
dsn: "postgres://shenlan:password@127.0.0.1:5432/account?sslmode=disable"
maxOpenConns: 30
maxIdleConns: 10
session:
ttl: 24h
cache: "redis"
redis:
addr: "127.0.0.1:6379"
password: ""
smtp:
host: "smtp.example.com"
port: 587
username: "apikey"
p: "s"
from: "XControl Account <no-reply@example.com>"
replyTo: ""
timeout: 10s
tls:
mode: "auto"
insecureSkipVerify: false
xray:
sync:
enabled: false
interval: 5m
outputPath: "/usr/local/etc/xray/config.json"
templatePath: "account/config/xray.config.template.json"
validateCommand: []
restartCommand:
- "systemctl"
- "restart"
- "xray.service"
agent:
id: "account-primary"
controllerUrl: "http://127.0.0.1:8080"
apiToken: "replace-with-agent-token"
httpTimeout: 15s
statusInterval: 1m
syncInterval: 5m
tls:
insecureSkipVerify: false
agents:
credentials:
- id: "account-primary"
name: "Account Server (local agent)"
token: "replace-with-agent-token"
groups:
- "default"