How to set up Android sdk manager with socks?

The default Android SDK proxy is HTTP, but the problem is how can I use it with socks (my OS is win7)? Many thanks!

+4
source share
2 answers

JVM has a proxy environment variable.

[Linux]

export _JAVA_OPTIONS="-DsocksProxyHost=<YourProxyHost>"

[Windows]

set _JAVA_OPTIONS="-DsocksProxyHost=<YourProxyHost>"

The default port for the socks proxy server is 1080. If you are using your proxy server in a different port, you need to specify jvm, which is the port.

[Linux]

 export _JAVA_OPTIONS="-DsocksProxyHost=<YourProxyHost> -DsocksProxyPort=<YourProxyPort>"

[Windows]

set _JAVA_OPTIONS="-DsocksProxyHost=<YourProxyHost> -DsocksProxyPort=<YourProxyPort>"

And run the sdk manager for Android in the current session.

[Linux]

 bash /path/to/sdk/tools/android

[Windows]

 c:\path\to\android.exe

In the beginning you will see something like this:

[Linux]

 Picked up _JAVA_OPTIONS: -DsocksProxyHost=<YourProxyHost>
+9
source

Niknam ansuwer is perfect and I want to add if you use just add to your environment

export _JAVA_OPTIONS="-DsocksProxyHost=127.0.0.1 -DsocksProxyPort=9050"
0
source

All Articles