Closed zizicheng closed 1 year ago
申请证书后,脚本完全复制 : `DOMAIN="YOU.DOMAIN.NAME" USER="username" PASS="password" PORT=443
BIND_IP=0.0.0.0 CERT_DIR=/etc/letsencrypt CERT=${CERT_DIR}/live/${DOMAIN}/fullchain.pem KEY=${CERT_DIR}/live/${DOMAIN}/privkey.pem sudo docker run -d --name gost \ -v ${CERT_DIR}:${CERT_DIR}:ro \ --net=host ginuerzh/gost \ -L "http2://${USER}:${PASS}@${BIND_IP}:${PORT}?cert=${CERT}&key=${KEY}&probe_resist=code:404&knock=www.google.com"` 更改了前三个变量,申请的域名为 abc.com, 注册证书即填写的这个 abc.com, 这里的 DOMAIN 也填写的 abc.com
curl -v "https://www.google.com" --proxy "https://DOMAIN" --proxy-user 'USER:PASS' , 可以返回 google 首页的 html
sudo docker logs gost, 返回类似: 2023/06/30 10:58:51 server.go:3217: http: TLS handshake error from 110.184.20.217:11011: remote error: tls: bad certificate 2023/06/30 10:58:51 server.go:3217: http: TLS handshake error from 110.184.20.217:11585: remote error: tls: bad certificate 2023/06/30 10:58:52 http2.go:360: [http2] root@110.184.20.217:11905 -> http2://0.0.0.0:443 -> r3.o.lencr.org:80 2023/06/30 10:58:52 http2.go:429: [route] 110.184.20.217:11905 -> http2://0.0.0.0:443 -> r3.o.lencr.org:80 2023/06/30 10:58:52 http2.go:478: [http2] 110.184.20.217:11905 <-> r3.o.lencr.org:80 2023/06/30 10:58:52 http2.go:482: [http2] 110.184.20.217:11905 >-< r3.o.lencr.org:80 2023/06/30 10:58:52 http2.go:360: [http2] root@110.184.20.217:11970 -> http2://0.0.0.0:443 -> r3.o.lencr.org:80 2023/06/30 10:58:52 http2.go:429: [route] 110.184.20.217:11970 -> http2://0.0.0.0:443 -> r3.o.lencr.org:80 2023/06/30 10:58:52 http2.go:478: [http2] 110.184.20.217:11970 <-> r3.o.lencr.org:80 2023/06/30 10:58:52 http2.go:482: [http2] 110.184.20.217:11970 >-< r3.o.lencr.org:80 2023/06/30 10:58:52 server.go:3217: http: TLS handshake error from 110.184.20.217:12097: remote error: tls: bad certificate 2023/06/30 10:58:53 http2.go:360: [http2] root@110.184.20.217:8195 -> http2://0.0.0.0:443 -> r3.o.lencr.org:80 2023/06/30 10:58:53 http2.go:429: [route] 110.184.20.217:8195 -> http2://0.0.0.0:443 -> r3.o.lencr.org:80 2023/06/30 10:58:53 http2.go:478: [http2] 110.184.20.217:8195 <-> r3.o.lencr.org:80 2023/06/30 10:58:53 http2.go:482: [http2] 110.184.20.217:8195 >-< r3.o.lencr.org:80
2023/06/30 10:58:51 server.go:3217: http: TLS handshake error from 110.184.20.217:11011: remote error: tls: bad certificate 2023/06/30 10:58:51 server.go:3217: http: TLS handshake error from 110.184.20.217:11585: remote error: tls: bad certificate 2023/06/30 10:58:52 http2.go:360: [http2] root@110.184.20.217:11905 -> http2://0.0.0.0:443 -> r3.o.lencr.org:80 2023/06/30 10:58:52 http2.go:429: [route] 110.184.20.217:11905 -> http2://0.0.0.0:443 -> r3.o.lencr.org:80 2023/06/30 10:58:52 http2.go:478: [http2] 110.184.20.217:11905 <-> r3.o.lencr.org:80 2023/06/30 10:58:52 http2.go:482: [http2] 110.184.20.217:11905 >-< r3.o.lencr.org:80 2023/06/30 10:58:52 http2.go:360: [http2] root@110.184.20.217:11970 -> http2://0.0.0.0:443 -> r3.o.lencr.org:80 2023/06/30 10:58:52 http2.go:429: [route] 110.184.20.217:11970 -> http2://0.0.0.0:443 -> r3.o.lencr.org:80 2023/06/30 10:58:52 http2.go:478: [http2] 110.184.20.217:11970 <-> r3.o.lencr.org:80 2023/06/30 10:58:52 http2.go:482: [http2] 110.184.20.217:11970 >-< r3.o.lencr.org:80 2023/06/30 10:58:52 server.go:3217: http: TLS handshake error from 110.184.20.217:12097: remote error: tls: bad certificate 2023/06/30 10:58:53 http2.go:360: [http2] root@110.184.20.217:8195 -> http2://0.0.0.0:443 -> r3.o.lencr.org:80 2023/06/30 10:58:53 http2.go:429: [route] 110.184.20.217:8195 -> http2://0.0.0.0:443 -> r3.o.lencr.org:80 2023/06/30 10:58:53 http2.go:478: [http2] 110.184.20.217:8195 <-> r3.o.lencr.org:80 2023/06/30 10:58:53 http2.go:482: [http2] 110.184.20.217:8195 >-< r3.o.lencr.org:80
申请证书后,脚本完全复制 : `DOMAIN="YOU.DOMAIN.NAME" USER="username" PASS="password" PORT=443
BIND_IP=0.0.0.0 CERT_DIR=/etc/letsencrypt CERT=${CERT_DIR}/live/${DOMAIN}/fullchain.pem KEY=${CERT_DIR}/live/${DOMAIN}/privkey.pem sudo docker run -d --name gost \ -v ${CERT_DIR}:${CERT_DIR}:ro \ --net=host ginuerzh/gost \ -L "http2://${USER}:${PASS}@${BIND_IP}:${PORT}?cert=${CERT}&key=${KEY}&probe_resist=code:404&knock=www.google.com"` 更改了前三个变量,申请的域名为 abc.com, 注册证书即填写的这个 abc.com, 这里的 DOMAIN 也填写的 abc.com
curl -v "https://www.google.com" --proxy "https://DOMAIN" --proxy-user 'USER:PASS' , 可以返回 google 首页的 html
sudo docker logs gost, 返回类似:
2023/06/30 10:58:51 server.go:3217: http: TLS handshake error from 110.184.20.217:11011: remote error: tls: bad certificate 2023/06/30 10:58:51 server.go:3217: http: TLS handshake error from 110.184.20.217:11585: remote error: tls: bad certificate 2023/06/30 10:58:52 http2.go:360: [http2] root@110.184.20.217:11905 -> http2://0.0.0.0:443 -> r3.o.lencr.org:80 2023/06/30 10:58:52 http2.go:429: [route] 110.184.20.217:11905 -> http2://0.0.0.0:443 -> r3.o.lencr.org:80 2023/06/30 10:58:52 http2.go:478: [http2] 110.184.20.217:11905 <-> r3.o.lencr.org:80 2023/06/30 10:58:52 http2.go:482: [http2] 110.184.20.217:11905 >-< r3.o.lencr.org:80 2023/06/30 10:58:52 http2.go:360: [http2] root@110.184.20.217:11970 -> http2://0.0.0.0:443 -> r3.o.lencr.org:80 2023/06/30 10:58:52 http2.go:429: [route] 110.184.20.217:11970 -> http2://0.0.0.0:443 -> r3.o.lencr.org:80 2023/06/30 10:58:52 http2.go:478: [http2] 110.184.20.217:11970 <-> r3.o.lencr.org:80 2023/06/30 10:58:52 http2.go:482: [http2] 110.184.20.217:11970 >-< r3.o.lencr.org:80 2023/06/30 10:58:52 server.go:3217: http: TLS handshake error from 110.184.20.217:12097: remote error: tls: bad certificate 2023/06/30 10:58:53 http2.go:360: [http2] root@110.184.20.217:8195 -> http2://0.0.0.0:443 -> r3.o.lencr.org:80 2023/06/30 10:58:53 http2.go:429: [route] 110.184.20.217:8195 -> http2://0.0.0.0:443 -> r3.o.lencr.org:80 2023/06/30 10:58:53 http2.go:478: [http2] 110.184.20.217:8195 <-> r3.o.lencr.org:80 2023/06/30 10:58:53 http2.go:482: [http2] 110.184.20.217:8195 >-< r3.o.lencr.org:80