Page 1 of 2 12 LastLast
Results 1 to 25 of 37

Thread: How To Get Simba To Open SMART Through Private Proxy?

  1. #1
    Join Date
    Jun 2015
    Location
    New Zealand
    Posts
    322
    Mentioned
    2 Post(s)
    Quoted
    131 Post(s)

    Default How To Get Simba To Open SMART Through Private Proxy?

    Hi guys,

    Could someone please advise me how to open SMART through a private proxy within Simba? I've paid for the proxy.

    I'd like to be able to do this so I can run multiple instances within one VPS or Desktop environment without IP clashing red flagging Jagex etc.

    Thanks for your time in helping

  2. #2
    Join Date
    Dec 2011
    Location
    East Coast, USA
    Posts
    4,231
    Mentioned
    112 Post(s)
    Quoted
    1869 Post(s)

    Default

    GitLab projects | Simba 1.4 | Find me on IRC or Discord | ScapeRune scripts | Come play bot ScapeRune!

    <BenLand100> we're just in the transitional phase where society reclassifies guns as Badâ„¢ before everyone gets laser pistols

  3. #3
    Join Date
    Feb 2011
    Location
    The Future.
    Posts
    5,600
    Mentioned
    396 Post(s)
    Quoted
    1598 Post(s)

    Default

    Simba Code:
    __smartCurrentTarget := smartSpawnClient(path, stringReplace(PluginPath, '\', '/', [rfReplaceAll]), params[0], ',' + params[1], w, h, smartInitSeq, smartUserAgent, '-Djava.net.useSystemProxies=true -DsocksProxyHost=208.80.144.112 -DsocksProxyPort=32899 -Dhttp.proxyHost=208.80.144.112 -Dhttp.proxyPort=32899 -Dhttps.proxyHost=208.80.144.112 -Dhttps.proxyPort=32899 -Dhttp.nonProxyHost=127.0.0.1|localhost', plugins);

    The above IP's are bad free proxies I found online.. You can see that the JVM attempts to use them so the above commands actually work:

    Capture.PNG
    I am Ggzz..
    Hackintosher

  4. #4
    Join Date
    Jun 2015
    Location
    New Zealand
    Posts
    322
    Mentioned
    2 Post(s)
    Quoted
    131 Post(s)

    Default

    Thanks guys, I will test them. Anyway to verify within the Smart client itself of the IP address that I'm using? Is it within the lobby system? I.e.: You connected from X,Y etc.

  5. #5
    Join Date
    Dec 2011
    Location
    East Coast, USA
    Posts
    4,231
    Mentioned
    112 Post(s)
    Quoted
    1869 Post(s)

    Default

    Quote Originally Posted by kiwikiwi View Post
    Thanks guys, I will test them. Anyway to verify within the Smart client itself of the IP address that I'm using? Is it within the lobby system? I.e.: You connected from X,Y etc.
    iirc RS doesn't show the last IP anymore, if the console window reports success in connecting, then you can be sure you're connected to the proxy

    (declare smartShowConsole := true; before setupSRL() if you don't already have a SMART console)
    Last edited by KeepBotting; 10-12-2015 at 10:36 PM.
    GitLab projects | Simba 1.4 | Find me on IRC or Discord | ScapeRune scripts | Come play bot ScapeRune!

    <BenLand100> we're just in the transitional phase where society reclassifies guns as Badâ„¢ before everyone gets laser pistols

  6. #6
    Join Date
    Jun 2015
    Location
    New Zealand
    Posts
    322
    Mentioned
    2 Post(s)
    Quoted
    131 Post(s)

    Default

    Quote Originally Posted by KeepBotting View Post
    iirc RS doesn't show the last IP anymore, if the console window reports success in connecting, then you can be sure you're connected to the proxy

    (declare smartShowConsole := true; before setupSRL() if you don't already have a SMART console)
    Cheers + REP

  7. #7
    Join Date
    Oct 2015
    Location
    Texas
    Posts
    37
    Mentioned
    1 Post(s)
    Quoted
    12 Post(s)

    Default

    Quote Originally Posted by Brandon View Post
    Simba Code:
    __smartCurrentTarget := smartSpawnClient(path, stringReplace(PluginPath, '\', '/', [rfReplaceAll]), params[0], ',' + params[1], w, h, smartInitSeq, smartUserAgent, '-Djava.net.useSystemProxies=true -DsocksProxyHost=208.80.144.112 -DsocksProxyPort=32899 -Dhttp.proxyHost=208.80.144.112 -Dhttp.proxyPort=32899 -Dhttps.proxyHost=208.80.144.112 -Dhttps.proxyPort=32899 -Dhttp.nonProxyHost=127.0.0.1|localhost', plugins);

    The above IP's are bad free proxies I found online.. You can see that the JVM attempts to use them so the above commands actually work:

    Capture.PNG

    Where exactly do you enter this line of code at? As i have entered it just after clearDebug and it returns an error "Unknown declaration path"

    I am somewhat new to java coding and am working on reading a few of the books as well as watching some vids.

  8. #8
    Join Date
    Sep 2015
    Posts
    65
    Mentioned
    7 Post(s)
    Quoted
    20 Post(s)

    Default

    Quote Originally Posted by Corruptedx View Post
    Where exactly do you enter this line of code at? As i have entered it just after clearDebug and it returns an error "Unknown declaration path"

    I am somewhat new to java coding and am working on reading a few of the books as well as watching some vids.
    For starters, this isn't Java. Also try placing it right before 'setupSRL'. I am pretty sure that would work.

  9. #9
    Join Date
    Oct 2015
    Location
    Texas
    Posts
    37
    Mentioned
    1 Post(s)
    Quoted
    12 Post(s)

    Default

    Quote Originally Posted by SHIELD View Post
    For starters, this isn't Java. Also try placing it right before 'setupSRL'. I am pretty sure that would work.

    Scripting in general* And that is where I am placing it and it is returning the error.

  10. #10
    Join Date
    Sep 2015
    Posts
    65
    Mentioned
    7 Post(s)
    Quoted
    20 Post(s)

    Default

    Quote Originally Posted by Corruptedx View Post
    Scripting in general* And that is where I am placing it and it is returning the error.
    What does your setup procedure look like?

    E: Put it under smartCreateClient in the include.

    If you put the line in there then it would work. I dont know why I was thinking the setup.. :P

  11. #11
    Join Date
    Oct 2015
    Location
    Texas
    Posts
    37
    Mentioned
    1 Post(s)
    Quoted
    12 Post(s)

    Default

    Quote Originally Posted by SHIELD View Post
    What does your setup procedure look like?

    E: Put it under smartCreateClient in the include.

    If you put the line in there then it would work. I dont know why I was thinking the setup.. :P

    Awesome! Found the place you were talking about and got it entered in. Still getting an error but now its an applet failed to start. So I will dive more into it later but for now i need to head out. Thanks again for the help!

  12. #12
    Join Date
    Oct 2015
    Location
    Texas
    Posts
    37
    Mentioned
    1 Post(s)
    Quoted
    12 Post(s)

    Default

    Ok so here is where i am stuck at. I have it reading the proxy however when it launches it says socks proxy failed to authenticate. I have included -Djava.net.socks.username=myusername -Djava.net.socks.password=mysecret right after i specify the socksproxyhost and socksproxyport.

    Any ideas?

  13. #13
    Join Date
    Dec 2011
    Location
    East Coast, USA
    Posts
    4,231
    Mentioned
    112 Post(s)
    Quoted
    1869 Post(s)

    Default

    Quote Originally Posted by Corruptedx View Post
    Ok so here is where i am stuck at. I have it reading the proxy however when it launches it says socks proxy failed to authenticate. I have included -Djava.net.socks.username=myusername -Djava.net.socks.password=mysecret right after i specify the socksproxyhost and socksproxyport.

    Any ideas?
    Possibly specify your credentials before you specify the SOCKS proxy's IP and port?
    GitLab projects | Simba 1.4 | Find me on IRC or Discord | ScapeRune scripts | Come play bot ScapeRune!

    <BenLand100> we're just in the transitional phase where society reclassifies guns as Badâ„¢ before everyone gets laser pistols

  14. #14
    Join Date
    Oct 2015
    Location
    Texas
    Posts
    37
    Mentioned
    1 Post(s)
    Quoted
    12 Post(s)

    Default

    Quote Originally Posted by KeepBotting View Post
    Possibly specify your credentials before you specify the SOCKS proxy's IP and port?
    No go. Still fails to authenticate. I double checked the username and password as well. On maxthon browser and the ip and maxthon connects to the proxy with the same credentials and ip.

  15. #15
    Join Date
    May 2013
    Posts
    46
    Mentioned
    0 Post(s)
    Quoted
    24 Post(s)

    Default

    could someone post a example that will bring up SMART GUI so i can input that into my script and beable to use the GUI

  16. #16
    Join Date
    Mar 2015
    Posts
    28
    Mentioned
    1 Post(s)
    Quoted
    13 Post(s)

    Default

    Has anybody found a working version yet? I'm currently trying it out myself but can't seem te get it working...

    What i've tried so far:

    @Brandon
    Public server without auth(list):
    -Djava.net.useSystemProxies=true -DsocksProxyHost=178.63.98.136 -DsocksProxyPort=4344 -Dhttp.proxyHost=178.63.98.136 -Dhttp.proxyPort=4344 -Dhttps.proxyHost=178.63.98.136 -Dhttps.proxyPort=4344 -Dhttp.nonProxyHost=127.0.0.1|localhost

    Own SOCKS5 proxy:
    -Djava.net.useSystemProxies=true -DsocksProxyHost=ip -DsocksProxyPort=port -Dhttp.proxyHost=ip -Dhttp.proxyPort=port -Dhttps.proxyHost=ip -Dhttps.proxyPort=port -Djava.net.socks.username=myusername -Djava.net.socks.password=mysecret -Dhttp.nonProxyHost=127.0.0.1|localhost

    Both have the same result: img

    @KeepBotting
    Where he refers to brandons comment wich suggests this:
    -Dhttp.proxyHost=IPAddressHere -Dhttp.proxyPort=PortNumberHere -Dhttps.proxyHost=IPAddressHere -Dhttps.proxyPort=PortNumberHere -Djava.net.socks.username=UserNameHere -Djava.net.socks.password=PwdHere -Dhttp.nonProxyHosts=127.0.0.1|localhost

    -Changing the order where you put the authentication first

    Both have this result: img


    Tried some removing/adding params https/http/socks/useSystemProxies/nonproxyhosts:
    All have the same result: img


    Using HTTP proxy instead of SOCKS5:
    -Djava.net.useSystemProxies=true -DsocksProxyHost=168.63.24.174 -DsocksProxyPort=8132 -Dhttp.proxyHost=168.63.24.174 -Dhttp.proxyPort=8132 -Dhttps.proxyHost=168.63.24.174 -Dhttps.proxyPort=8132 -Dhttp.nonProxyHost=127.0.0.1|localhost
    Result: img

    So this 'does' work? But i've done some reading and this isn't something we want cause it doesn't guarantee anonymity?


    If anybody knows a solution to this problem I would be so grateful!

    Gratz in advance

    Clownhair
    Last edited by Clownhair; 10-29-2015 at 10:39 AM.

  17. #17
    Join Date
    Feb 2011
    Location
    The Future.
    Posts
    5,600
    Mentioned
    396 Post(s)
    Quoted
    1598 Post(s)

    Default

    Quote Originally Posted by Clownhair View Post
    Has anybody found a working version yet? I'm currently trying it out myself but can't seem te get it working...

    What i've tried so far:

    @Brandon

    I'll have to investigate why SMART behaves the way it does.. I've JUST tested this right now with a loader I created for this purpose:

    Test it and see if RS loads for you. If it does, then SMART has a problem. These proxies are slow!

    Java Code:
    import javax.swing.*;
    import java.applet.Applet;
    import java.applet.AppletContext;
    import java.applet.AppletStub;
    import java.awt.*;
    import java.awt.event.WindowAdapter;
    import java.awt.event.WindowEvent;
    import java.awt.event.WindowListener;
    import java.io.*;
    import java.net.MalformedURLException;
    import java.net.URL;
    import java.net.URLClassLoader;
    import java.net.URLConnection;
    import java.util.HashMap;
    import java.util.regex.Matcher;
    import java.util.regex.Pattern;

    /**
     * Created by Brandon on 2015-10-30.
     */

    public class Main {
        public static void main(String[] args) throws MalformedURLException {

            System.setProperty("socksProxyHost", "173.193.126.150");
            System.setProperty("socksProxyPort", "32471");


            JPopupMenu.setDefaultLightWeightPopupEnabled(false);


            JFrame frame = new JFrame("Test Proxy");
            frame.setLayout(new BorderLayout());
            frame.setFocusable(false);
            frame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
            frame.getContentPane().add(new JLabel(splashIcon()), BorderLayout.CENTER);
            frame.pack();
            centerWindow(frame);
            frame.setVisible(true);

            AppletPanel panel = new AppletPanel("http://world43.runescape.com", 800, 600);
            panel.start();
            frame.getContentPane().remove(0);
            frame.getContentPane().add(panel, BorderLayout.CENTER);
            frame.pack();


            frame.addWindowListener(new WindowAdapter() {

                @Override
                public void windowClosing(WindowEvent e) {
                    panel.destruct();
                    frame.dispose();
                    System.exit(0);
                }

                @Override
                public void windowClosed(WindowEvent e) {

                }
            });
        }

        public static ImageIcon splashIcon() {
            try {
                ImageIcon Icon = new ImageIcon(new URL("http://www.runescape.com/img/game/splash.gif"));
                Icon.setImageObserver(null);
                return Icon;
            } catch (Exception Ex) {
                Ex.toString();
            }
            return null;
        }

        public static void centerWindow(JFrame frame) {
            Dimension ScreenSize = Toolkit.getDefaultToolkit().getScreenSize();
            int X = (int) ((ScreenSize.getWidth() - frame.getWidth()) / 2);
            int Y = (int) ((ScreenSize.getHeight() - frame.getHeight()) / 2);
            frame.setLocation(X, Y);
        }

        public static final class AppletPanel extends JPanel implements AppletStub {

            private Applet applet = null;
            private boolean initialized = false;
            private HashMap<String, String> parameters = new HashMap<>();
            private static final long serialVersionUID = -5836846270535785031L;
            private final Pattern codeRegex = Pattern.compile("code=(.*) ");
            private final Pattern archiveRegex = Pattern.compile("archive=(.*) ");
            private final Pattern parameterRegex = Pattern.compile("<param name=\"([^\\s]+)\"\\s+value=\"([^>]*)\">");
            private URL documentBase = null, codeBase = null;

            public AppletPanel(String World, int Width, int Height) {
                try {
                    this.setLayout(new BorderLayout(0, 0));
                    String PageSource = this.downloadPage(new URL(World));
                    Matcher CodeMatcher = codeRegex.matcher(PageSource);
                    Matcher ArchiveMatcher = archiveRegex.matcher(PageSource);

                    if (CodeMatcher.find() && ArchiveMatcher.find()) {
                        String Archive = ArchiveMatcher.group(1);
                        String JarLocation = World + "/" + Archive;
                        String Code = CodeMatcher.group(1).replaceAll(".class", "");
                        Matcher ParameterMatcher = parameterRegex.matcher(PageSource);
                        this.documentBase = new URL(World);
                        this.codeBase = new URL(World);

                        while (ParameterMatcher.find()) {
                            this.parameters.put(ParameterMatcher.group(1), ParameterMatcher.group(2));
                        }

                        URLClassLoader ClassLoader = new URLClassLoader(new URL[]{new URL(JarLocation)});
                        applet = (Applet) ClassLoader.loadClass(Code).newInstance();

                        applet.setStub(this);
                        applet.setPreferredSize(new Dimension(Width, Height));
                        this.add(applet, BorderLayout.CENTER);
                    }
                } catch (IOException | ClassNotFoundException | InstantiationException | IllegalAccessException Ex) {
                    System.out.println(Ex.getMessage());
                }
            }

            public Applet getApplet() {
                return applet;
            }

            public void start() {
                if (applet != null && !initialized) {
                    applet.init();
                    applet.start();
                    initialized = true;
                }
            }

            public void destruct() {
                if (applet != null && initialized) {
                    initialized = false;
                    this.remove(applet);
                    applet.stop();
                    applet.destroy();
                    applet = null;
                }
            }


            public String downloadPage(URL Address) throws IOException {
                try {
                    URLConnection Connection = Address.openConnection();
                    Connection.addRequestProperty("Protocol", "HTTP/1.1");
                    Connection.addRequestProperty("Connection", "keep-alive");
                    Connection.addRequestProperty("Keep-Alive", "200");
                    Connection.addRequestProperty("User-Agent", "Mozilla/5.0 (Windows NT 6.1; rv:9.0.1) Gecko/20100101 Firefox/9.0.1");
                    Connection.setConnectTimeout(15000);
                    Connection.setReadTimeout(15000);

                    byte[] Buffer = new byte[Connection.getContentLength()];
                    try (DataInputStream Stream = new DataInputStream(Connection.getInputStream())) {
                        Stream.readFully(Buffer);
                    }
                    return new String(Buffer);
                } catch (Exception Ex) {
                    Ex.printStackTrace();
                    return null;
                }
            }

            @Override
            public boolean isActive() {
                return true;
            }

            @Override
            public URL getDocumentBase() {
                return documentBase;
            }

            @Override
            public URL getCodeBase() {
                return codeBase;
            }

            @Override
            public String getParameter(String name) {
                return parameters.get(name);
            }

            @Override
            public AppletContext getAppletContext() {
                return null;
            }

            @Override
            public void appletResize(int width, int height) {

            }
        }
    }


    It without a doubt connects to the proxy and loads RS. I've only tested this on OSX El Capitan. I've even removed the system.setProperty and did it via command line. It still works.

    Again, I'll have to test SMART.
    Last edited by Brandon; 10-31-2015 at 02:47 AM.
    I am Ggzz..
    Hackintosher

  18. #18
    Join Date
    Feb 2011
    Location
    The Future.
    Posts
    5,600
    Mentioned
    396 Post(s)
    Quoted
    1598 Post(s)

    Default

    Quote Originally Posted by Clownhair View Post
    Has anybody found a working version yet? I'm currently trying it out myself but can't seem te get it working...
    So I had some time and I tested it on OSX.. Works. I did have to increase the connection timeout though. SMART's timeout is 5 seconds. That's way to short for such crappy proxy connections.


    At 15 seconds timeout, SMART successfully connects to the Proxy's on the list you provided. Takes FOREVER to load though..

    Modify client.java to change the timeout in the downloadHTML function:

    Java Code:
    conn.setConnectTimeout(15000);
    conn.setReadTimeout(15000);

    After that it prints:

    Progress Report:
    SMART: Located 0 clients
    SMART: Located 0 clients
    SMART: Located 0 clients
    SMART[8244]: Starting remote 8244
    SMART: Setting the client's controller to our TID
    SMART: Attempting to connect to localhost:63885
    SMART[8244]: Registration Response: 5
    SMART[8244]: JVM Garbage Collection Invoked
    SMART[8244]: Java Initilized - SMART Starting



    Without the increase, it says "Connection timed out" or "Read timed out". If the proxy is invalid it says: "Connection to SOCKS proxy refused".

    Tested on OSX only.
    I am Ggzz..
    Hackintosher

  19. #19
    Join Date
    Mar 2015
    Posts
    28
    Mentioned
    1 Post(s)
    Quoted
    13 Post(s)

    Default

    Quote Originally Posted by Brandon View Post
    At 15 seconds timeout, SMART successfully connects to the Proxy's on the list you provided. Takes FOREVER to load though..

    Modify client.java to change the timeout in the downloadHTML function:

    Java Code:
    conn.setConnectTimeout(15000);
    conn.setReadTimeout(15000);
    Thanks for putting your time into this however you've lost me.
    As I understand it: you created a new java app where your main class is client.java and you run that to get a 'smart' client going? Even if I would get this working (atm doesn't work -> content is null so can't get contentlength in downloadPage)
    How am I going to get it to work together with Simba? Are you implieing to start a client with java app and then use the 'select a client' feature in simba?

  20. #20
    Join Date
    Feb 2011
    Location
    The Future.
    Posts
    5,600
    Mentioned
    396 Post(s)
    Quoted
    1598 Post(s)

    Default

    Quote Originally Posted by Clownhair View Post
    Thanks for putting your time into this however you've lost me.
    As I understand it: you created a new java app where your main class is client.java and you run that to get a 'smart' client going? Even if I would get this working (atm doesn't work -> content is null so can't get contentlength in downloadPage)
    How am I going to get it to work together with Simba? Are you implieing to start a client with java app and then use the 'select a client' feature in simba?

    No. I modified the existing SMART application and added those two lines..


    Then I recompiled SMART with the modifications and voila.


    Downloads:

    Here's the project for OSX: SMART-master.zip
    Here's the SMART loader to test for OSX: SMARTLoader.zip


    Debug Downloads: (prints JVM arguments)

    SMART-master-debug.zip


    Screenshots:

    http://i.imgur.com/h2VzuDi.jpg
    http://i.imgur.com/XLooFo8.jpg

    If you're using Windows, you only need to download the above Jar file from Smart-master.zip dist folder. If you're using OSX or Linux, you need to download all of the above files.




    Details of my modifications: ( @BenLand100; this argument passing or similar might need to be added to the official SMART Github Repository.. Don't know if you also want to add proxy authentication support as well..)

    What I did was modify SmartRemote.cpp (only needed for OSX and Linux.. Windows already has this) to allow Java arguments for Linux and OSX by changing the execution function to:

    C++ Code:
    //Passes JVM arguments on Linux and OSX..
    char *args[256] = {0};
           
            int i = 0;
            args[i++] = java_exec;
           
            if (javaargs) {
                char *str = strdup(javaargs); //because strtok doesn't work on const char*. Must be char*.
                char *ch = strtok(str, " ");
                while (ch != NULL) {
                    args[i++] = ch; //might need strdup but meh.. it works..
                    ch = strtok(NULL, " ");
                }
                free(str);
            }
           
            args[i++] = bootclasspath;
            args[i++] = "smart.Main";
            args[i++] = library;
            args[i++] = root;
            args[i++] = params;
            args[i++] = _width;
            args[i++] = _height;
            args[i++] = initseq;
            args[i++] = useragent;
            args[i++] = remote_path;
            args[i++] = plugins;
            args[i++] = NULL;
            args[i++] = NULL;
           
            //execlp(java_exec,java_exec,javaargs,bootclasspath,"smart.Main",library,root,params,_width,_height,initseq,useragent, remote_path, plugins, NULL);
           
            execvp(java_exec, args);
            debug << "Process terminating. If nothing happened, make sure java is on your path and that SMART is installed correctly.\n";
            exit(1);




    Then I modified Client.java to increase the connect and read timeout:

    Java Code:
    private String downloadHTML(String address) {
            try {
                URL url = new URL(address);
                URLConnection conn = url.openConnection();
                conn.setConnectTimeout(15000);
                conn.setReadTimeout(15000);
                //Firefox didn't set anything important that java didn't set by default, besides the useragent
                //this useragent is for your browser, modify at will
               
                //conn.addRequestProperty("Protocol", "HTTP/1.1");
                //conn.addRequestProperty("Connection", "keep-alive");
                //conn.addRequestProperty("Keep-Alive", "200");
                conn.addRequestProperty("User-Agent",useragent == null ? USER_AGENT : useragent);
                conn.connect();
                BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
                StringBuilder builder = new StringBuilder();
                String inputLine;
                while ((inputLine = in.readLine()) != null) {
                    builder.append(inputLine).append("\n");
                }
                in.close();
                return builder.toString();
            } catch (Exception e) {
                Main.debug(e.getMessage());
                return null;
            }
        }


    Finally, I compiled all of it and voila.. Can connect to any proxy.. I have attached the compiled files above. Simba will load it just fine. I tested using the following arguments:

    Simba Code:
    .
    -DsocksProxyHost=93.92.200.67 -DsocksProxyPort=9050 -Dhttp.nonProxyHosts=local|*.local|169.254/16|*.169.254/16
    .



    EDIT: I just got an PM from clown hair that his/her SOCKS5 proxy doesn't work and requires authentication. He/she did confirm that it worked with public proxies though.. I had to add a further modification to SMART for authentication:

    I modified Main.java and added the following code:

    Java Code:
    public static void main(String[] exec_args) {
            if (exec_args.length != 9) System.exit(1);

            if (Boolean.valueOf(System.getProperty("socksCustomAuthentication"))) {
                Authenticator.setDefault(new Authenticator() {
                    @Override
                    protected PasswordAuthentication getPasswordAuthentication() {
                        String username = System.getProperty("java.net.socks.username");
                        String password = System.getProperty("java.net.socks.password");
                        return new PasswordAuthentication(username, password == null ? new char[]{} : password.toCharArray());
                    }
                });
            }

            System.clearProperty("socksCustomAuthentication"); //Just in case Jagex decides to check for custom JVM flags..

          //Rest of SMART's code here..
    }


    Now when the new arguments to SMART's command line is as follows:


    Simba Code:
    .
    -DsocksCustomAuthentication=true -DsocksProxyHost=IpOrHostNameHere -DsocksProxyPort=PortNumberHere -Djava.net.socks.username=UserNameHere -Djava.net.socks.password=PasswordHere -Dhttp.nonProxyHosts=local|*.local|169.254/16|*.169.254/16
    .

    The -DsocksCustomAuthentication=true will set my boolean to true and allow it to use the custom password authentication. I've tested this using the Proxy provided by clown hair.


    I have re-uploaded the files with the new modifications. You can feel free to download and test them.
    Last edited by Brandon; 05-08-2016 at 04:46 PM.
    I am Ggzz..
    Hackintosher

  21. #21
    Join Date
    Mar 2015
    Posts
    28
    Mentioned
    1 Post(s)
    Quoted
    13 Post(s)

    Default

    Quote Originally Posted by Brandon View Post
    I have re-uploaded the files with the new modifications. You can feel free to download and test them.
    This guy!!! He deserves a cookie or whatever he prefers .

    I can now confirm that everything is working with a SOCKS5 proxy that requires authentication.

    However in my case there is no need for the added connect/read timeout in case Ben would include this as i'm using a private SOCKS5 proxy with low latency.

    Again thank you so much @Brandon for putting your time into this!

  22. #22
    Join Date
    Feb 2011
    Location
    The Future.
    Posts
    5,600
    Mentioned
    396 Post(s)
    Quoted
    1598 Post(s)

    Default

    Quote Originally Posted by Clownhair View Post
    This guy!!! He deserves a cookie or whatever he prefers .

    I can now confirm that everything is working with a SOCKS5 proxy that requires authentication.

    However in my case there is no need for the added connect/read timeout in case Ben would include this as i'm using a private SOCKS5 proxy with low latency.

    Again thank you so much @Brandon for putting your time into this!

    You're welcomed. Thanks for providing the proxy & public list for testing. I won't be using it but that helped me solve the issue. As for the timeout, yeah it doesn't really need to increase in an official release, but the above files will always be there for slower connections.. I don't know if any of the above changes will make it into an official release but we'll see. It's up to Ben.

    Anyway, thanks for testing & being patient.
    Last edited by Brandon; 11-01-2015 at 06:59 PM.
    I am Ggzz..
    Hackintosher

  23. #23
    Join Date
    Jun 2015
    Location
    New Zealand
    Posts
    322
    Mentioned
    2 Post(s)
    Quoted
    131 Post(s)

    Default

    @Brandon - Thank-you for doing this. I have downloaded the Jar file from Smart-master.zip dist folder and copied it into Simba > Plugins and overrided the existing smart.jar file.

    However, when I start a script, I get the following error: tSmart.create() failed.

    I am a Windows user.

    I'm assuming I need to put in some proxy settings under tSmart.create(), but I'm not sure where to find the corresponding file? Could you please provide some assistance here?

    Thanks

    Think I have found the include smart.simba in oglib, just need to know what to put inside this I believe?

    Simba Code:
    procedure tSmart.create(funcWidth,funcHeight:int32);overload;
    var
      funcParams:tStringArray;
    begin
      if not self.setPair() then
      begin
        if length(funcParams:=self.getParams())<2 then
        begin
          ogl.debug('tSmart.getParameters() failed');
          terminateScript();
        end;
        self.target:=smartSpawnClient(self.getJavaPath(),replace(pluginPath,'\','/',[0]),funcParams[0],','+funcParams[1],funcWidth,funcHeight,'',self.getUserAgent(),'-XX:MinHeapFreeRatio=20 -XX:MaxHeapFreeRatio=30','OpenGL32.dll');
        if self.target then
        begin
          try
            self.pid:=smartGetClientPID(self.target);
            setEIOSTarget('libsmartremote',toStr(self.pid));
            self.graphics.create(funcWidth,funcHeight,smartDebugArray(self.target));
            insert(@self,smartPointers);
          except
            ogl.debug('tSmart.create() failed');
            smartFreeClient(self.target);
            terminateScript();
          end;
        end else
        begin
          ogl.debug('tSmart.create() failed');
          smartFreeClient(self.target);
          terminateScript();
        end;
      end;
      addOnTerminate('tSmartSetFree');
    end;

  24. #24
    Join Date
    Feb 2011
    Location
    The Future.
    Posts
    5,600
    Mentioned
    396 Post(s)
    Quoted
    1598 Post(s)

    Default

    Quote Originally Posted by kiwikiwi View Post
    @Brandon
    Append it to the JVM arguments.. The same argument as HeapFreeRatio. Those are JVM arguments to determine when the JVM frees memory. Your arguments will be that PLUS the proxy arguments/settings.

    Example:

    Simba Code:
    smartSpawnClient(self.getJavaPath(),replace(pluginPath,'\','/',[0]),funcParams[0],','+funcParams[1],funcWidth,funcHeight,'',self.getUserAgent(),'-XX:MinHeapFreeRatio=20 -XX:MaxHeapFreeRatio=30 -DsocksCustomAuthentication=true -DsocksProxyHost=IpOrHostNameHere -DsocksProxyPort=PortNumberHere -Djava.net.socks.username=UserNameHere -Djava.net.socks.password=PasswordHere -Dhttp.nonProxyHosts=local|*.local|169.254/16|*.169.254/16','OpenGL32.dll');
    I am Ggzz..
    Hackintosher

  25. #25
    Join Date
    Jun 2015
    Location
    New Zealand
    Posts
    322
    Mentioned
    2 Post(s)
    Quoted
    131 Post(s)

    Default

    Thanks Brandon! Plus rep!

    For anyone who is noob-ish like me, do the above on line 39 of smart.simba inside misc folder of oblib > lib > misc

    Peace to ya'll.

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •