部署
先通过 [[Certbot]] 申请 Let’s Encrypt 证书,然后使用 [[Docker]] 部署 gost 服务:
DOMAIN="YOU.DOMAIN.NAME"USER="username"PASS="password"PORT=443AUTH=$(echo -n ${USER}:${PASS} | base64)
BIND_IP=0.0.0.0CERT_DIR=/etc/letsencryptCERT=${CERT_DIR}/live/${DOMAIN}/fullchain.pemKEY=${CERT_DIR}/live/${DOMAIN}/privkey.pemsudo docker run -d --name gost \ -v ${CERT_DIR}:${CERT_DIR}:ro \ --net=host ginuerzh/gost \ -L "http2://${BIND_IP}:${PORT}?auth=${AUTH}&cert=${CERT}&key=${KEY}&probe_resist=code:404&knock=www.google.com"
需修改的参数
- DOMAIN: 域名
- USER: 用户名
- PASS: 密码
验证
curl -v "https://www.google.com" --proxy "https://DOMAIN" --proxy-user 'USER:PASS'
如果能够正常返回表示部署成功