From fb1cc7f6e7ad7f41619f07ee5570011cf044e1bb Mon Sep 17 00:00:00 2001 From: IceCodeNew <32576256+IceCodeNew@users.noreply.github.com> Date: Sat, 13 Jun 2020 23:52:05 +0800 Subject: [PATCH 1/7] Make curl silence again. --- install-dat-release.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install-dat-release.sh b/install-dat-release.sh index 6a0c652..dbd876c 100644 --- a/install-dat-release.sh +++ b/install-dat-release.sh @@ -26,11 +26,11 @@ check_if_running_as_root() { } download_geoip() { - if ! curl -L -H 'Cache-Control: no-cache' -o "${V2RAY}geoip.dat.new" "$DOWNLOAD_LINK_GEOIP"; then + if ! curl -s -L -H 'Cache-Control: no-cache' -o "${V2RAY}geoip.dat.new" "$DOWNLOAD_LINK_GEOIP"; then echo 'error: Download failed! Please check your network or try again.' exit 1 fi - if ! curl -L -H 'Cache-Control: no-cache' -o "${V2RAY}geoip.dat.sha256sum.new" "$DOWNLOAD_LINK_GEOIP.sha256sum"; then + if ! curl -s -L -H 'Cache-Control: no-cache' -o "${V2RAY}geoip.dat.sha256sum.new" "$DOWNLOAD_LINK_GEOIP.sha256sum"; then echo 'error: Download failed! Please check your network or try again.' exit 1 fi @@ -43,11 +43,11 @@ download_geoip() { } download_geosite() { - if ! curl -L -H 'Cache-Control: no-cache' -o "${V2RAY}geosite.dat.new" "$DOWNLOAD_LINK_GEOSITE"; then + if ! curl -s -L -H 'Cache-Control: no-cache' -o "${V2RAY}geosite.dat.new" "$DOWNLOAD_LINK_GEOSITE"; then echo 'error: Download failed! Please check your network or try again.' exit 1 fi - if ! curl -L -H 'Cache-Control: no-cache' -o "${V2RAY}geosite.dat.sha256sum.new" "$DOWNLOAD_LINK_GEOSITE.sha256sum"; then + if ! curl -s -L -H 'Cache-Control: no-cache' -o "${V2RAY}geosite.dat.sha256sum.new" "$DOWNLOAD_LINK_GEOSITE.sha256sum"; then echo 'error: Download failed! Please check your network or try again.' exit 1 fi From 97f1ec93e2520af483ab54ca5db4a458de65672c Mon Sep 17 00:00:00 2001 From: Dct Mei Date: Sun, 14 Jun 2020 09:38:28 +0800 Subject: [PATCH 2/7] feat: Permission issues for certificate use Supplement and explanation for the problem of insufficient authority for certificate use. --- README.md | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/README.md b/README.md index bc2ec71..1ea3b74 100644 --- a/README.md +++ b/README.md @@ -85,6 +85,50 @@ or # bash install-release.sh --remove ``` +### 證書權限問題 + +假设,证书文件的所在路径为 `/srv/http/`,文件分别为 `/srv/http/example.com.key` 和 `/srv/http/example.com.pem`。 + +方案一: + +`/srv/http/` 的默认权限一般为 755,`/srv/http/example.com.key` 的默认权限一般为 600,`/srv/http/example.com.pem` 的默认权限一般为 644。 + +将 `/srv/http/example.com.key` 修改为 644 即可: + +``` +# chmod 644 /srv/http/example.com.key +``` + +方案二: + +``` +# id nobody +``` + +显示出来的结果可能是: + +``` +uid=65534(nobody) gid=65534(nogroup) groups=65534(nogroup) +``` + +也可能是: + +``` +uid=65534(nobody) gid=65534(nobody) groups=65534(nobody) +``` + +相应的,只需要执行: + +``` +# chown -R nobody:nogroup /srv/http/ +``` + +或是: + +``` +# chown -R nobody:nobody /srv/http/ +``` + ## 參數 ``` From 31ad6c875cc0c7ac01f8f1043f7f5f079bb19d63 Mon Sep 17 00:00:00 2001 From: Dct Mei Date: Sun, 14 Jun 2020 09:55:57 +0800 Subject: [PATCH 3/7] style: Small format adjustment Two plans have been established for the problem of insufficient authority when using certificates. --- README.md | 42 +++++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 1ea3b74..4bbc0ee 100644 --- a/README.md +++ b/README.md @@ -87,13 +87,17 @@ or ### 證書權限問題 -假设,证书文件的所在路径为 `/srv/http/`,文件分别为 `/srv/http/example.com.key` 和 `/srv/http/example.com.pem`。 +假設,這書文件所在的路徑為 `/srv/http/`。 + +文件分別為 `/srv/http/example.com.key` 和 `/srv/http/example.com.pem`。 方案一: -`/srv/http/` 的默认权限一般为 755,`/srv/http/example.com.key` 的默认权限一般为 600,`/srv/http/example.com.pem` 的默认权限一般为 644。 +`/srv/http/` 的默認權限一般為 755; +`/srv/http/example.com.key` 的默認權限一般為 600; +`/srv/http/example.com.pem` 的默認權限一般為 644。 -将 `/srv/http/example.com.key` 修改为 644 即可: +將 `/srv/http/example.com.key` 修改為 644 即可: ``` # chmod 644 /srv/http/example.com.key @@ -105,29 +109,29 @@ or # id nobody ``` -显示出来的结果可能是: +1. 显示出来的结果可能是: -``` -uid=65534(nobody) gid=65534(nogroup) groups=65534(nogroup) -``` + ``` + uid=65534(nobody) gid=65534(nogroup) groups=65534(nogroup) + ``` -也可能是: + 相应的,只需要执行: -``` -uid=65534(nobody) gid=65534(nobody) groups=65534(nobody) -``` + ``` + # chown -R nobody:nogroup /srv/http/ + ``` -相应的,只需要执行: +2. 显示出来的结果可能是: -``` -# chown -R nobody:nogroup /srv/http/ -``` + ``` + uid=65534(nobody) gid=65534(nobody) groups=65534(nobody) + ``` -或是: + 相应的,只需要执行: -``` -# chown -R nobody:nobody /srv/http/ -``` + ``` + # chown -R nobody:nobody /srv/http/ + ``` ## 參數 From 490ab188ef3674240015962e6761877843e67702 Mon Sep 17 00:00:00 2001 From: Dct Mei Date: Sun, 14 Jun 2020 10:24:04 +0800 Subject: [PATCH 4/7] style: Try to pass the test --- README.md | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 4bbc0ee..68cca0b 100644 --- a/README.md +++ b/README.md @@ -109,28 +109,28 @@ or # id nobody ``` -1. 显示出来的结果可能是: +執行後,显示出来的结果可能是: - ``` - uid=65534(nobody) gid=65534(nogroup) groups=65534(nogroup) - ``` +``` +uid=65534(nobody) gid=65534(nogroup) groups=65534(nogroup) +``` - 相应的,只需要执行: +相应的,只需要执行: - ``` - # chown -R nobody:nogroup /srv/http/ - ``` +``` +# chown -R nobody:nogroup /srv/http/ +``` -2. 显示出来的结果可能是: +不過,显示出来的结果也可能是: - ``` - uid=65534(nobody) gid=65534(nobody) groups=65534(nobody) - ``` +``` +uid=65534(nobody) gid=65534(nobody) groups=65534(nobody) +``` - 相应的,只需要执行: +相应的,只需要执行: - ``` - # chown -R nobody:nobody /srv/http/ +``` +# chown -R nobody:nobody /srv/http/ ``` ## 參數 From 1ec6b3026d3cc798bc734baf7a07e93ea5290356 Mon Sep 17 00:00:00 2001 From: Dct Mei Date: Sun, 14 Jun 2020 10:28:08 +0800 Subject: [PATCH 5/7] style: Fix a missing error --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 68cca0b..8e93dd3 100644 --- a/README.md +++ b/README.md @@ -131,7 +131,7 @@ uid=65534(nobody) gid=65534(nobody) groups=65534(nobody) ``` # chown -R nobody:nobody /srv/http/ - ``` +``` ## 參數 From c4fb336e065ddeed581a01b6be597d48c71cdc82 Mon Sep 17 00:00:00 2001 From: Dct Mei Date: Sun, 14 Jun 2020 10:30:56 +0800 Subject: [PATCH 6/7] style: Content differentiation --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8e93dd3..96ea7bc 100644 --- a/README.md +++ b/README.md @@ -93,9 +93,9 @@ or 方案一: -`/srv/http/` 的默認權限一般為 755; -`/srv/http/example.com.key` 的默認權限一般為 600; -`/srv/http/example.com.pem` 的默認權限一般為 644。 +1. `/srv/http/` 的默認權限一般為 755; +2. `/srv/http/example.com.key` 的默認權限一般為 600; +3. `/srv/http/example.com.pem` 的默認權限一般為 644。 將 `/srv/http/example.com.key` 修改為 644 即可: From d7330b718314d782e57f3b63df4dfa8a38e23b4a Mon Sep 17 00:00:00 2001 From: Dct Mei Date: Sun, 14 Jun 2020 10:36:25 +0800 Subject: [PATCH 7/7] style: Artificial regulation --- README.md | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 96ea7bc..161f259 100644 --- a/README.md +++ b/README.md @@ -109,29 +109,29 @@ or # id nobody ``` -執行後,显示出来的结果可能是: +1. 显示出来的结果可能是: -``` -uid=65534(nobody) gid=65534(nogroup) groups=65534(nogroup) -``` + ``` + uid=65534(nobody) gid=65534(nogroup) groups=65534(nogroup) + ``` -相应的,只需要执行: + 相应的,只需要执行: -``` -# chown -R nobody:nogroup /srv/http/ -``` + ``` + # chown -R nobody:nogroup /srv/http/ + ``` -不過,显示出来的结果也可能是: +2. 显示出来的结果也可能是: -``` -uid=65534(nobody) gid=65534(nobody) groups=65534(nobody) -``` + ``` + uid=65534(nobody) gid=65534(nobody) groups=65534(nobody) + ``` -相应的,只需要执行: + 相应的,只需要执行: -``` -# chown -R nobody:nobody /srv/http/ -``` + ``` + # chown -R nobody:nobody /srv/http/ + ``` ## 參數