[Unit] Description=Domain-only OpenAI routing via the existing Codex proxy Wants=network-online.target xray@codex.service After=network-online.target xray@codex.service docker.service StartLimitIntervalSec=60 StartLimitBurst=5 [Service] Type=exec User=openai-router Group=openai-router StateDirectory=openai-domain-router StateDirectoryMode=0700 RuntimeDirectory=openai-domain-router RuntimeDirectoryMode=0750 WorkingDirectory=/var/lib/openai-domain-router ExecStartPre=+/usr/local/libexec/openai-domain-router-build ExecStartPre=/opt/openai-domain-router/current/sing-box check -c /run/openai-domain-router/config.json ExecStart=/opt/openai-domain-router/current/sing-box run -c /run/openai-domain-router/config.json ExecStartPost=+/usr/local/libexec/openai-domain-router-network apply ExecStopPost=+/usr/local/libexec/openai-domain-router-network remove Restart=on-failure RestartSec=3 TimeoutStartSec=20 TimeoutStopSec=15 NoNewPrivileges=yes PrivateTmp=yes PrivateDevices=yes ProtectSystem=strict ProtectHome=yes ProtectKernelTunables=yes ProtectKernelModules=yes ProtectControlGroups=yes RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX AF_NETLINK UMask=0077 [Install] WantedBy=multi-user.target