Jump to content
Frequently Asked Questions
  • Are you not able to open the client? Try following our getting started guide
  • Still not working? Try downloading and running JarFix
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS/Crypto gold? You can purchase vouchers from other users
  • Dynamically Changing Proxy


    SubCZ

    Recommended Posts

    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?

     

    Link to comment
    Share on other sites

    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

    Archived

    This topic is now archived and is closed to further replies.

    ×
    ×
    • Create New...

    Important Information

    We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.