开发者

Creating proxy between application queries and Internet

开发者 https://www.devze.com 2023-01-12 17:00 出处:网络
Is it possible (for example with C++, but it does not really matter) to create a bridge/proxy application to get the data requested by another application? To be more detailed, I\'m talki开发者_如何学

Is it possible (for example with C++, but it does not really matter) to create a bridge/proxy application to get the data requested by another application? To be more detailed, I'm talki开发者_如何学Cng about a Adobe Air based game. (I want to create a report with stats based on the data acquired, but that is not actually part of this question.) Rather than simple "boolean" answer please provide some link to example/documentation. Thanks


It would always be possible, and depending on the your target operating system, may require a fair amount of effort, which begs the question - is there a reason you cannot use Fiddler or some packet sniffing software for your target OS?


You can write a proxy by hand, in python can be quite easy. All you have to do is to set localhost as proxy, then forward the request and pass it back to the calling socket.

I've started writing something like this some times ago. The idea was to write a simple replacement for dansguardian.

I've uploaded it on github so you can give it a look if it can help.

I do not remember well (I've started writing it the last year) but maybe with some modification can fit well your requests.


Conceptually, this is your configuration:

app_client -> [app_channel] -> proxy ->  [server_channel] -> app_server

Your proxy starts a server socket, the app_client connects to it. This is our app_channel. Now your proxy creates a connection to the app_server. This is your server_channel.

Now start 2 threads, one which reads from the app_channel and writes to the server_channel, the other reads from the server_channel and writes to the app_channel.

This will create a transparent connection to the app_server via your proxy. You can extract the data as you wish. If the data is encrypted though, there's very little you can actually do by way of analysis.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号