Looking for guidance to choose the right use case for HAProxy

Hi,

I’m new to HAProxy and generally to proxy servers, so apologise for the noob question, Google didn’t help.

I want to use MS Power Automate to connect to an API server via HTTPS by creating a custom connector. The server requires IP whitelisting and MS Power Automate has too many IP’s to whitelist, so I thought a proxy server might be helpful in a way that MSPA sends the API requests to the proxy which forwards it to the API server and sends it back to my proxy server which then back to MS PA.

So I’m basically looking to build a proxy server so I can present one single IP to the API server, which forwards everything over HTTPS to one single hostname and can be accessed from a list of IP’s only while I can present my proxy’s URL to MSPA as if it was the API server if that makes sense?

I managed to setup a basic HAproxy server on Ubuntu, but I cannot setup proxy server at MSPA , so it might be a reverse proxy I need?

I need some advice to chose the right use case for this.

Any help much appreciated

Could you provide more “technical” details? Like for example what issue you’ve encountered while trying to configure HAProxy? How did you test it? How does your configuration look like?


In essence you should need to know the “API server” endpoint, which then you’ll need to configure as a server in a backend section.

Then in your frontend section you would configure HAProxy to listen for incoming connections, which will be sent to the single backend.

The endpoint of the HAProxy frontend is the one you should use in your MS Power Automate.

Hi,

In the meantime I managed to resolve with an unexpected help of a friend. Final config is as below:

global
log /dev/log local0
log /dev/log local1 notice
chroot /var/lib/haproxy
stats socket /run/haproxy/admin.sock mode 660 level admin expose-fd listeners
stats timeout 30s
user haproxy
group haproxy
daemon

defaults
mode tcp
timeout client 10s
timeout connect 5s
timeout server 10s
timeout http-request 10s

frontend myfrontend
bind *:443
acl network_allowed src
tcp-request connection reject if !network_allowed
mode tcp
default_backend API

backend API
mode tcp
option forwardfor
server API