Merge remote-tracking branch 'upstream/develop' into upstream_master
commit
a02a434fd8
63
README.md
63
README.md
|
@ -4,9 +4,7 @@
|
||||||
|
|
||||||
> Bash script for installing V2Ray in operating systems such as Debian / CentOS / Fedora / openSUSE that support systemd
|
> Bash script for installing V2Ray in operating systems such as Debian / CentOS / Fedora / openSUSE that support systemd
|
||||||
|
|
||||||
該腳本安裝的文件符合 Filesystem Hierarchy Standard(FHS):
|
該腳本安裝的文件符合 [Filesystem Hierarchy Standard (FHS)](https://wiki.linuxfoundation.org/lsb/fhs):
|
||||||
|
|
||||||
https://wiki.linuxfoundation.org/lsb/fhs
|
|
||||||
|
|
||||||
```
|
```
|
||||||
installed: /usr/local/bin/v2ray
|
installed: /usr/local/bin/v2ray
|
||||||
|
@ -27,45 +25,6 @@ installed: /etc/systemd/system/v2ray@.service
|
||||||
請在安裝完成後參閱 [文件](https://www.v2fly.org/) 瞭解配置檔案語法,並自己完成適合自己的配置檔案。過程中可參閱社群貢獻的 [配置檔案模板](https://github.com/v2fly/v2ray-examples)
|
請在安裝完成後參閱 [文件](https://www.v2fly.org/) 瞭解配置檔案語法,並自己完成適合自己的配置檔案。過程中可參閱社群貢獻的 [配置檔案模板](https://github.com/v2fly/v2ray-examples)
|
||||||
(**提請您注意這些模板複製下來以後是需要您自己修改調整的,不能直接使用**)
|
(**提請您注意這些模板複製下來以後是需要您自己修改調整的,不能直接使用**)
|
||||||
|
|
||||||
## 依賴軟體
|
|
||||||
|
|
||||||
### 安裝 cURL
|
|
||||||
|
|
||||||
```
|
|
||||||
# apt update
|
|
||||||
# apt install curl
|
|
||||||
```
|
|
||||||
|
|
||||||
or
|
|
||||||
|
|
||||||
```
|
|
||||||
# yum makecache
|
|
||||||
# yum install curl
|
|
||||||
```
|
|
||||||
|
|
||||||
or
|
|
||||||
|
|
||||||
```
|
|
||||||
# dnf makecache
|
|
||||||
# dnf install curl
|
|
||||||
```
|
|
||||||
|
|
||||||
or
|
|
||||||
|
|
||||||
```
|
|
||||||
# zypper refresh
|
|
||||||
# zypper install curl
|
|
||||||
```
|
|
||||||
|
|
||||||
## 下載
|
|
||||||
|
|
||||||
```
|
|
||||||
// 安裝執行檔和 .dat 資料檔
|
|
||||||
# curl -O https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh
|
|
||||||
// 只更新 .dat 資料檔
|
|
||||||
# curl -O https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-dat-release.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
## 使用
|
## 使用
|
||||||
|
|
||||||
* 該腳本在執行時會提供 `info` 和 `error` 等信息,請仔細閱讀。
|
* 該腳本在執行時會提供 `info` 和 `error` 等信息,請仔細閱讀。
|
||||||
|
@ -73,12 +32,16 @@ or
|
||||||
### 安裝和更新 V2Ray
|
### 安裝和更新 V2Ray
|
||||||
|
|
||||||
```
|
```
|
||||||
|
// 安裝執行檔和 .dat 資料檔
|
||||||
|
# curl -LROJ https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh
|
||||||
# bash install-release.sh
|
# bash install-release.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
### 安裝最新發行的 geoip.dat 和 geosite.dat
|
### 安裝最新發行的 geoip.dat 和 geosite.dat
|
||||||
|
|
||||||
```
|
```
|
||||||
|
// 只更新 .dat 資料檔
|
||||||
|
# curl -LROJ https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-dat-release.sh
|
||||||
# bash install-dat-release.sh
|
# bash install-dat-release.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -100,21 +63,7 @@ or
|
||||||
|
|
||||||
**提問前請先閱讀 [Issue #63](https://github.com/v2fly/fhs-install-v2ray/issues/63),否則可能無法得到解答並被鎖定。**
|
**提問前請先閱讀 [Issue #63](https://github.com/v2fly/fhs-install-v2ray/issues/63),否則可能無法得到解答並被鎖定。**
|
||||||
|
|
||||||
## 參數
|
## 貢獻
|
||||||
|
|
||||||
```
|
|
||||||
usage: install-release.sh [--remove | --version number | -c | -f | -h | -l | -p]
|
|
||||||
[-p address] [--version number | -c | -f]
|
|
||||||
--remove Remove V2Ray
|
|
||||||
--version Install the specified version of V2Ray, e.g., --version v4.18.0
|
|
||||||
-c, --check Check if V2Ray can be updated
|
|
||||||
-f, --force Force installation of the latest version of V2Ray
|
|
||||||
-h, --help Show help
|
|
||||||
-l, --local Install V2Ray from a local file
|
|
||||||
-p, --proxy Download through a proxy server, e.g., -p http://127.0.0.1:8118 or -p socks5://127.0.0.1:1080
|
|
||||||
```
|
|
||||||
|
|
||||||
## 維護
|
|
||||||
|
|
||||||
請於 [develop](https://github.com/v2fly/fhs-install-v2ray/tree/develop) 分支進行,以避免對主分支造成破壞。
|
請於 [develop](https://github.com/v2fly/fhs-install-v2ray/tree/develop) 分支進行,以避免對主分支造成破壞。
|
||||||
|
|
||||||
|
|
|
@ -4,9 +4,7 @@
|
||||||
|
|
||||||
> Bash script for installing V2Ray in operating systems such as Debian / CentOS / Fedora / openSUSE that support systemd
|
> Bash script for installing V2Ray in operating systems such as Debian / CentOS / Fedora / openSUSE that support systemd
|
||||||
|
|
||||||
该脚本安装的文档符合 Filesystem Hierarchy Standard(FHS):
|
该脚本安装的文档符合 [Filesystem Hierarchy Standard (FHS)](https://wiki.linuxfoundation.org/lsb/fhs):
|
||||||
|
|
||||||
https://wiki.linuxfoundation.org/lsb/fhs
|
|
||||||
|
|
||||||
```
|
```
|
||||||
installed: /usr/local/bin/v2ray
|
installed: /usr/local/bin/v2ray
|
||||||
|
@ -27,45 +25,6 @@ installed: /etc/systemd/system/v2ray@.service
|
||||||
请在安装完成后参阅 [文档](https://www.v2fly.org/) 了解配置文件语法,并自己完成适合自己的配置文件。过程中可参阅社区贡献的 [配置文件模板](https://github.com/v2fly/v2ray-examples)
|
请在安装完成后参阅 [文档](https://www.v2fly.org/) 了解配置文件语法,并自己完成适合自己的配置文件。过程中可参阅社区贡献的 [配置文件模板](https://github.com/v2fly/v2ray-examples)
|
||||||
(**提请您注意这些模板复制下来以后是需要您自己修改调整的,不能直接使用**)
|
(**提请您注意这些模板复制下来以后是需要您自己修改调整的,不能直接使用**)
|
||||||
|
|
||||||
## 依赖软件
|
|
||||||
|
|
||||||
### 安装 cURL
|
|
||||||
|
|
||||||
```
|
|
||||||
# apt update
|
|
||||||
# apt install curl
|
|
||||||
```
|
|
||||||
|
|
||||||
or
|
|
||||||
|
|
||||||
```
|
|
||||||
# yum makecache
|
|
||||||
# yum install curl
|
|
||||||
```
|
|
||||||
|
|
||||||
or
|
|
||||||
|
|
||||||
```
|
|
||||||
# dnf makecache
|
|
||||||
# dnf install curl
|
|
||||||
```
|
|
||||||
|
|
||||||
or
|
|
||||||
|
|
||||||
```
|
|
||||||
# zypper refresh
|
|
||||||
# zypper install curl
|
|
||||||
```
|
|
||||||
|
|
||||||
## 下载
|
|
||||||
|
|
||||||
```
|
|
||||||
// 安装可执行文件和 .dat 数据文件
|
|
||||||
# curl -O https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh
|
|
||||||
// 只更新 .dat 数据文件
|
|
||||||
# curl -O https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-dat-release.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
## 使用
|
## 使用
|
||||||
|
|
||||||
* 该脚本在运行时会提供 `info` 和 `error` 等信息,请仔细阅读。
|
* 该脚本在运行时会提供 `info` 和 `error` 等信息,请仔细阅读。
|
||||||
|
@ -73,12 +32,16 @@ or
|
||||||
### 安装和更新 V2Ray
|
### 安装和更新 V2Ray
|
||||||
|
|
||||||
```
|
```
|
||||||
|
// 安装可执行文件和 .dat 数据文件
|
||||||
|
# curl -LROJ https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh
|
||||||
# bash install-release.sh
|
# bash install-release.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
### 安装最新发行的 geoip.dat 和 geosite.dat
|
### 安装最新发行的 geoip.dat 和 geosite.dat
|
||||||
|
|
||||||
```
|
```
|
||||||
|
// 只更新 .dat 数据文件
|
||||||
|
# curl -LROJ https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-dat-release.sh
|
||||||
# bash install-dat-release.sh
|
# bash install-dat-release.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -100,21 +63,7 @@ or
|
||||||
|
|
||||||
**提问前请先阅读 [Issue #63](https://github.com/v2fly/fhs-install-v2ray/issues/63),否则可能无法得到解答并被锁定。**
|
**提问前请先阅读 [Issue #63](https://github.com/v2fly/fhs-install-v2ray/issues/63),否则可能无法得到解答并被锁定。**
|
||||||
|
|
||||||
## 参数
|
## 贡献
|
||||||
|
|
||||||
```
|
|
||||||
usage: install-release.sh [--remove | --version number | -c | -f | -h | -l | -p]
|
|
||||||
[-p address] [--version number | -c | -f]
|
|
||||||
--remove Remove V2Ray
|
|
||||||
--version Install the specified version of V2Ray, e.g., --version v4.18.0
|
|
||||||
-c, --check Check if V2Ray can be updated
|
|
||||||
-f, --force Force installation of the latest version of V2Ray
|
|
||||||
-h, --help Show help
|
|
||||||
-l, --local Install V2Ray from a local file
|
|
||||||
-p, --proxy Download through a proxy server, e.g., -p http://127.0.0.1:8118 or -p socks5://127.0.0.1:1080
|
|
||||||
```
|
|
||||||
|
|
||||||
## 维护
|
|
||||||
|
|
||||||
请于 [develop](https://github.com/v2fly/fhs-install-v2ray/tree/develop) 分支进行,以避免对主分支造成破坏。
|
请于 [develop](https://github.com/v2fly/fhs-install-v2ray/tree/develop) 分支进行,以避免对主分支造成破坏。
|
||||||
|
|
||||||
|
|
|
@ -106,6 +106,9 @@ identify_the_operating_system_and_architecture() {
|
||||||
elif [[ "$(command -v zypper)" ]]; then
|
elif [[ "$(command -v zypper)" ]]; then
|
||||||
PACKAGE_MANAGEMENT_INSTALL='zypper install'
|
PACKAGE_MANAGEMENT_INSTALL='zypper install'
|
||||||
PACKAGE_MANAGEMENT_REMOVE='zypper remove'
|
PACKAGE_MANAGEMENT_REMOVE='zypper remove'
|
||||||
|
elif [[ "$(command -v pacman)" ]]; then
|
||||||
|
PACKAGE_MANAGEMENT_INSTALL='pacman -S'
|
||||||
|
PACKAGE_MANAGEMENT_REMOVE='pacman -R'
|
||||||
else
|
else
|
||||||
echo "error: The script does not support the package manager in this operating system."
|
echo "error: The script does not support the package manager in this operating system."
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -149,7 +152,7 @@ judgment_parameters() {
|
||||||
break
|
break
|
||||||
;;
|
;;
|
||||||
'-p' | '--proxy')
|
'-p' | '--proxy')
|
||||||
if echo "${2:?undefine var}" | grep -qEo '^(https?|socks4a?|socks5h?):\/\/'; then
|
if ! echo "${2:?undefine var}" | grep -qEo '^(https?|socks4a?|socks5h?):\/\/'; then
|
||||||
echo 'error: Please specify the correct proxy server address.'
|
echo 'error: Please specify the correct proxy server address.'
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue