Checking if RuriLib.Http proxy is down/unavailable

Hi to whom reads this,

I’m currently running across some issues with using proxies that maybe possibly down provided from the proxy provider so my application continues to fail. How could one avoid/check if proxy would be valid?

I have a try/catch around the affected area with ProxyException, but I don’t think that is the right way to handle such error. Ruri, how would you handle this in OB2?

Hey, I’m not sure I follow. Are you making a config or are you using RuriLib.Proxies in your own project? Anyways I think what you’re doing right now is correct.

1 Like

I’m not using RuriLib.Proxies in the project, just RuriLib.Http. Sometimes the proxy will go offline while I’m using it and I want to know how you would handle this in OB2

In OB2 I just go back to the start of the config and get another proxy from the pool to use, while banning the proxy that didn’t work (ideally you should set it as bad instead of banned in case of a ProxyException).

You can find the code for the proxy pool here