Member-only story
The Issue:
Flutter apps, when using http or dio, can’t easily show their internet requests in tools like Proxyman or Charles, which many developers use to find and solve internet issues.
Solutions:
- Code Changes: Developers might need to change their app’s code to make it work with these tools, which can be hard and risky.
- Using Native Libraries: Another way is to use libraries made for specific devices, like
cupertino_http
for Apple devices, that follow the device's internet settings. But this means more work to handle different types of devices.
A Better Way
Virtual Network Interface (VIF): A good solution is to use a Virtual Network Interface (VIF). This makes a special network layer that catches all internet requests from the device, including those from Flutter apps.
Virtual Network Interface (VIF)
Given these challenges, a more robust solution involves the use of a Virtual Network Interface (VIF). VIFs create a network layer capable of capturing all network traffic from the device, regardless of individual app settings or library support. This method ensures that all network requests, including those from Flutter apps using http
or dio
, are captured for debugging purposes.