Ratproxy, a Simple Reverse Proxy
September 21, 2022 - Darrel Herbst
_ _ __ __ _| |_ _ __ _ __ _____ ___ _ | '__/ _` | __| '_ \| '__/ _ \ \/ / | | | | | | (_| | |_| |_) | | | (_) > <| |_| | |_| \__,_|\__| .__/|_| \___/_/\_\\__, | |_| |___/
We use AWS cloudfront a lot, and we write a bunch of microservices that are routed by cloudfront. Sometimes you want to run everything locally to save time having to create the executable, docker container, and deploying to the development servers. Ratproxy helps us run things locally.
You could run something like nginx. But then you have to deal with nginx, which isn’t fun.
ratproxy can be configured with a simple yaml file like this:
listen: 0.0.0.0:1414 targets: - name: service1 target: http://localhost:10000 path: /service1/ - name: service2 target: http://localhost:1313 path: /
Installation is easy by running
go install github.com/streamingrat/ratproxy
After you configure your ratproxy.yaml file, just type
ratproxy at the command prompt, and you are up and running.
You can find the source code at https://github.com/streamingrat/ratproxy