diff --git a/.travis.yml b/.travis.yml index e03cca1..3eb710a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,7 @@ language: bash sudo: required +dist: trusty addons: apt: diff --git a/README-zh.md b/README-zh.md index ca71398..ab4e44f 100644 --- a/README-zh.md +++ b/README-zh.md @@ -66,7 +66,7 @@ wget https://git.io/vpnsetup -O vpnsetup.sh && sudo sh vpnsetup.sh **-或者-** -一个专用服务器或者虚拟专用服务器 (VPS),全新安装以上操作系统之一。另外也可使用 Debian 7 (Wheezy),但是必须首先运行另一个脚本。 OpenVZ VPS 不受支持,用户可以尝试使用 Shadowsocks 或者 OpenVPN。 +一个专用服务器,或者基于 KVM/Xen 的虚拟专用服务器 (VPS),全新安装以上操作系统之一。OpenVZ VPS 不受支持,用户可以尝试使用比如 Shadowsocks 或者 OpenVPN。 这也包括各种公共云服务中的 Linux 虚拟机,比如 DigitalOcean, Vultr, Linode, Google Compute Engine, Amazon Lightsail, Microsoft Azure, IBM SoftLayer, OVHRackspace。 @@ -180,10 +180,7 @@ wget https://git.io/vpnupgrade-centos -O vpnupgrade.sh - IKEv2 VPN Server on Docker - Streisand - Algo VPN -- SoftEther VPN -- Shadowsocks - OpenVPN Install -- Setup strongSwan ## 授权协议 diff --git a/README.md b/README.md index 3b2b78c..b3f4319 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ Please see this workaround. OpenVZ VPS is NOT supported, users could instead try OpenVPN. +A dedicated server or KVM/Xen-based virtual private server (VPS), freshly installed with one of the above OS. OpenVZ VPS is not supported, users could instead try OpenVPN or Shadowsocks. This also includes Linux VMs in public clouds, such as DigitalOcean, Vultr, Linode, Google Compute Engine, Amazon Lightsail, Microsoft Azure, IBM SoftLayer, OVH and Rackspace. @@ -180,10 +180,7 @@ Please refer to Uninstall the VPNIKEv2 VPN Server on Docker - Streisand - Algo VPN -- SoftEther VPN -- Shadowsocks - OpenVPN Install -- Setup strongSwan ## License diff --git a/extras/vpnsetup-debian-7-workaround.sh b/extras/vpnsetup-debian-7-workaround.sh deleted file mode 100644 index c767c25..0000000 --- a/extras/vpnsetup-debian-7-workaround.sh +++ /dev/null @@ -1,73 +0,0 @@ -#!/bin/sh -# -# Debian 7 (Wheezy) does NOT have the required libnss version (>= 3.16) for Libreswan. -# This script provides a workaround by installing newer packages from libreswan.org. -# Debian 7 users: Run this script first, before using the VPN setup script. -# -# IMPORTANT: These unofficial packages may not receive security updates compared to -# official Debian packages. They could contain vulnerabilities. Use at your own risk! -# -# Copyright (C) 2015-2017 Lin Song -# -# This program is free software: you can redistribute it and/or modify it under -# the terms of the GNU General Public License as published by the Free Software -# Foundation, either version 3 of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along with -# this program. If not, see http://www.gnu.org/licenses/. - -export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" - -exiterr() { echo "Error: $1" >&2; exit 1; } - -if [ "$(sed 's/\..*//' /etc/debian_version 2>/dev/null)" != "7" ]; then - exiterr "This script only supports Debian 7 (Wheezy)." -fi - -if [ "$(uname -m)" != "x86_64" ]; then - exiterr "This script only supports 64-bit Debian 7." -fi - -if [ "$(id -u)" != 0 ]; then - exiterr "Script must be run as root. Try 'sudo sh $0'" -fi - -# Create and change to working dir -mkdir -p /opt/src -cd /opt/src || exiterr "Cannot enter /opt/src." - -# Update package index and install wget -export DEBIAN_FRONTEND=noninteractive -apt-get -yq update || exiterr "'apt-get update' failed." -apt-get -yq install wget || exiterr "Failed to install 'wget'." - -# Install libnss/libnspr packages from download.libreswan.org. -# Ref: https://libreswan.org/wiki/3.14_on_Debian_Wheezy -base_url=https://download.libreswan.org/binaries/debian/wheezy - -deb1=libnspr4_4.10.7-1_amd64.deb -deb2=libnspr4-dev_4.10.7-1_amd64.deb -deb3=libnss3_3.17.2-1.1_amd64.deb -deb4=libnss3-dev_3.17.2-1.1_amd64.deb -deb5=libnss3-tools_3.17.2-1.1_amd64.deb - -wget -t 3 -T 30 -nv -O "$deb1" "$base_url/$deb1" -wget -t 3 -T 30 -nv -O "$deb2" "$base_url/$deb2" -wget -t 3 -T 30 -nv -O "$deb3" "$base_url/$deb3" -wget -t 3 -T 30 -nv -O "$deb4" "$base_url/$deb4" -wget -t 3 -T 30 -nv -O "$deb5" "$base_url/$deb5" - -if [ -s "$deb1" ] && [ -s "$deb2" ] && [ -s "$deb3" ] && [ -s "$deb4" ] && [ -s "$deb5" ]; then - dpkg -i "$deb1" "$deb2" "$deb3" "$deb4" "$deb5" && /bin/rm -f "$deb1" "$deb2" "$deb3" "$deb4" "$deb5" - apt-get install -f - echo - echo 'Completed! If no error, you may now proceed to run the VPN setup script.' - exit 0 -else - /bin/rm -f "$deb1" "$deb2" "$deb3" "$deb4" "$deb5" - exiterr 'Could not download libnss/libnspr package(s).' -fi diff --git a/extras/vpnupgrade.sh b/extras/vpnupgrade.sh index 32e4cd4..bb9aaec 100644 --- a/extras/vpnupgrade.sh +++ b/extras/vpnupgrade.sh @@ -29,6 +29,10 @@ if ! printf %s "$os_type" | head -n 1 | grep -qiF -e ubuntu -e debian -e raspbia exiterr "This script only supports Ubuntu/Debian." fi +if [ "$(sed 's/\..*//' /etc/debian_version)" = "7" ]; then + exiterr "This script does not support Debian 7 (Wheezy)." +fi + if [ -f /proc/user_beancounters ]; then exiterr "This script does not support OpenVZ VPS." fi @@ -96,15 +100,6 @@ Your other VPN configuration files will not be modified. EOF -if [ "$(sed 's/\..*//' /etc/debian_version)" = "7" ]; then -cat <<'EOF' -IMPORTANT: Workaround required for Debian 7 (Wheezy). -You must first run the script at: https://git.io/vpndeb7 -Continue only after completing this workaround. - -EOF -fi - printf "Do you wish to continue? [y/N] " read -r response case $response in diff --git a/vpnsetup.sh b/vpnsetup.sh index bd84466..fc4932a 100755 --- a/vpnsetup.sh +++ b/vpnsetup.sh @@ -55,6 +55,10 @@ if ! printf %s "$os_type" | head -n 1 | grep -qiF -e ubuntu -e debian -e raspbia exiterr "This script only supports Ubuntu/Debian." fi +if [ "$(sed 's/\..*//' /etc/debian_version)" = "7" ]; then + exiterr "This script does not support Debian 7 (Wheezy)." +fi + if [ -f /proc/user_beancounters ]; then echo "Error: This script does not support OpenVZ VPS." >&2 echo "Try OpenVPN: https://github.com/Nyr/openvpn-install" >&2 @@ -125,18 +129,6 @@ case "$VPN_IPSEC_PSK $VPN_USER $VPN_PASSWORD" in ;; esac -if [ "$(sed 's/\..*//' /etc/debian_version)" = "7" ]; then -cat <<'EOF' -IMPORTANT: Workaround required for Debian 7 (Wheezy). -You must first run the script at: https://git.io/vpndeb7 -If not already done so, press Ctrl-C to interrupt now. - -Continuing in 30 seconds ... - -EOF - sleep 30 -fi - bigecho "VPN setup in progress... Please be patient." # Create and change to working dir