I have a small python server script which creates a websocket connection and accepts base64 encoded IP packets (very similar to this). As of now my script decodes the IP packet and sends it out into the wild acting as a proxy. It attempts to create a basic NAT table but seems to be some what buggy and if any packets are dropped they're never removed from the NAT table/dictionary.

What I would like to do is abstract the websocket script from the proxying functionality. After researching my options it appears HAproxy would be a good possibility. So my question is two fold - 1) is HAProxy a good option for what I'm trying to do, 2) What would be the best way to get the decrypted IP packet from my websocket script to HAProxy so it could preform the actual requests.

Here's a quick overview of the architecture I'm thinking of:

client -websocket-> websocket server(decrypts IP pckt) -> HAProxy

  • 1
    HAProxy is a reverse proxy, not a forward proxy. It is designed to route requests to specific, internal machines, not for accessing random external machines, which is what it sounds like you are talking about. – Michael - sqlbot Nov 17 '15 at 22:31
  • @Michael-sqlbot ahh that makes sense. Is there a forward proxy you would recommend as an alternative I could use on ubuntu? – Dan Ramos Nov 17 '15 at 22:55
  • I would not call this a recommendation, more a suggestion of something to try... "privoxy" is included with Ubuntu and is a forward proxy that's pretty simple to configure. – Michael - sqlbot Nov 17 '15 at 23:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.