2/2
Basically, I want to bind another port and use whatever program is suitable for a proxy, and specially available on TC repo: redsocks, haproxy, polipo, proxychains-ng, etc.
Probably I'll be doing something like this:
## Bind a new port from my computer to my phone
## /adb/ is the binary used to talk to the phone, /forward/ binds the local port and the remote port like this: adb forward tcp:local-port-to-bind tcp:remote-port-on-the-phone
#adb forward tcp:3128 tcp:3129
## After doing so, I assume the proxy server will not complaing about the port being used already, hence allowing me to route all traffic from my phone through port 3129 into my laptop's port 3128 and send all traffic to eth0 back and fort..
The set up I got is:
Rooted android phone
MicroCore 11.1 x86
ssh
sshfs
adb
Android phone plugged in with a cable (micro usb).
Network setup automagically with DHCP, no firewall, no VPN, no extra proxies, no extra gateways or devices messing with the network.
I do have an extra router, but doesn't do any network managment whatsoever it is setup as a network switch.
My network goes like this:
Phone -> USB cable -> laptop -> Ethernet cable -> Router acting as a network switch -> Ethernet cable -> main router -> ISP *Internet*
Pretty much is like setting up two computers on the same network, one (my laptop) will be the simple-enough-proxy-server-to-get-internet-access and my phone will be the client.
I've been reading like crazy all configurations, tutorials, posts and wikis of HAProxy, I'm just so confused because all info. is about how to set up a load balancing server or super complicated servers for routing specific datagrams with SSL, certificates, HTTPS, wrap packets in different network protocols and such. But I'm not able to find a tutorial to setup a simple proxy server (Which I think HAProxy can't do, but it DOES routing of packages from one interface to another, which is what I want from usb to ethernet and viceversa).
Any approach would be very much welcomed, either a proxy server or routing from one port to the other, as long as I can route the eth0 connection to the binded port on localhost to my phone plugged via a usb cable.