Untitled.png
Image didn't display. If anyone knows how to get the IP info from here, please let us know
@Xxxxxx said in Best method(s) to minimize/compact traffic consumption of project:
@sergerdn Okay! thanks a lot!
I made another approach with HAProxy. HAProxy looks like a more stable solution and much simple.
Basic idea:
+-------------+
| Browser |
+-------------+
|
v
+-------------+
| Haproxy |
+-------------+
|
+-----------------------> Proxy Provider 1 (if not google.com)
|
+-----------------------> Proxy Provider 2 (if google.com)
######### Proxy Inbound Configuration #########
frontend http-in
bind *:4000
mode http
option http-use-htx
option http_proxy
# An ACL is defined for backup domains, which are the domains that will be routed to the second proxy provider.
acl backup_domains hdr_end(host) -i lumtest.com || -i .google.com
use_backend provider_1 if !backup_domains
use_backend provider_2 if backup_domains
######### Proxy Providers Configuration #########
backend provider_1
mode http
http-request del-header Proxy-Authorization
http-request set-header Proxy-Authorization "Basic BASE64_VALUE_1"
server proxy_provider_1 zproxy.lum-superproxy.io:22225 check
backend provider_2
mode http
http-request del-header Proxy-Authorization
http-request set-header Proxy-Authorization "Basic BASE64_VALUE_2"
server proxy_provider_2 zproxy.lum-superproxy.io:22225 check
@cturan said in Best method(s) to minimize/compact traffic consumption of project:
@sergerdn It's a very clever method, and the config file works great, thanks for the idea.
You need to know that in production usage, configuring HAProxy can be a more complex task because of authorization and many other factors
@sergerdn said in Best method(s) to minimize/compact traffic consumption of project:
@cturan said in Best method(s) to minimize/compact traffic consumption of project:
@sergerdn It's a very clever method, and the config file works great, thanks for the idea.
You need to know that in production usage, configuring HAProxy can be a more complex task because of authorization and many other factors
Yes, for security I just gave access to our vpn server only.
# allow only our server
acl network_allowed src {vpn_ip}
tcp-request connection reject if !network_allowed
It doesn't work on every site, but since the site I need uses cdn with different domain, I redirected all cdn traffic to a cheap proxy, it worked very well.