mirror of
https://github.com/proxysu/ProxySU.git
synced 2024-11-25 22:56:09 +03:00
43 lines
837 B
C#
43 lines
837 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace ProxySuper.Core.Models
|
|
{
|
|
public static class Caddy
|
|
{
|
|
public static string Service = @"
|
|
[Unit]
|
|
Description=Caddy
|
|
Documentation=https://caddyserver.com/docs/
|
|
After=network.target network-online.target
|
|
Requires=network-online.target
|
|
|
|
[Service]
|
|
#User=caddy
|
|
#Group=caddy
|
|
User=root
|
|
Group=root
|
|
ExecStart=/usr/bin/caddy run --environ --config /etc/caddy/Caddyfile
|
|
ExecReload=/usr/bin/caddy reload --config /etc/caddy/Caddyfile
|
|
TimeoutStopSec=5s
|
|
#LimitNOFILE=1048576
|
|
#LimitNPROC=512
|
|
PrivateTmp=true
|
|
ProtectSystem=full
|
|
#AmbientCapabilities=CAP_NET_BIND_SERVICE
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|
|
";
|
|
|
|
public static string DefaultCaddyFile = @"
|
|
:80 {
|
|
respond ""Hello world!"";
|
|
}
|
|
";
|
|
}
|
|
}
|