How to share an Internet connection from Linux to Android via usb cable?

We need such a scheme.
There is a remote server connected to the Internet, it connected via ssh. There is a machine with Linux on which is arranged a ssh tunnel on a local port, in Linux it is possible to sit in an Internet setting a socks5 proxy (i.e. in the browser settings is written localhost and the port number). And then you need the following: to Linux via the usb cable that connects to a smartphone with Android, and need to on the screen was the Internet. Possible without rooting... even if no - well, you'll have to root. And it would be good if the Internet was not common (i.e. not for all applications) and using socks5 proxy to sit through the customized browser and any other programs of Android traffic is not created, and the IPS of Android would not be available nowhere except that machine with Linux.
Tell me how to do the least effort?
July 8th 19 at 15:42
3 answers
July 8th 19 at 15:44
The standard way is to load the host driver cdc_ether and g_ether -- on the device, then both should see the usb0 interface.
But in order to download, however any driver that requires root? - Kira.Tillman commented on July 8th 19 at 15:47
You want to have CAP_SYS_MODULE. - demetrius.Bedn commented on July 8th 19 at 15:50
July 8th 19 at 15:46
I doubt that actually happens. It's one thing to connect via the com port to the phone and browse the web through it, but quite another to connect to the car phone. Need a special driver for android.
July 8th 19 at 15:48
Here you will find the right answer to the question wpilot.blogspot.ru/2015/01/linux-mint-usb.html

Find more questions by tags USBLinuxAndroid