0

I'm trying to use my phone's data connection as a proxy on any port on my PC. I've enabled the port forward with: adb forward tcp:5001 tcp:8080 and I get 5001 as a response from the adb shell. Different ports i've tried:

Now i'm just trying to send a curl request to ipify.org's api with curl https://api.ipify.org?format=json --proxy 127.0.0.1:8128 but the response I get is curl: (56) Proxy CONNECT aborted, for reference, i've tried this with an external proxy and it works fine: curl https://api.ipify.org?format=json --proxy 159.197.253.210:7689 returns {"ip":"159.197.253.210"} which is exactly what should happen. Pic for reference:

Am I doing something wrong? How do I use my android as a proxy?

4
  • Please do not post terminal text inside of screenshots. Please paste it as text and format it as code.
    – Robert
    Mar 16 at 8:15
  • 1
    Are you aware the when you use --proxy option of curl the remote side requires to be a real HTTP proxy. Proxy uses an own HTTP based protocol. Web servers don't understand this protocol. Thus adb forward can not be used for internet connection sharing. If you want to use the connection of your smartphone use USB tethering or start mobile hotspot feature.
    – Robert
    Mar 16 at 8:20
  • Hey Robert, sorry about that. The thing is, I want to use my home wifi as normal on my computer, I just want to be able to use my phone's data as a proxy too. You're saying this isn't possible? Then what's the point of adb forward?
    – Lafftar
    Mar 16 at 17:39
  • 1
    The point of adb forward is that it allows to forward a TCP connections from or to the phone. It can be used to reroute connections on TCP level but it is not a proxy. If you want to use a proxy you need to install a proxy on your phone. The proxy port then can be forwarded via adb. Without proxy you would need to manipulate DNS to redirect connections.
    – Robert
    Mar 16 at 19:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.