@morpheus93, @NotWegant
In my experience, to save on traffic, I implemented the following solution:
- Installed my own proxy software on a server
- Configured the scripts to use the server's address
- Redirected requests to either an expensive or cheap proxy on the server depending on the website's address.
I maintained my own list of websites for the cheap proxy. If a request was made to one of these websites, it was redirected to the cheap proxy. Otherwise, it was redirected to an expensive one. For example, if the request was for static files (CDN), I redirected it to the cheaper proxy.
I used Squid software for this purpose and wrote a script to maintain the required configuration files. This approach helped me optimize traffic and reduce costs for the websites I managed.
In addition, to further reduce traffic, I also banned some websites like google-analytics.com, hexagon-analytics.com, and many others instead of redirecting them to the cheaper proxy.
By using a cheaper proxy for requests to static files and maintaining a list of websites that could use the cheaper proxy, I was able to significantly reduce the cost of mobile traffic for that project.
However, I'm not sure that Squid is the best solution for this task. In the future, I plan to try using HAProxy because I think redirecting TCP connections may offer better performance. This could potentially lead to even further improve the performance.