Skip to content

Commit

Permalink
Update install v2ray
Browse files Browse the repository at this point in the history
  • Loading branch information
yeahwu authored Mar 9, 2023
1 parent 3c093cc commit 49e6a35
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tcp-wss.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ install_precheck(){

install_nginx(){
if [ -f "/usr/bin/apt-get" ];then
apt-get install -y nginx
apt-get install -y nginx cron socat
else
yum install -y nginx
yum install -y nginx cronie socat
fi

cat >/etc/nginx/nginx.conf<<EOF
Expand Down Expand Up @@ -100,14 +100,13 @@ EOF
}

acme_ssl(){
apt-get -y install cron socat || yum -y install cronie socat
curl https://get.acme.sh | sh -s email=my@example.com
mkdir -p /etc/letsencrypt/live/$domain
~/.acme.sh/acme.sh --issue -d $domain --standalone --keylength ec-256 --pre-hook "systemctl stop nginx" --post-hook "~/.acme.sh/acme.sh --installcert -d $domain --ecc --fullchain-file /etc/letsencrypt/live/$domain/fullchain.pem --key-file /etc/letsencrypt/live/$domain/privkey.pem --reloadcmd \"systemctl restart nginx\""
}

install_v2ray(){
bash <(curl -L https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh) --version v4.45.2
bash <(curl -L https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh)

cat >/usr/local/etc/v2ray/config.json<<EOF
{
Expand Down

0 comments on commit 49e6a35

Please sign in to comment.