Go to file
IceCodeNew 56f37614f4 Fix wrongly handling proxy parameters given to curl
巧了,正好是我手贱把原来好好的 curl 参数顺序调乱了搞得脚本不指定代理就无法正常工作。
结果我意外因为这个发现脚本原本写的提供给 curl 的代理参数多了个空格,所以原来脚本是给了代理参数就不能正常工作的(

---

` curl '-x socks5h://1.1.1.1:9999' https://ipinfo.io `
> curl: (5) Unsupported proxy syntax in ' socks5h://1.1.1.1:9999'

注意这里报错消息里的空格。
2020-06-12 12:56:53 +08:00
systemd/system style: Delete extra fields 2020-04-27 20:46:08 +08:00
LICENSE Add GPL3 protocol 2020-03-24 15:22:37 +08:00
README.md style: Add some tips 2020-04-29 14:40:52 +08:00
install-dat-release.sh Only implied some ShellCheck fixes. 2020-06-12 12:54:36 +08:00
install-release.sh Fix wrongly handling proxy parameters given to curl 2020-06-12 12:56:53 +08:00

README.md

fhs-install-v2ray

Bash script for installing V2Ray in operating systems such as Debian / CentOS / Fedora / openSUSE that support systemd

該腳本安裝的文件符合 Filesystem Hierarchy StandardFHS

https://wiki.linuxfoundation.org/lsb/fhs

installed: /usr/local/bin/v2ray
installed: /usr/local/bin/v2ctl
installed: /usr/local/lib/v2ray/geoip.dat
installed: /usr/local/lib/v2ray/geosite.dat
installed: /usr/local/etc/v2ray/00_log.json
installed: /usr/local/etc/v2ray/01_api.json
installed: /usr/local/etc/v2ray/02_dns.json
installed: /usr/local/etc/v2ray/03_routing.json
installed: /usr/local/etc/v2ray/04_policy.json
installed: /usr/local/etc/v2ray/05_inbounds.json
installed: /usr/local/etc/v2ray/06_outbounds.json
installed: /usr/local/etc/v2ray/07_transport.json
installed: /usr/local/etc/v2ray/08_stats.json
installed: /usr/local/etc/v2ray/09_reverse.json
installed: /var/log/v2ray/
installed: /etc/systemd/system/v2ray.service
installed: /etc/systemd/system/v2ray@.service

依賴軟體

安裝 cURL

# apt install curl

or

# yum install curl

or

# dnf install curl

or

# zypper install curl

下載

# curl -O https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh
# curl -O https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-dat-release.sh

使用

  • 該腳本在執行時會提供 infoerror 等信息,請仔細閱讀。

安裝和更新 V2Ray

# bash install-release.sh

安裝最新發行的 geoip.dat 和 geosite.dat

# bash install-dat-release.sh

移除 V2Ray

# bash install-release.sh --remove

參數

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