Open 123bistami opened 2 years ago
I've never have tweaked with this option but you should be able to customize your configuration file the way that fit you better. The only restriction is to keep the name and the ruby code inside it, since this is used to create the final configuration file with all the proxies in it.
I will have mutiple backends, for multiple proxy lists e.g. proxyA_list.txt, proxyB_list.txt And on haproxy proxyA backend proxyB backend this should be easy todo, can you modify starts.rb and send me the snippet, i am not a ruby expert, thanks
I think this is the snippet you are looking for. This is responsible for setting the front end port. Since we don't have an option to provide the desired port, the easiest way by now should be copying the folder, changing this value in the code and then running docker from there.
class Haproxy < Base
attr_reader :backends
def initialize(port = 5566)
@config_erb_path = "/usr/local/etc/haproxy.cfg.erb"
@config_path = "/usr/local/etc/haproxy.cfg"
@backends = []
super(port)
end
Hello,
thank you for sharing your work👍 how can i view the log output (the docker logs container_id is mixed, i will see the response code by ip), is there a way to view log of response codes 200,403,503… If i insert following to haproxy.cfg
defaults /etc/haproxy/errors/400.http errorfile 403 /home/ubuntu/rotating-proxy/errors/403.http
would it work?Can i Integrate it with logz.io or better is there a way to monitor the response codes in the built in stats function?
pls help, thanks.