FORUMS
Remove All Ads from XDA

[TUT] HTTP Proxy through USB Cable

1,266 posts
Thanks Meter: 4,786
 
By doixanh, Inactive Recognized Developer on 9th June 2011, 09:31 AM
Post Reply Email Thread
Intro
Warning: this tutorial is highly technical for many users!

Yeah, as I mentioned in FroyoBread thread, we can use HTTP proxy via USB cable for Browsers and Maps (only in FroyoBread v011 and later) and some other apps (OperaMini for example). Market, Facebook and XDA app don't support Proxy though.

That means these apps can access the internet with an HTTP Proxy installed in your computer.

It's rather complicated, and platform-dependent (Linux or Windoze).

Requirements
  • High IQ!
  • A mini USB cable that connects your PC with your Phone!
  • Rooted
  • A ROM with dropbear included. All CM6/CM7 ROMs has dropbear already. SE's Eclair does NOT have dropbear.
  • adb (officially from android sdk)
  • FroyoBread v011 or higher for stock Browser and Maps
  • An SSH client in your PC, capable of client-2-server port forwarding


General instruction
These are general steps to show the idea. Don't worry, the specific part is below.
  • Install HTTP Proxy in your PC
  • Install an SSH client in your PC
  • Start adb server
  • Generate dropbear's rsa and dss keys in phone.
  • Start dropbear in phone.
  • Forward port 22 from your phone to port 2222 in your PC
  • From PC, ssh to localhost, port 2222 (that means ssh to phone's dropbear, port 22), enable client-2-server port forwarding for the proxy port
  • Configure proxy settings in phone
  • Enjoy

Linux
These instructions are specific for Linux. I assume that you use Ubuntu. Other distros should be similar. All of these commands are used in your PC.
  • Install HTTP Proxy in your PC. We use tinyproxy in this example.
    Code:
    $ sudo apt-get install tinyproxy
  • Install an SSH client in your PC. Ubuntu has ssh client (ssh) by default, but just in case you don't have that:
    Code:
    $ sudo apt-get install ssh
  • Start adb server
    Code:
    $ sudo adb kill-server
    $ sudo adb start-server
  • Generate dropbear's rsa and dss keys in phone.
    Code:
    $ adb shell mkdir -p /data/dropbear
    $ adb shell dropbearkey -t rsa -f /data/dropbear/dropbear_rsa_host_key
    $ adb shell dropbearkey -t dss -f /data/dropbear/dropbear_dss_host_key
  • Start dropbear in phone
    Code:
    $ adb shell dropbear
  • Forward port 22 from your phone to port 2222 in your PC
    Code:
    $ adb forward tcp:2222 tcp:22
  • From PC, ssh to localhost, port 2222 (that means ssh to phone's dropbear, port 22), enable client-2-server port forwarding for the proxy port 8080 (default with tinyproxy)
    Code:
    $ ssh localhost -p 2222 -R 8080:localhost:8080
  • Configure proxy settings in phone with these parameters:
    Code:
    Host: localhost
    Port: 8080
  • Enjoy
    Code:
    Try OperaMini (for other ROMs) or Browser and Maps included in FroyoBread


Windoze
Unfortunately I don't have Windoze right now. I will finish this part when I have access to a Windoze machine. Stay tuned.
The Following 8 Users Say Thank You to doixanh For This Useful Post: [ View ] Gift doixanh Ad-Free
9th June 2011, 09:35 AM |#2  
kurnage's Avatar
Senior Member
Flag Newcastle, NSW
Thanks Meter: 92
 
More
Cheers for the words of wisdom dx, I might give this a go now thanks to this tutorial
9th June 2011, 03:30 PM |#3  
Member
Thanks Meter: 1
 
More
Omg this tutorial required a high IQ.
:P

Some problem will appear for me.
anyway this is show promise.
Thanks for the tutorial dx. Its awesome.
Let's do it

Sent from my X8 using XDA Premium App
9th June 2011, 04:38 PM |#4  
Senior Member
Thanks Meter: 8
 
More
ummmm. i think its windows not windoze.
9th June 2011, 04:43 PM |#5  
Member
Thanks Meter: 8
 
More
read fast both words, and tell where is the difference !?
10th June 2011, 07:04 AM |#6  
Senior Member
Flag West Lafayette
Thanks Meter: 28
 
Donate to Me
More
I'm thinking of making an all in one app for this... Don't know if this is possible, will look into it. Also would it be possible to apply this to the rom itself and make an option where if this option is enabled,we could channel all net traffic through the browser which would effectivly mean reverse usb tethering. Don't know if its possible though


Sent from my X8 using XDA App
10th June 2011, 08:25 AM |#7  
XperianPro's Avatar
Senior Member
Flag Mars
Thanks Meter: 881
 
Donate to Me
More
Quote:
Originally Posted by tojnas

ummmm. i think its windows not windoze.

You are right because I read win -do -ze when I read Windows right this win-dovs.
Not same think.

Sent from my X8 using XDA Premium App
10th June 2011, 12:47 PM |#9  
dulemilosevski's Avatar
Senior Member
Flag skopje
Thanks Meter: 320
 
More
as mario you are very desperate boy
The Following User Says Thank You to dulemilosevski For This Useful Post: [ View ] Gift dulemilosevski Ad-Free
10th June 2011, 12:58 PM |#10  
Dare-Devil Inside's Avatar
Senior Member
Flag Sibenik
Thanks Meter: 368
 
More
Quote:
Originally Posted by as-mario

You are right because I read win -do -ze when I read Windows right this win-dovs.
Not same think.

Sent from my X8 using XDA Premium App

The Following 2 Users Say Thank You to Dare-Devil Inside For This Useful Post: [ View ] Gift Dare-Devil Inside Ad-Free
10th June 2011, 04:32 PM |#11  
XperianPro's Avatar
Senior Member
Flag Mars
Thanks Meter: 881
 
Donate to Me
More
Quote:
Originally Posted by Dare-Devil Inside

What you want?
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes