SubCZ 254 Share Posted July 18, 2020 (edited) 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? Edited July 18, 2020 by SubCZ Link to comment Share on other sites More sharing options...
Pandemic 2426 Share 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? Link to comment Share on other sites More sharing options...
SubCZ 254 Author Share 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. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now