我正在做一个HTTP代理.我将一个http请求存储在一个字符串中,但是现在不知道该怎么做. [英] i m making an http proxy. i m storing an http request in a string but dont knw what to do with it now.

查看:89
本文介绍了我正在做一个HTTP代理.我将一个http请求存储在一个字符串中,但是现在不知道该怎么做.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在制作HTTP代理软件.

将字符串存储在代理软件正在接收的http请求(从Firefox或任何其他Web浏览器)中并不是一个问题,因为我已经知道了.问题是如何继续该过程,以便我的软件可以继续进行Internet查询,然后将结果传递给询问它们的浏览器.

所以:

-计算机A已安装了网络浏览器(比如说Firefox).
-计算机B已安装我的代理服务器软件.
-计算机B收到来自计算机A Firefox的查询.
-计算机B应该充当处理所有后续过程的代理.这是我不知道如何继续的地方.

I''m making a HTTP PROXY SOFTWARE.

Storing the http request that the proxy software is receiving (from Firefox or any other web browser) in a string is not anm issue as I''ve already got it. The problem is how to continue with the process so my software could go on with the Internet query and then pass the results to the same browser that asked them.

So:

- COMPUTER A has a web browser installed (let''s say firefox).
- COMPUTER B has my proxy server software installed.
- COMPUTER B receives a query from COMPUTER A firefox.
- COMPUTER B should act as a proxy handling all the next processes. Here is where I don''t know how to continue.

推荐答案

我不确定您在问什么.因此,您单击或加载Firefox中的链接,并想通过代理打开链接吗?
I am not sure what you are asking. So you click or load a link in Firefox and you want to open up the link via proxy?


您需要一个服务器端套接字,监听80以外的端口上的localhost(通常为8080) .服务器套接字将接受传入的连接,并为请求的Web资源创建和传出客户端套接字.然后,将从客户端连接接收的所有信息中继回服务器套接字.

这是一个详细的项目,需要一些工作.我已经通过Google搜索在网络上看到了几种客户端/服务器袜子资源.我建议从那里开始,以熟悉本地的套接字连接.您必须对套接字和VB都了解,才能做到这一点.
You need a server side socket listening to localhost on a port other than 80 (8080 typically). The server socket will accept an incoming connection and create and outgoing client side socket to the requested web resource. Then all information received from client side connection gets relayed back to server socket.

This is a detailed project with a bit of work. I have seen several client / server sock resources on the web via google search. I would recommend starting there to get familiar with socket connections locally. You MUST have an understanding for sockets and VB both to make this happen.


这篇关于我正在做一个HTTP代理.我将一个http请求存储在一个字符串中,但是现在不知道该怎么做.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆