init
This commit is contained in:
49 files changed
+4041
No files matched your search
@@ -0,0 +1,39 @@
|
||||
[Unit]
|
||||
Description=Ask53 AI question service over DNS
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
StartLimitIntervalSec=60
|
||||
StartLimitBurst=5
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=ask53
|
||||
Group=ask53
|
||||
WorkingDirectory=/var/lib/ask53
|
||||
ExecStart=/usr/local/bin/ask53 -config /etc/ask53/config.json
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
TimeoutStopSec=20
|
||||
StateDirectory=ask53
|
||||
StateDirectoryMode=0700
|
||||
UMask=0077
|
||||
AmbientCapabilities=CAP_NET_BIND_SERVICE
|
||||
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
|
||||
NoNewPrivileges=true
|
||||
ProtectSystem=strict
|
||||
ProtectHome=true
|
||||
PrivateTmp=true
|
||||
PrivateDevices=true
|
||||
ProtectKernelTunables=true
|
||||
ProtectKernelModules=true
|
||||
ProtectControlGroups=true
|
||||
RestrictSUIDSGID=true
|
||||
RestrictRealtime=true
|
||||
LockPersonality=true
|
||||
RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
|
||||
MemoryMax=256M
|
||||
TasksMax=256
|
||||
LimitNOFILE=1024
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"listen": "0.0.0.0:53",
|
||||
"admin_listen": "127.0.0.1:9090",
|
||||
"allowed_cidrs": ["127.0.0.0/8", "::1/128", "198.51.100.42/32"],
|
||||
"udp_mode": "tcp-only",
|
||||
"zone": "",
|
||||
"ai_endpoint": "https://api.openai.com/v1/chat/completions",
|
||||
"model": "REPLACE_WITH_YOUR_PROVIDER_MODEL",
|
||||
"api_key_file": "/etc/ask53/api-key",
|
||||
"token_field": "max_completion_tokens",
|
||||
"max_tokens": 128,
|
||||
"ai_timeout": "8s",
|
||||
"request_timeout": "9s",
|
||||
"shutdown_timeout": "12s",
|
||||
"cache_ttl": "1h",
|
||||
"failure_ttl": "5s",
|
||||
"cache_entries": 4096,
|
||||
"max_answer_bytes": 256,
|
||||
"max_inflight": 8,
|
||||
"max_handlers": 128,
|
||||
"max_tcp_connections": 128,
|
||||
"client_entries": 4096,
|
||||
"client_idle_ttl": "10m",
|
||||
"ingress_rate": {"per_second": 200, "burst": 400},
|
||||
"client_rate": {"per_second": 10, "burst": 20},
|
||||
"ai_rate": {"per_second": 1, "burst": 4},
|
||||
"client_ai_rate": {"per_second": 0.1, "burst": 2},
|
||||
"daily_calls": 100,
|
||||
"budget_file": "/var/lib/ask53/budget.json",
|
||||
"circuit_failures": 3,
|
||||
"circuit_cooldown": "30s",
|
||||
"tcp_idle_timeout": "5s"
|
||||
}
|
||||
Reference in new issue
Block a user