我有一个根星系note5与安卓7,华硕笔记本电脑与Ubuntu16.04。我喜欢和我的笔记本电脑分享我的电话VPN连接。我尝试过一些应用程序,如VPNTether、DF绑定修复程序、TetherNet、Pdanet+等,但它们都没有工作!
我想我可以在windows 10上使用VPNTheter,但是它们不能在Ubuntu上工作!
此外,我还测试了两种Wi和USB电缆方法。
另外,我发现了这个方法,但不明白它在数字6和7中的意思?
1. You need a rooted device
2. Make sure you have a VPN app, like OpenVPN or DroidVPN ( I use DroidVPN and its the best)
3. Download Terminal Emulator
4. Activate your hotspot and connect to your VPN
5. Launch Terminal emulator and on the first line type "su" (without the quotes) and press enter
6. Copy and paste this to the Terminal Emulator. Make sure to paste to a new folder using Root Browser first and copy to T.E. in the exact format as shown below:
iptables -t filter -F FORWARD
iptables -t nat -F POSTROUTING
iptables -t filter -I FORWARD -j ACCEPT
iptables -t nat -I POSTROUTING -j MASQUERADE
ip rule add from 192.168.43.0/24 lookup 61
ip route add default dev tun0 scope link table 61
ip route add 192.168.43.0/24 dev wlan0 scope link table 61
ip route add broadcast 255.255.255.255 dev wlan0 scope link table 61
7. That's about it. Also, be sure to make a folder with Root Browser and paste the code there, as this resets after re-boot. It worked on my LG G3 on android 4.4.2
发布于 2019-11-23 06:23:18
首先从Google商店安装Proxoid。它是一个小型代理服务器。它不需要根。安装Proxoid之后,为linux下载亚行()。然后将其解压缩到一个空文件夹中。现在,打开android上的Proxoid,通过勾选复选框启动代理服务器。现在通过USB电缆连接你的android和你的电脑。现在,将终端会话打开到保存名为adb
的文件的文件夹。现在,要以标准用户的身份执行这些命令:
./adb tcpip 5555
现在拔掉USB电缆。现在在你的android上启动wifi热点。现在将您的PC连接到网络并执行:
./adb connect 192.168.43.1:5555
注意,当android创建wifi热点时,网络中手机的IP地址通常是192.168.43.1
。但也有可能不是这样的。因此,如果上面的命令不起作用,那么在网络中用适当的IP地址更改192.168.43.1
。现在执行以下命令:
./adb forward tcp:8080 tcp:8080
现在将您的系统配置为使用http://localhost:8080作为代理服务器。注意,在执行第一个命令一次之后,您不需要在重新启动PC或android设备之前执行它。如果您想通过USB电缆连接,只需执行最后一个命令即可。
发布于 2021-04-17 13:10:38
这些命令在我的手机(Android 9)中工作。您可以使用应用程序如根探索或mt (中国的应用程序,在谷歌游戏中找不到),
any-name.sh
这样的新文件,https://unix.stackexchange.com/questions/359845
复制相似问题