From 534eb0155a8c780af041160bad67988bb5131af4 Mon Sep 17 00:00:00 2001 From: NewName Date: Mon, 12 Aug 2024 05:21:21 +0800 Subject: [PATCH] Update README.md --- tmp/README.md | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/tmp/README.md b/tmp/README.md index 71e1d3f..6a2cacd 100644 --- a/tmp/README.md +++ b/tmp/README.md @@ -33,18 +33,20 @@ rm -f /usr/local/bin/xray rm -rf /usr/local/etc/xray ``` +--- +--- -### 自托管脚本 -创建脚本文件 +## 自托管脚本 +- 创建脚本文件 ``` mkdir -p /var/www && touch /var/www/shell.sh && chmod 644 /var/www/shell.sh ``` -一键安装caddy +- 一键安装caddy ``` sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https curl && curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg && curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list && sudo apt update && sudo apt install -y caddy ``` -`/etc/caddy/Caddyfile`写入配置文件 +- `/etc/caddy/Caddyfile`写入配置文件 > 也可以直接使用域名 ``` @@ -53,21 +55,21 @@ http://IP:80 { file_server } ``` -启动运行 +- 启动运行 ``` sudo systemctl restart caddy ``` -查看状态 +- 查看状态 ``` systemctl status caddy ``` -停止和卸载 +- 停止和卸载 ``` sudo systemctl stop caddy && sudo apt-get purge --auto-remove caddy ``` -用户远程运行脚本 +- 用户远程运行脚本 ``` bash <(curl -fsSL http://公网IP/shell.sh) ```