Hacker News new | ask | show | jobs
by sansnomme 2565 days ago
Are there any programmble http proxy servers? I write a fair bit of VM/container control software and often need to map URLs to specific entities on the network dynamically. Never found a good programmable proxy with routing table API and always had to hand roll.
6 comments

You have Lua in haproxy if you want to do complex things. If you just want a programmable routing table, the maps in haproxy do exactly this and can be updated on the fly (including from the traffic itself if needed).

Or you can write the controlling program in the language of your choice and run it outside as an SPOA agent. Have a look at spoa_server which provides examples for Python and Lua.

Shameless plug. I wrote a REST wrapper around HAproxy some years back. Wrote it in Go. Works pretty nice. Willy was a great support also. https://github.com/magneticio/vamp-router

Works quite nicely and can set ACL’s dynamically.

You can do Lua on HAProxy.
Traefik is a very good programmable proxy.
By programmable you mean configurable via a REST api?
Yes, pretty much. E.g. DigitalOcean's online SSH terminal. Programmable routing of websockets code to backend VM.
maybe openresty? nginx with embedded lua plenty of library support for external systems like redis, memcached, mysql, etc...