[GH-ISSUE #158] https无法代理 #88

Closed
opened 2026-02-27 23:15:23 +03:00 by kerem · 10 comments
Owner

Originally created by @sproutcat on GitHub (Oct 15, 2018).
Original GitHub issue: https://github.com/snail007/goproxy/issues/158

我按照 1.9 HTTP(S)反向代理 的配置进行设置,http可以正常使用,但是https不行

Originally created by @sproutcat on GitHub (Oct 15, 2018). Original GitHub issue: https://github.com/snail007/goproxy/issues/158 我按照 [1.9 HTTP(S)反向代理](https://github.com/snail007/goproxy/blob/master/README_ZH.md#19-https%E5%8F%8D%E5%90%91%E4%BB%A3%E7%90%86) 的配置进行设置,http可以正常使用,但是https不行
kerem closed this issue 2026-02-27 23:15:23 +03:00
Author
Owner

@snail007 commented on GitHub (Oct 15, 2018):

提供详细操作步骤和日志。

<!-- gh-comment-id:429808909 --> @snail007 commented on GitHub (Oct 15, 2018): 提供详细操作步骤和日志。
Author
Owner

@sproutcat commented on GitHub (Oct 17, 2018):

1、在可连外网的机器 A (IP为 192.168.31.1)起了proxy服务
proxy.exe http -t tcp -p :80,:443
2、内网机器 B(无法连外网,可连接 A),hosts 中配置配置需要连接的域名(如:192.168.31.1 www.oschina.net),这样配置完后,在 B 机器中可以 ping 通,但是在浏览器无法访问 https://www.oschina.net无法访问

<!-- gh-comment-id:430472574 --> @sproutcat commented on GitHub (Oct 17, 2018): 1、在可连外网的机器 A (IP为 `192.168.31.1`)起了proxy服务 `proxy.exe http -t tcp -p :80,:443` 2、内网机器 B(无法连外网,可连接 A),hosts 中配置配置需要连接的域名(如:`192.168.31.1 www.oschina.net`),这样配置完后,在 B 机器中可以 ping 通,但是在浏览器无法访问 `https://www.oschina.net`无法访问
Author
Owner

@snail007 commented on GitHub (Oct 17, 2018):

日志

<!-- gh-comment-id:430500703 --> @snail007 commented on GitHub (Oct 17, 2018): 日志
Author
Owner

@sproutcat commented on GitHub (Oct 17, 2018):

https的访问没日志显示,只有http的

<!-- gh-comment-id:430503910 --> @sproutcat commented on GitHub (Oct 17, 2018): https的访问没日志显示,只有http的
Author
Owner

@snail007 commented on GitHub (Oct 17, 2018):

那就是没有请求进来,需要自己排查。

<!-- gh-comment-id:430548633 --> @snail007 commented on GitHub (Oct 17, 2018): 那就是没有请求进来,需要自己排查。
Author
Owner

@sproutcat commented on GitHub (Oct 17, 2018):

现在可以进入 proxy 了,原因是有个 VMware 的服务占用了 443 端口,下面是日志

2018/10/17 21:34:20 decoder error , from 192.168.31.128:1716, ERR:http decoder data err:€O
2018/10/17 21:34:20 decoder error , from 192.168.31.128:1717, ERR:http decoder data line err:€.

<!-- gh-comment-id:430631655 --> @sproutcat commented on GitHub (Oct 17, 2018): 现在可以进入 proxy 了,原因是有个 VMware 的服务占用了 443 端口,下面是日志 `2018/10/17 21:34:20 decoder error , from 192.168.31.128:1716, ERR:http decoder data err:€O` `2018/10/17 21:34:20 decoder error , from 192.168.31.128:1717, ERR:http decoder data line err:€.`
Author
Owner

@snail007 commented on GitHub (Oct 17, 2018):

不是正确的https请求

<!-- gh-comment-id:430653377 --> @snail007 commented on GitHub (Oct 17, 2018): 不是正确的https请求
Author
Owner

@sproutcat commented on GitHub (Oct 18, 2018):

用浏览器去访问的,还有不正确的https请求,难道代理还要设置https对应的证书?

<!-- gh-comment-id:430861401 --> @sproutcat commented on GitHub (Oct 18, 2018): 用浏览器去访问的,还有不正确的https请求,难道代理还要设置https对应的证书?
Author
Owner

@snail007 commented on GitHub (Oct 18, 2018):

客户端问题,自己排查,日志意思就是不是正确的https请求.

<!-- gh-comment-id:430883572 --> @snail007 commented on GitHub (Oct 18, 2018): 客户端问题,自己排查,日志意思就是不是正确的https请求.
Author
Owner

@todaygood commented on GitHub (Apr 5, 2025):

1、在可连外网的机器 A (IP为 192.168.31.1)起了proxy服务 proxy.exe http -t tcp -p :80,:443 2、内网机器 B(无法连外网,可连接 A),hosts 中配置配置需要连接的域名(如:192.168.31.1 www.oschina.net),这样配置完后,在 B 机器中可以 ping 通,但是在浏览器无法访问 https://www.oschina.net无法访问

我觉得这个文档写得有问题, proxy.exe http -t tcp -p :80,:443 这是一个正向代理, 不是反向代理, 反向代理参见:

https://snail007.goproxyauth.com/goproxy/manual/zh/#/?id=_12http%e3%80%81https-%e7%bd%91%e7%ab%99%e5%8f%8d%e5%90%91%e4%bb%a3%e7%90%86

<!-- gh-comment-id:2780664919 --> @todaygood commented on GitHub (Apr 5, 2025): > 1、在可连外网的机器 A (IP为 `192.168.31.1`)起了proxy服务 `proxy.exe http -t tcp -p :80,:443` 2、内网机器 B(无法连外网,可连接 A),hosts 中配置配置需要连接的域名(如:`192.168.31.1 www.oschina.net`),这样配置完后,在 B 机器中可以 ping 通,但是在浏览器无法访问 `https://www.oschina.net`无法访问 我觉得这个文档写得有问题, `proxy.exe http -t tcp -p :80,:443` 这是一个正向代理, 不是反向代理, 反向代理参见: https://snail007.goproxyauth.com/goproxy/manual/zh/#/?id=_12http%e3%80%81https-%e7%bd%91%e7%ab%99%e5%8f%8d%e5%90%91%e4%bb%a3%e7%90%86
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/goproxy#88
No description provided.