termux-app icon indicating copy to clipboard operation
termux-app copied to clipboard

[Bug]: Cannot access the internet when using VPN

Open lomirus opened this issue 1 year ago • 1 comments

Problem description

Under normal circumstances, Termux can access the network as expected.

When I launch the VPN, the termux cannot access the internet:

Screenshot_20240923-114720_Termux

To rule out VPN as the problem, here are two pieces of evidence:

  1. All other apps except Termux can access the network normally
  2. Even when I select the Direct Mode in the VPN app settings, termux cannot access the internet either.

In addition, the ping command can receive the response:

Screenshot_20240923-115000_Termux

Steps to reproduce the behavior.

I can always reproduce it on my phone, but don't know how to reproduce it on others users' phones.

My phone uses PixelExperience 13 Plus (Android 13) a week ago. Then I flashed it into crDroid 10 (Android 14), and that's when this problem appeared. I wonder if it's related to the ROM, so I just flashed my phone again into LineageOS 21 (Android 14), but it still reproduced the problem.

What is the expected behavior?

It can access the internet.

System information

  • Termux application version: 0.118.1
  • Android OS version: Android 14
  • Device model: KB2000

lomirus avatar Sep 23 '24 04:09 lomirus

Termux doesn't manage network on its own, so the networking fixes from our side aren't really possible.

As frequent user of NordVPN, ProtonVPN and few other VPN apps, I would say that never had such issue myself. Maybe because I don't use exotic VPN protocols.

sylirre avatar Sep 23 '24 09:09 sylirre

@lomirus, @sylirre is correct.I also have VPN connected with no issues on termux. So, I think you must diagnose VPN.

Saurabh-codr avatar Oct 30 '24 04:10 Saurabh-codr

Just solved today by setting export http_proxy=127.0.0.1:7890 manually.

lomirus avatar Oct 30 '24 07:10 lomirus