chgeuer
How to create an HTTP Proxy?
Which library / approach would be advisable for building an MITM-style HTTP(s) Proxy, i.e. for intercepting outgoing web traffic? Effectively inspect (and do side effects) based on outgoing traffic.
I found GitHub - houli/http-proxy: A HTTP(S) Proxy written in Elixir · GitHub (9 years old, work in progress) and GitHub - KazuCocoa/http_proxy: http proxy with Elixir. wait request with multi port and forward to each URIs · GitHub, but there’s no real getting-started sample. Given that a proxy isn’t just a regular web server, I’m not sure this thing can easily be plugged into a web server like Cowboy/Bandit/Phoenix…
Thanks, Christian
First Post!
D4no0
How so? The requirements may widely wary, however I can see how you could have a combination of phoenix and a http client.
Most Liked
sorax
do you know https://github.com/tallarium/reverse_proxy_plug?
we use it for “shielding” an old website and injecting css into the page
kind regards, robert
Last Post!
jstimps
It sounds like you’re looking for an http server that supports the CONNECT protocol, such as the standalone app squid.
I haven’t personally seen any Erlang or Elixir http servers that have explicit documented support of HTTP CONNECT for proxying, but cowboy does appear to support enable_connect_protocol for Websockets on HTTP2. Might take a bit of experimentation with cowboy’s configuration to determine if it suits your need.
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #security
- #hex









