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
  • Try asking for help in the chatbox
  • Dynamically Changing Proxy


    SubCZ
     Share

    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?

     

    Edited by SubCZ
    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

    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 account

    Sign in

    Already have an account? Sign in here.

    Sign In Now
     Share

    ×
    ×
    • 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.