From 3ab44d04e24b37cae5e849dc4f02c6a34ee75b53 Mon Sep 17 00:00:00 2001 From: tlanyan Date: Fri, 19 Feb 2021 19:55:23 +0800 Subject: [PATCH] docs: more comments --- README.md | 2 +- index.php | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c9f3c2e..ad38aab 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ apt install -y nginx ### 4. 启动程序 -进入项目文件夹,执行 `nohup php index.php &`,也可以在 tmux/screen 等终端窗口内执行 `php index.php` 启动程序。 +进入项目文件夹,执行 `nohup php index.php > /var/log/ghproxy.log 2>&1 &`,也可以在 tmux/screen 等终端窗口内执行 `php index.php` 启动程序。 部署了Nginx的前端web服务器的,请重启web服务器。 diff --git a/index.php b/index.php index 87f1d0e..9615ee5 100644 --- a/index.php +++ b/index.php @@ -47,6 +47,9 @@ function handler(Psr\Http\Message\ServerRequestInterface $req) { return serveStaticFiles($url); } + // @notice: uncomment the following line to proxy any url! + // return proxy($req); + $exp1 = '/^https?:\/\/?github\.com\/.+?\/.+?\/(?:releases|archive)\/.*$/i'; $exp2 = '/^https?:\/\/?github\.com\/.+?\/.+?\/(?:blob)\/.*$/i'; $exp3 = '/^https?:\/\/?github\.com\/.+?\/.+?\/(?:info|git-).*$/i';