简体   繁体   English

使用C#创建Socks主机以进行HTTP代理转发

[英]Create socks host with C# for http proxy forwarding

i want to create a proxy server or (Socks host ??) to communicate with browsers (such as firefox) to forward http proxy. 我想创建一个代理服务器或(Socks主机??)来与浏览器(例如firefox)进行通信以转发HTTP代理。

i have a software that do this: bitvise tunnelier. 我有一个软件可以做到这一点:bitvise tunnelier。

so, i need to write an application similiar to tunnelier proxy forwarder. 因此,我需要编写与隧道代理转发器类似的应用程序。

in other words, i want to enable firefox Socks Host and get browser request with c# application 换句话说,我想启用firefox Socks Host并使用C#应用程序获取浏览器请求

Please help me lead the way 请帮我带路

thanks a lot 非常感谢

Create a proxy means that your application need to act as an HTTP Server when talking to the clients (the browsers) and act as a browser when comunicating with the web sites. 创建代理意味着您的应用程序在与客户端(浏览器)通信时需要充当HTTP Server,而在与网站进行通信时则需要充当浏览器。 The proxy opens a port for the server socket (for example port 90) and accepts the browser request on this port, than connect the web site (generally on port 80) and forward the request to the site server. 代理打开服务器套接字的端口(例如端口90),并在该端口上接受浏览器请求,然后再连接网站(通常在端口80上)并将请求转发到站点服务器。 The proxy waits for the server response, read it and after send the response to the client. 代理等待服务器响应,读取该响应,然后将响应发送给客户端。 The proxy changes the messages header if needed ( for example change the port in the url). 代理根据需要更改消息头(例如,更改URL中的端口)。 In general proxy are multi thread applications, so they can manage more request in the same time. 通常,代理是多线程应用程序,因此它们可以同时管理更多请求。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM