[英]How to open socket thru proxy server in .Net C#?
How to open socket thru proxy server in .Net C#? 如何在.Net C#中打开socket代理服务器?
So I opened up a socket on my machin. 所以我在我的机器上打开了一个插座。 there are no nats between pe and proxy server.
pe和代理服务器之间没有nat。 I connected to proxy server.
我连接到代理服务器。 How now to make Requests from global IP world that know that proxy server adrress be redirected or transfered by proxy server to me?
现在如何从全球IP世界发出请求,知道代理服务器地址被代理服务器重定向或转移给我?
Any libs blog articles? 任何libs博客文章? Please help
请帮忙
You cannot open a socket 'thru' something, only 'to' something. 你无法打开套接字'thru',只能'to'某事。 With proxy server (I assume you're talking about HTTP proxy that supports 'CONNECT' command) it's the same: first open a connection to it, then use its protocol to make proxy forward your connection where you want to using 'CONNECT' command.
使用代理服务器(我假设您正在讨论支持'CONNECT'命令的HTTP代理)它是相同的:首先打开与它的连接,然后使用其协议使代理转发您想要使用'CONNECT'命令的连接。
So you need to do the following steps: 因此,您需要执行以下步骤:
CONNECT Host:Port HTTP/1.1<CR><LF>
CONNECT Host:Port HTTP/1.1<CR><LF>
<CR><LF>
<CR><LF>
HTTP/1.X 200
, the connection is successful. HTTP/1.X 200
,则连接成功。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.