Using SOCKS with Minecraft

This is a documented bug...

And it doesn't look like it's getting fixed anytime soon. However, I'm going to play with modifying the .jar file and edit this answer when I've found the solution through that method.


Another Method

Even though the SOCKS forwarding is not done, we can do something else (slightly more annoying to configure, but it works).

Firstly, start up your SOCKS connection. Then, start up your launcher with the following command:

java -jar -DsocksProxyHost=127.0.0.1 -DsocksProxyPort=<proxy port> -DproxySet=true -Dhttp.nonProxyHosts="localhost|127.0.0.1" /path/to/launcher.jar

Also add the following command line arguments to your Minecraft Profile:

-DsocksProxyHost=127.0.0.1 -DsocksProxyPort=<proxy port> -DproxySet=true -Dhttp.nonProxyHosts="localhost|127.0.0.1" 

Replace <proxy port> with the port number you normally use to connect to SOCKS. This is to allow us to still be recognized as a valid session (because we're connecting from the correct IP).

Using your SOCKS server information, we can port forward by pure ssh:

ssh -N -f -q <SOCKS proxy IP> -L 25565:<MC server IP>:<MC server port>

Replace all the things in <> with the correct information, then go to your Minecraft server list and add the following server address:

localhost:25565

Connect to that server, and bingo. This connects through an encrypted SSH tunnel rather than via SOCKS.