Skip to content
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

关于socks协议的流程,想请教一下! #56

Open
zuosc opened this issue Aug 28, 2018 · 2 comments
Open

关于socks协议的流程,想请教一下! #56

zuosc opened this issue Aug 28, 2018 · 2 comments

Comments

@zuosc
Copy link

zuosc commented Aug 28, 2018

sever端的handleConn

服务端到底是如何解析客户端发过来的数据的?

我看代码是在handleConn开始处判断是不是socks5协议信息。如果不是就直接返回了。

所以那是如何接收local真正的http请求呢?

在后面又开了一个 go程 , err := localConn.DecodeCopy(dstServer)
似乎这里是接收真实的http请求的。
为何这里又不会进入到 判断是不是socks5请求的逻辑呢


反复看了你文章的描述,对于这句

数据转发
客户端在收到来自服务器成功的响应后,就会开始发送数据了,服务端在收到来自客户端的数据后,
会转发到目标服务。

实在不懂具体是怎么样的?

这两个点让我有点晕了。。。。

@zuosc zuosc changed the title go初学者有点疑问请教下,关于sever端的handleConn 关于socks协议的流程,想请教一下! Aug 28, 2018
@ghost
Copy link

ghost commented Apr 6, 2019

接收tcp/udp流量,进行copy转发。

@lifei6671
Copy link

我看了源码,貌似local和server之间只做了转发,local并没有实现socks协议。具体的socks5协议是在server端实现的。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants