[GH-ISSUE #334] 部分代理请求失败 #251

Open
opened 2026-02-27 23:16:11 +03:00 by kerem · 1 comment
Owner

Originally created by @liudonghua123 on GitHub (Nov 18, 2019).
Original GitHub issue: https://github.com/snail007/goproxy/issues/334

我在服务器上通过./proxy sps -p :80,:443 --log proxy.log --daemon的方式运行代理服务,然后在客户机上运行 curl -vvvvvv https://www.oschina.net --resolve 'www.oschina.net:443:113.55.17.2' 是没有问题的,但是运行 curl https://pubs.acs.org --resolve 'pubs.acs.org:443:113.55.17.2'就会有如下错误提示

C:\Users\Liu.D.H>curl -vvv https://pubs.acs.org --resolve 'pubs.acs.org:443:113.55.17.2'
* Address in ''pubs.acs.org:443:113.55.17.2'' found illegal!
* Rebuilt URL to: https://pubs.acs.org/
*   Trying 113.55.17.2...
* TCP_NODELAY set
* Connected to pubs.acs.org (113.55.17.2) port 443 (#0)
* schannel: SSL/TLS connection with pubs.acs.org port 443 (step 1/3)
* schannel: checking server certificate revocation
* schannel: sending initial handshake data: sending 177 bytes...
* schannel: sent initial handshake data: sent 177 bytes
* schannel: SSL/TLS connection with pubs.acs.org port 443 (step 2/3)
* schannel: failed to receive handshake, need more data
* schannel: SSL/TLS connection with pubs.acs.org port 443 (step 2/3)
* schannel: failed to receive handshake, SSL/TLS connection failed
* Closing connection 0
* schannel: shutting down SSL/TLS connection with pubs.acs.org port 443
* schannel: clear security context handle
curl: (35) schannel: failed to receive handshake, SSL/TLS connection failed

C:\Users\Liu.D.H>

这是服务端相关日志信息

2019/11/18 03:30:57 SNI:https://pubs.acs.org:443
2019/11/18 03:30:57 conn 113.55.127.140:12957 - 113.55.17.2:45619 connected [pubs.acs.org:443]
2019/11/18 03:31:13 conn 113.55.127.140:12957 - 113.55.17.2:45619 released [pubs.acs.org:443]

Expected Behavior

可以正常的获得请求内容

Current Behavior

代理请求失败

Possible Solution

Context (Environment)

  1. proxy version is : v8.6
  2. full command is :./proxy sps -p :80,:443 --log proxy.log --daemon
  3. system is :Ubuntu 18.04.2 LTS

Detailed Description

Possible Implementation

Originally created by @liudonghua123 on GitHub (Nov 18, 2019). Original GitHub issue: https://github.com/snail007/goproxy/issues/334 <!--- Provide a general summary of the issue in the Title above --> 我在服务器上通过`./proxy sps -p :80,:443 --log proxy.log --daemon`的方式运行代理服务,然后在客户机上运行 `curl -vvvvvv https://www.oschina.net --resolve 'www.oschina.net:443:113.55.17.2'` 是没有问题的,但是运行 `curl https://pubs.acs.org --resolve 'pubs.acs.org:443:113.55.17.2'`就会有如下错误提示 ``` C:\Users\Liu.D.H>curl -vvv https://pubs.acs.org --resolve 'pubs.acs.org:443:113.55.17.2' * Address in ''pubs.acs.org:443:113.55.17.2'' found illegal! * Rebuilt URL to: https://pubs.acs.org/ * Trying 113.55.17.2... * TCP_NODELAY set * Connected to pubs.acs.org (113.55.17.2) port 443 (#0) * schannel: SSL/TLS connection with pubs.acs.org port 443 (step 1/3) * schannel: checking server certificate revocation * schannel: sending initial handshake data: sending 177 bytes... * schannel: sent initial handshake data: sent 177 bytes * schannel: SSL/TLS connection with pubs.acs.org port 443 (step 2/3) * schannel: failed to receive handshake, need more data * schannel: SSL/TLS connection with pubs.acs.org port 443 (step 2/3) * schannel: failed to receive handshake, SSL/TLS connection failed * Closing connection 0 * schannel: shutting down SSL/TLS connection with pubs.acs.org port 443 * schannel: clear security context handle curl: (35) schannel: failed to receive handshake, SSL/TLS connection failed C:\Users\Liu.D.H> ``` 这是服务端相关日志信息 ``` 2019/11/18 03:30:57 SNI:https://pubs.acs.org:443 2019/11/18 03:30:57 conn 113.55.127.140:12957 - 113.55.17.2:45619 connected [pubs.acs.org:443] 2019/11/18 03:31:13 conn 113.55.127.140:12957 - 113.55.17.2:45619 released [pubs.acs.org:443] ``` ## Expected Behavior <!--- Tell us what should happen --> 可以正常的获得请求内容 ## Current Behavior <!--- Tell us what happens instead of the expected behavior --> 代理请求失败 ## Possible Solution <!--- Not obligatory, but suggest a fix/reason for the bug, --> ## Context (Environment) <!--- How has this issue affected you? What are you trying to accomplish? --> <!--- Providing context helps us come up with a solution that is most useful in the real world --> 1. proxy version is : v8.6 1. full command is :./proxy sps -p :80,:443 --log proxy.log --daemon 1. system is :Ubuntu 18.04.2 LTS <!--- Provide a general summary of the issue in the Title above --> ## Detailed Description <!--- Provide a detailed description of the change or addition you are proposing --> ## Possible Implementation <!--- Not obligatory, but suggest an idea for implementing addition or change -->
Author
Owner

@snail007 commented on GitHub (Nov 18, 2019):

fixed in next version.

<!-- gh-comment-id:554851623 --> @snail007 commented on GitHub (Nov 18, 2019): fixed in next version.
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#251
No description provided.