在浏览器中使用外部服务时,您可以使用它来绕过浏览器限制,例如 CORS 或无效的 SSL 证书。
它将完整的原始请求转发到您的代理目标,并将响应返回给您的服务。
项目地址 https://github.com/cars10/simprox
这个工具需要较高版本的系统,经测试centos7.9是不支持的,因此这里演示用的是docker的方式。
拉取镜像
> docker pull cars10/simprox
启动查看帮助
> docker run -ti \
--name simprox \
-p 7070:7000 \
-e LISTEN=0.0.0.0:7000 -e SKIP_SSL_VERIFY=true\
-e TARGET_HOST=https://192.168.31.181:9200 \
hub.leedb.top/cars10/simprox bash
root@774a2f31a1b1:/# simprox --help
Simple proxy server
Usage: simprox [OPTIONS] --target-host <host:port>
Options:
-l, --listen <host:port>
Set the host for the proxy server itself [env: LISTEN=0.0.0.0:7000] [default: 127.0.0.1:7000]
-t, --target-host <host:port>
Sets the proxy target (required) [env: TARGET_HOST=https://192.168.31.181:9200]
--skip-ssl-verify <skip-ssl-verify>
Disable ssl certificate verification [env: SKIP_SSL_VERIFY=true] [default: false] [possible values: true, false]
-h, --help
Print help information
-V, --version
Print version information
前台启动
> docker run --rm \
--name simprox \
-p 7070:7000 \
-e LISTEN=0.0.0.0:7000 -e SKIP_SSL_VERIFY=true\
-e TARGET_HOST=https://192.168.31.181:9200 \
cars10/simprox
在未启用代理的时候,直接访问https的es地址如下:
通过simprox代理去访问的话,效果如下:
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有