plus_plugins icon indicating copy to clipboard operation
plus_plugins copied to clipboard

[Question]: Enable the VPN on the Android Wi-Fi network

Open lxhlzyh opened this issue 7 months ago • 0 comments

What is your question?

network_info_plus

Hello guys. Android Devices:Recently, I found that when I enabled the VPN, the wifiIP returned by the program would not be the real WiFi IP of the connection I expected. May I ask if this is normal practice? Because I need a real WiFi ip to do other things. When I use this method locally, whether the VPN is enabled or not, I can obtain the real ip, but deprecated: WifiManager wm = (WifiManager) context.getSystemService(WIFI_SERVICE); String ip = formatIP(wm.getConnectionInfo().getIpAddress());

iOS doesn't have this problem.Can we also force a fixed interface to fetch, like wlan0? So, whether to consider returning the real wifiIp instead of the IP assigned by the VPN.

Checklist before submitting a question

  • [x] I searched issues in this repository and couldn't find such bug/problem
  • [x] I Google'd a solution and I couldn't find it
  • [x] I searched on StackOverflow for a solution and I couldn't find it
  • [x] I read the README.md file of the plugin
  • [x] I am using the latest version of the plugin
  • [x] All dependencies are up to date with flutter pub upgrade
  • [x] I did a flutter clean
  • [x] I tried running the example project

lxhlzyh avatar May 29 '25 08:05 lxhlzyh