Skip to content

Commit 87b7991

Browse files
committed
explain gost knock parameter more clearly and use www.google.com as the know domain
1 parent 3cc26ba commit 87b7991

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,14 +190,14 @@ KEY=${CERT_DIR}/live/${DOMAIN}/privkey.pem
190190
sudo docker run -d --name gost \
191191
-v ${CERT_DIR}:${CERT_DIR}:ro \
192192
--net=host ginuerzh/gost \
193-
-L "http2://${USER}:${PASS}@${BIND_IP}:${PORT}?cert=${CERT}&key=${KEY}&probe_resist=code:404&knock=${DOMAIN}"
193+
-L "http2://${USER}:${PASS}@${BIND_IP}:${PORT}?cert=${CERT}&key=${KEY}&probe_resist=code:404&knock=www.google.com"
194194
```
195195

196196
上面这个脚本,你需要配置:域名(`DOMAIN`), 用户名 (`USER`), 密码 (`PASS`) 和 端口号(`PORT`) 这几个变量。
197197

198198
关于 gost 的参数, 你可以参看其文档:[Gost Wiki](https://docs.ginuerzh.xyz/gost/),上面我设置一个参数 `probe_resist=code:404` 意思是,如果服务器被探测,或是用浏览器来访问,返回404错误,也可以返回一个网页(如:`probe_resist=file:/path/to/file.txt` 或其它网站 `probe_resist=web:example.com/page.html`
199199

200-
**注意**:开启了探测防御功能后,当认证失败时服务器默认不会响应 `407 Proxy Authentication Required`,但某些情况下客户端需要服务器告知代理是否需要认证(例如Chrome中的 SwitchyOmega 插件)。通过knock参数设置服务器才会发送407响应。
200+
**注意**:开启了探测防御功能后,当认证失败时服务器默认不会响应 `407 Proxy Authentication Required`,但某些情况下客户端需要服务器告知代理是否需要认证(例如Chrome中的 SwitchyOmega 插件)。通过knock参数设置服务器才会发送407响应。对于上面的例子,我们的`knock`参数配置的是`www.google.com`,所以,你需要先访问一下 `https://www.google.com` 让服务端返回一个 `407` 后,SwitchyOmega 才能正常工作。
201201

202202
如无意外,你的服务就启起来了。你可以使用下面的命令验证你的 gost 服务是否正常。
203203

scripts/install.ubuntu.18.04.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ install_gost() {
136136
sudo docker run -d --name gost \
137137
-v ${CERT_DIR}:${CERT_DIR}:ro \
138138
--net=host ginuerzh/gost \
139-
-L "http2://${USER}:${PASS}@${BIND_IP}:${PORT}?cert=${CERT}&key=${KEY}&probe_resist=code:400&knock=${DOMAIN}"
139+
-L "http2://${USER}:${PASS}@${BIND_IP}:${PORT}?cert=${CERT}&key=${KEY}&probe_resist=code:400&knock=www.google.com"
140140
}
141141

142142
crontab_exists() {

0 commit comments

Comments
 (0)