[GH-ISSUE #416] https 代理无法使用 #324

Closed
opened 2026-02-27 23:16:29 +03:00 by kerem · 4 comments
Owner

Originally created by @ycchildcoder on GitHub (Jan 18, 2021).
Original GitHub issue: https://github.com/snail007/goproxy/issues/416

下载最新的proxy 二进制
服务端:运行proxy, 启用https 代理
./proxy http -t tls --local-tls-single -p ":38080"

客户端:
export https_proxy=https://10.62.120.248:38080/
使用curl 请求代理
curl -v https://www.baidu.com
日志:
proxy free version 10.2 by snail , email : arraykeys@gmail.com
2021/01/18 11:14:39 tls http(s) proxy on [::]:38080
2021/01/18 11:15:58 tls handshake fail from 10.62.120.248:22161, tls: first record does not look like a TLS handshake
2021/01/18 11:15:58 attacking access 10.62.120.248:22161 <--> 10.62.120.248:38080
2021/01/18 11:17:33 tls handshake fail from 10.62.120.248:22185, tls: first record does not look like a TLS handshake
2021/01/18 11:17:33 attacking access 10.62.120.248:22185 <--> 10.62.120.248:38080
2021/01/18 11:18:02 tls handshake fail from 10.62.120.248:22187, tls: first record does not look like a TLS handshake

不知道是哪里的问题, 是我请求的问题, 还是服务端配置问题?

Originally created by @ycchildcoder on GitHub (Jan 18, 2021). Original GitHub issue: https://github.com/snail007/goproxy/issues/416 下载最新的proxy 二进制 服务端:运行proxy, 启用https 代理 ./proxy http -t tls --local-tls-single -p ":38080" 客户端: export https_proxy=https://10.62.120.248:38080/ 使用curl 请求代理 curl -v https://www.baidu.com 日志: proxy free version 10.2 by snail , email : arraykeys@gmail.com 2021/01/18 11:14:39 tls http(s) proxy on [::]:38080 2021/01/18 11:15:58 tls handshake fail from 10.62.120.248:22161, tls: first record does not look like a TLS handshake 2021/01/18 11:15:58 attacking access 10.62.120.248:22161 <--> 10.62.120.248:38080 2021/01/18 11:17:33 tls handshake fail from 10.62.120.248:22185, tls: first record does not look like a TLS handshake 2021/01/18 11:17:33 attacking access 10.62.120.248:22185 <--> 10.62.120.248:38080 2021/01/18 11:18:02 tls handshake fail from 10.62.120.248:22187, tls: first record does not look like a TLS handshake 不知道是哪里的问题, 是我请求的问题, 还是服务端配置问题?
kerem closed this issue 2026-02-27 23:16:29 +03:00
Author
Owner

@snail007 commented on GitHub (Jan 18, 2021):

请求的问题,curl没有设置忽略校验证书。curl -k

<!-- gh-comment-id:761971381 --> @snail007 commented on GitHub (Jan 18, 2021): 请求的问题,curl没有设置忽略校验证书。curl -k
Author
Owner

@ycchildcoder commented on GitHub (Jan 18, 2021):

请求的问题,curl没有设置忽略校验证书。curl -k

设置了-k 错误也是一样的
curl -k -v https://www.baidu.com

  • About to connect() to proxy 10.62.120.248 port 38080 (#0)
  • Trying 10.62.120.248...
  • Connected to 10.62.120.248 (10.62.120.248) port 38080 (#0)
  • Establish HTTP proxy tunnel to www.baidu.com:443

CONNECT www.baidu.com:443 HTTP/1.1
Host: www.baidu.com:443
User-Agent: curl/7.29.0
Proxy-Connection: Keep-Alive

  • Proxy CONNECT aborted
  • Connection #0 to host 10.62.120.248 left intact
    curl: (56) Proxy CONNECT aborted

服务端:
./proxy http -t tls --local-tls-single -p ":38080"
proxy free version 10.2 by snail , email : arraykeys@gmail.com
2021/01/18 12:41:39 tls http(s) proxy on [::]:38080
2021/01/18 12:42:16 tls handshake fail from 10.62.120.248:23211, tls: first record does not look like a TLS handshake
2021/01/18 12:42:16 attacking access 10.62.120.248:23211 <--> 10.62.120.248:38080
2021/01/18 12:42:23 tls handshake fail from 10.62.120.248:23213, tls: first record does not look like a TLS handshake
2021/01/18 12:42:23 attacking access 10.62.120.248:23213 <--> 10.62.120.248:38080
2021/01/18 12:43:07 tls handshake fail from 10.62.120.248:23215, tls: first record does not look like a TLS handshake
2021/01/18 12:43:07 attacking access 10.62.120.248:23215 <--> 10.62.120.248:38080

<!-- gh-comment-id:761976351 --> @ycchildcoder commented on GitHub (Jan 18, 2021): > 请求的问题,curl没有设置忽略校验证书。curl -k 设置了-k 错误也是一样的 curl -k -v https://www.baidu.com * About to connect() to proxy 10.62.120.248 port 38080 (#0) * Trying 10.62.120.248... * Connected to 10.62.120.248 (10.62.120.248) port 38080 (#0) * Establish HTTP proxy tunnel to www.baidu.com:443 > CONNECT www.baidu.com:443 HTTP/1.1 > Host: www.baidu.com:443 > User-Agent: curl/7.29.0 > Proxy-Connection: Keep-Alive > * Proxy CONNECT aborted * Connection #0 to host 10.62.120.248 left intact curl: (56) Proxy CONNECT aborted 服务端: ./proxy http -t tls --local-tls-single -p ":38080" proxy free version 10.2 by snail , email : arraykeys@gmail.com 2021/01/18 12:41:39 tls http(s) proxy on [::]:38080 2021/01/18 12:42:16 tls handshake fail from 10.62.120.248:23211, tls: first record does not look like a TLS handshake 2021/01/18 12:42:16 attacking access 10.62.120.248:23211 <--> 10.62.120.248:38080 2021/01/18 12:42:23 tls handshake fail from 10.62.120.248:23213, tls: first record does not look like a TLS handshake 2021/01/18 12:42:23 attacking access 10.62.120.248:23213 <--> 10.62.120.248:38080 2021/01/18 12:43:07 tls handshake fail from 10.62.120.248:23215, tls: first record does not look like a TLS handshake 2021/01/18 12:43:07 attacking access 10.62.120.248:23215 <--> 10.62.120.248:38080
Author
Owner

@snail007 commented on GitHub (Jan 18, 2021):

这是curl设置https代理错误问题,curl使用自己百度吧。

<!-- gh-comment-id:762040262 --> @snail007 commented on GitHub (Jan 18, 2021): 这是curl设置https代理错误问题,curl使用自己百度吧。
Author
Owner

@dengdalue commented on GitHub (Sep 13, 2022):

我也遇到这种问题,我的运行命令是:
proxy http -t tls -p ":3128" -C proxy.crt -K proxy.key

访问curl https://www.baidu.com报以下错误
2022/09/13 16:38:44.610055 WARN tls handshake fail from 192.168.13.55:37200, tls: first record does not look like a TLS handshake
2022/09/13 16:38:44.610131 WARN attacking access 192.168.13.55:37200 <--> 192.168.13.55:3128

<!-- gh-comment-id:1245086011 --> @dengdalue commented on GitHub (Sep 13, 2022): 我也遇到这种问题,我的运行命令是: proxy http -t tls -p ":3128" -C proxy.crt -K proxy.key 访问curl https://www.baidu.com报以下错误: 2022/09/13 16:38:44.610055 WARN tls handshake fail from 192.168.13.55:37200, tls: first record does not look like a TLS handshake 2022/09/13 16:38:44.610131 WARN attacking access 192.168.13.55:37200 <--> 192.168.13.55:3128
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#324
No description provided.