SubCZ 284 Posted July 18, 2020 I am trying to dynamically change the proxy on my Dreambot client through code while a script is running (in order to let the script switch accounts). The script is logging out the current account and then calls the following lines to change the proxy: System.setProperty("socksProxyHost", HOST); System.setProperty("socksProxyPort", PORT); System.setProperty("java.net.socks.username", USERNAME); System.setProperty("java.net.socks.password", PASSWORD); where HOST, PORT, USERNAME, and PASSWORD are Strings. The script runs this part without throwing exceptions and logs the properties using System.getProperty(...) to confirm that the change was successful, but when it tries to log in, the runescape client gives me a "Couldn't connect to Server" message and the world selection in the log in screen can not be opened either. I assume this means the client did not connect to the proxy correctly. Is there anything missing in my code?
Pandemic 2842 Posted July 19, 2020 Hey there, that looks right to me. If you open a new tab, does it load correctly and allow you to login?
SubCZ 284 Author Posted July 19, 2020 No, if I pause the script after the new proxy has been set and I open a new tab the console logs "Failed to connect to OSRS, retrying...". I've confirmed though that the proxy is accurate and functioning as expected if I use the launcher window to set it.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.