-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
支持 https 降级代理 #176
Comments
应该是如果检测到该请求有 host 定义滴话,就启动 https 转换 http 比如
那么访问 |
https 降级成 http 就必须用 rule 但是 rule 又是只能存在一个 所以没办法既要降级 https 也要使用 rule |
不需要设置对所有请求都生效,可以设置只对某个域名或路径生效:
用https访问http服务器的问题确实比较普遍,自定义host的请求自动把https转成http这个建议很好,下个版本加上。 |
这个功能,计划那个版本添加上去呢 |
这周会发布 |
我去掉了全局 rule
|
不是返回200了吗 |
这是因为我开发机同时监听了 80 和 443 可以看到截图上 server port 还是 443,并不是 80 |
如果我开发机不监听 443 端口,就 404 了 按道理 自动降级 应该把数据转发到 80 端口才正确 |
要确保443端口没有服务监听,不然的话不会自动降级,在服务器上 |
额,我这里是想https 转 https,不是想让降级 |
他先会以https的方式去请求,如果是https报错,才会请求http,你是起http服务? |
tsw服务 |
默认起http服务的吧,企业微信私聊 |
@avwo 验证 ok 原来你的内部流程是先探测 443 端口是否可用,如果不可用,才会降级到默认的 80 端口 |
平时我配置代理都是
ip domain
形式滴类似这种形式
如果访问
http://test.github.com
这个很正常,可以正确得到需要的东西,因为访问了10.2.3.4
的80
端口但是如果访问
https://test.github.com
就不正常了,这个时候 whistle 自动去访问了10.2.3.4
的443
端口,但是因为内网机器上是不会部署证书滴,而且也只开放 80 端口所以我加了一个全局的 rule
这样就可以 hack 把 443 端口强制改成访问 80 端口了
但是问题来了,如果我想设置其他 rule 就不行了
因为 rule 只能存在一个,所以就很麻烦
如果你要让 https 降级 rule,就没办法自定义其他 rule 了
如果要自定义 rule 就必须带上 https 转换,https -> http
所以看一下这边有没有办法弄一个方法可以既满足 https 转 http,并且也支持自定义 rule
The text was updated successfully, but these errors were encountered: