CatCoder
CatCoder

Reputation: 248

How to use tor on Android SDK Manager

I wanted to use Android SDK Manager on Windows 8.1 but due to sanctions on Iran I can't use it properly. So I need tor for that but in its Proxy settings, it only have HTTP but Tor use socks5. Have can I use Android SDK Manager without limit?

Upvotes: 6

Views: 2603

Answers (4)

tokimay
tokimay

Reputation: 11

I had same issue. Do this actions:

  1. do not change android studio proxy setting (use no proxy)
  2. start tor browser
  3. in terminal use this command:

    $ torsocks -P 9150 /YOUR PATH/studio.sh

it's work bot it's too Slowly

Upvotes: 1

SemyColon.Me
SemyColon.Me

Reputation: 388

Use Tor Browser. when your tor browser is connected :

1.Open Menu ->Select Options -> Advanced -> Network -> Connection Setting

then you'll see your Tor socks's name and port.

2.Copy Sock's Host : Ip for example 127.0.0.1:9150

leave tor browser open

4.Go to Android Studio ->Settings -> Appearance & Behavior -> System Settings -> HTTP Proxy

5.in the right section Select Manual Proxy Configuration and Socks

6.Fill Host and Port fields with Tor Host and Port

7.OK!!!

if Android Studio asked for HTTP settings leave it empty.

now you can update your SDK and Download Dependencies with Gradle :)

Upvotes: 1

ivan866
ivan866

Reputation: 582

In cmd:

sdkmanager.bat --proxy=socks --proxy_host=127.0.0.1 --proxy_port=9050 "platforms;android-25"  

or in Android Studio: File->Settings->Appearance & Behaviour/System Settings/HTTP Proxy - Manual proxy configuration: SOCKS...

Upvotes: 2

Jehy
Jehy

Reputation: 4899

Tor uses Socks4a, not Socks5. So you need a client that implements Socks4a. I resolved this by implementing my own Socket factories for apache httpComponents library. You can check it here.

Upvotes: 0

Related Questions