Proxying

Discussion in 'Alice (Minecraft)' started by RogueEmerald, Sep 16, 2015.

?

Can you help?

  1. Yes

    40.0%
  2. No

    60.0%
  1. RogueEmerald

    RogueEmerald New Member

    Joined:
    Sep 16, 2015
    Messages:
    20
    Likes Received:
    0
    Hello everyone! I am one of the newest members on this server. Can I have some help proxying it with a socks5 proxy? Thanks, Rogue_Emerald.;)
     
  2. FuzzyHarpyBug

    FuzzyHarpyBug Has the memory of a dead goldfish.

    Joined:
    May 5, 2013
    Messages:
    152
    Likes Received:
    60
    If you are already connected to the proxy, (I'm just guessing you're probably using putty). Open the SKCraft launcher and go to options, on the first tab try putting this in your JVM arguments box.

    -Dhttp.proxyHost=localhost -Dhttp.proxyPort=80 -Dhttps.proxyHost=localhost -Dhttps.proxyPort=443 -DsocksProxyHost=localhost -DsocksProxyPort=1080
     
  3. FuzzyHarpyBug

    FuzzyHarpyBug Has the memory of a dead goldfish.

    Joined:
    May 5, 2013
    Messages:
    152
    Likes Received:
    60
    Or you know... Just put in the port/username/password you have set up for your proxy in the proxy tab in the launcher options... ;)
     
  4. RogueEmerald

    RogueEmerald New Member

    Joined:
    Sep 16, 2015
    Messages:
    20
    Likes Received:
    0
    Ok! I will try!
     
  5. RogueEmerald

    RogueEmerald New Member

    Joined:
    Sep 16, 2015
    Messages:
    20
    Likes Received:
    0
    Mine doesn't use a username and password!
     
  6. RogueEmerald

    RogueEmerald New Member

    Joined:
    Sep 16, 2015
    Messages:
    20
    Likes Received:
    0
    This is the error I get! To report this error, please provide:

    java.net.ConnectException: Connection refused
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
    at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
    at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
    at java.net.Socket.connect(Socket.java:579)
    at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:618)
    at sun.security.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:160)
    at sun.net.NetworkClient.doConnect(NetworkClient.java:180)
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)
    at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:275)
    at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:371)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:932)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:153)
    at com.skcraft.launcher.util.HttpRequest.execute(HttpRequest.java:130)
    at com.skcraft.launcher.auth.YggdrasilLoginService.login(YggdrasilLoginService.java:45)
    at com.skcraft.launcher.dialog.LoginDialog$LoginCallable.call(LoginDialog.java:328)
    at com.skcraft.launcher.dialog.LoginDialog$LoginCallable.call(LoginDialog.java:316)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
     
  7. sk89q

    sk89q Administrator
    Staff Member

    Joined:
    Dec 1, 2011
    Messages:
    2,490
    Likes Received:
    1,504
    The launcher itself doesn't support a proxy yet, BUT since the launcher is made in Java too, you can apply what Fuzzy wrote to the launcher itself.

    Run

    java -Dhttp.proxyHost=localhost -Dhttp.proxyPort=80 -Dhttps.proxyHost=localhost -Dhttps.proxyPort=443 -DsocksProxyHost=localhost -DsocksProxyPort=1080 -jar SKCraftLauncher.jar
     
  8. RogueEmerald

    RogueEmerald New Member

    Joined:
    Sep 16, 2015
    Messages:
    20
    Likes Received:
    0
    Do I run it inside the launcher or outside using a .sh file?
     
  9. Penagwin

    Penagwin Linux Servers are better then windows!

    Joined:
    Feb 10, 2013
    Messages:
    114
    Likes Received:
    45
    in a terminal, or a .sh file would work. Remember to give the file permission to be executed.
     
  10. sk89q

    sk89q Administrator
    Staff Member

    Joined:
    Dec 1, 2011
    Messages:
    2,490
    Likes Received:
    1,504
    You need to run the launcher with those args. That cares of the launcher.

    BUT you also need to do it in the launcher because the launcher starts a new Java process for Minecraft.
     
  11. RogueEmerald

    RogueEmerald New Member

    Joined:
    Sep 16, 2015
    Messages:
    20
    Likes Received:
    0
    Do I run it inside the launcher or outside using a .sh file?
     
  12. RogueEmerald

    RogueEmerald New Member

    Joined:
    Sep 16, 2015
    Messages:
    20
    Likes Received:
    0
    Oh, and Penagwin, I am on a Linux right now!
     
  13. FuzzyHarpyBug

    FuzzyHarpyBug Has the memory of a dead goldfish.

    Joined:
    May 5, 2013
    Messages:
    152
    Likes Received:
    60
    You'll want to open the launcher by putting this into an .sh file:

    java -Dhttp.proxyHost=localhost -Dhttp.proxyPort=80 -Dhttps.proxyHost=localhost -Dhttps.proxyPort=443 -DsocksProxyHost=localhost -DsocksProxyPort=1080 -jar SKCraftLauncher.jar

    And then in the options in the launcher add this to your java arguments:

    -Dhttp.proxyHost=localhost -Dhttp.proxyPort=80 -Dhttps.proxyHost=localhost -Dhttps.proxyPort=443 -DsocksProxyHost=localhost -DsocksProxyPort=1080
     
  14. RogueEmerald

    RogueEmerald New Member

    Joined:
    Sep 16, 2015
    Messages:
    20
    Likes Received:
    0
    I get this error when I try to login:
    To report this error, please provide:

    java.net.SocketException: Can't connect to SOCKS proxy:Connection refused
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:428)
    at java.net.Socket.connect(Socket.java:579)
    at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:618)
    at sun.security.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:160)
    at sun.net.NetworkClient.doConnect(NetworkClient.java:180)
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)
    at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:275)
    at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:371)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:200)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:951)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:153)
    at com.skcraft.launcher.util.HttpRequest.execute(HttpRequest.java:130)
    at com.skcraft.launcher.auth.YggdrasilLoginService.login(YggdrasilLoginService.java:45)
    at com.skcraft.launcher.dialog.LoginDialog$LoginCallable.call(LoginDialog.java:328)
    at com.skcraft.launcher.dialog.LoginDialog$LoginCallable.call(LoginDialog.java:316)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
     
  15. sk89q

    sk89q Administrator
    Staff Member

    Joined:
    Dec 1, 2011
    Messages:
    2,490
    Likes Received:
    1,504
    Can you show me what you used to run the launcher?
     
  16. LordRedstone

    LordRedstone Best Coder 2k15

    Joined:
    Jun 14, 2012
    Messages:
    391
    Likes Received:
    73
    Is your SOCKS proxy actually running, and if so what port?
     
  17. RogueEmerald

    RogueEmerald New Member

    Joined:
    Sep 16, 2015
    Messages:
    20
    Likes Received:
    0
    Yes, on port 3128.
     
  18. RogueEmerald

    RogueEmerald New Member

    Joined:
    Sep 16, 2015
    Messages:
    20
    Likes Received:
    0
    Should I run this by itself: http.proxyHost=localhost -Dhttp.proxyPort=80 -Dhttps.proxyHost=localhost -Dhttps.proxyPort=443 -DsocksProxyHost=localhost -DsocksProxyPort=1080 or with SOCKS information?
     
  19. sk89q

    sk89q Administrator
    Staff Member

    Joined:
    Dec 1, 2011
    Messages:
    2,490
    Likes Received:
    1,504
    You really only need
    Code:
    -DsocksProxyHost=localhost -DsocksProxyPort=1080
    I'm not sure why Fuzzy suggested the other parameters. I assume they're for an HTTP proxy, but you have a SOCKS proxy.

    I just tested it with just those two parameters and it seemed to work (I was able to login and list modpacks, though I did not test logging into the server.).
     
    FuzzyHarpyBug likes this.
  20. LordRedstone

    LordRedstone Best Coder 2k15

    Joined:
    Jun 14, 2012
    Messages:
    391
    Likes Received:
    73
    You need to change
    Code:
    -DsocksProxyPort=1080
    to
    Code:
    -DsocksProxyPort=3128
    .