4

I wanted to create a simple proxy to my localhost(xampp). I've looked into IdHTTPProxyServer but there is no available example of how to use it.

my intention is to monitor the Post/Get request of my application at runtime just like a debugger.

my application will Post/Get through localhost:8080 and then my proxy will be served as a bridge to localhost:80

any suggestion or example?

I am using D2009, D2010 must support Unicode.

Thank you in advance.

Harriv
  • 6,029
  • 6
  • 44
  • 76
XBasic3000
  • 3,418
  • 5
  • 46
  • 91
  • 1
    Must you make your own? There are dozens, if not hundreds, to choose from. (If this is a learning exercise, knock yourself out! I just wonder if this is a tool or a project...) – sarnold Jun 12 '12 at 08:57
  • some-kind of a tool for my projects. my project has a lot of xmls, images and audio streams. was that so hard? – XBasic3000 Jun 12 '12 at 09:03
  • 1
    I'm mostly curious if using a proxy such as Squid or Polipo or Tinyproxy might be able to meet your needs; Polipo at least stores its data in easy to read format off disks, if you need it. – sarnold Jun 12 '12 at 09:07
  • I've used this: http://www.3proxy.ru/ – Harriv Jun 12 '12 at 10:00
  • Similar question: http://stackoverflow.com/questions/4136226/proxy-server-using-indy – Harriv Jun 12 '12 at 10:34

2 Answers2

3

I know it's not Indy, but Synapse (I use it with Lazarus) has a Proxy Server Example included which should work on Delphi too. It worked well for me on FPC. The Demo is included in the Sources you get here:

http://www.ararat.cz/synapse/doku.php/download

leosok
  • 302
  • 1
  • 5
  • 15
2

You may use Overbyte ICS TCP/IP library, on the "user made" page you have a lot of proxy samples, one is tgphttpproxy.

philnext
  • 3,242
  • 5
  • 39
  • 62