VPS配置记录,使用Docker运行gost

安装必备软件

sudo apt update

sudo apt install vim curl axel screen

测试网速

wget -qO- --no-check-certificate https://raw.githubusercontent.com/oooldking/script/master/superbench.sh | bash

安装bbr plus

wget -N --no-check-certificate "https://raw.githubusercontent.com/chiakge/Linux-NetSpeed/master/tcp.sh"
chmod +x tcp.sh
./tcp.sh

安装Docker

sudo apt install apt-transport-https ca-certificates curl software-properties-common

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"

sudo apt update

sudo apt install docker-ce

安装certbot并获取证书

sudo apt-get update -qq
sudo apt-get install -y software-properties-common
sudo add-apt-repository universe
sudo add-apt-repository ppa:certbot/certbot
sudo apt-get update -qq
sudo apt-get install -y certbot

 sudo certbot certonly --standalone -d $domain

使用Docker运行gost

sudo docker run -d --name gost \
        -v /etc/letsencrypt/:/etc/letsencrypt/:ro \
        --net=host ginuerzh/gost \
        -L "http2://${USER}:${PASS}@0.0.0.0:443?cert=/etc/letsencrypt/live/${DOMAIN}/fullchain.pem&key=/etc/letsencrypt/live/${DOMAIN}/privkey.pem&probe_resist=code:400"

定时获取ssl证书

echo "0 0 1 * * /usr/bin/certbot renew --force-renewal" >> /var/spool/cron/crontabs/root

使用系统:Ubuntu 18.0.4

留下评论

电子邮件地址不会被公开。 必填项已用*标注