In Chrome OS when I turn on my Android VPN, I don't receive
2024-04-17 13:45

I am building Android VPN app from Chrome OS. At present I am using setHttpProxy method to proxy all the network traffic to localserver. But when I debug the application in Chrome OS , I don't receive any traffic from the Chrome Web apps or Chrome Browsers in proxy server. But when I run same in Android device it works fine.Here is my VPN configuration.

val builder = Builder().apply { addAddress("12.12.12.0", 24) addRoute("0.0.0.0", 0) allowBypass() setMtu(32 * 1024) setHttpProxy( ProxyInfo.buildDirectProxy( "127.0.0.1", 8080 ) ) addDisallowedApplication(applicationContext.packageName) } fileDescriptor = builder.establish()

Also when I use file descriptor while runnning vpn in Chrome OS I noticed that all the inbound traffic are UDP packets having DNS packet as payload, whereas the same config when I run on Android Device I receive TCP packets. I am not sure of this unexpected behavior on Chrome OS. Can any one please help me on it?




other answer :

It seems like youre encountering some issues with your VPN app configuration on Chrome OS, particularly related to the handling of HTTP proxy and the type of traffic received.

Here are a few points to consider and potential solutions:

HTTP Proxy Configuration:

Make sure that your HTTP proxy server is properly configured to receive and handle incoming requests from the VPN connection.

Double-check the IP address (127.0.0.1) and port (8080) youre using for the proxy. Ensure that your proxy server is listening on this address and port.

Traffic Routing:

On Chrome OS, the behavior of network traffic routing might differ from that on Android devices. Ensure that your VPN configuration is correctly routing traffic to the proxy server.

Verify that the VPN service is correctly intercepting and forwarding all network traffic through the proxy server.

Protocol Handling:

Its normal to see different types of traffic (UDP vs. TCP) depending on the network configuration and application behavior. DNS queries, for example, typically use UDP, but other types of traffic might use TCP.

Ensure that your proxy server is capable of handling both UDP and TCP traffic, as different applications and protocols may use different transport layer protocols.

Debugging:

Use logging and debugging tools to inspect the network traffic flow on Chrome OS. You can use tools like Wireshark or Chromes developer tools to analyze network requests and responses.

Check for any error messages or warnings in the logs that might indicate issues with traffic routing or proxy configuration.

Test Different Configurations:

Try experimenting with different configurations, such as using a different proxy server or adjusting the VPN settings, to see if you can isolate the issue.

Test your VPN app on different Chrome OS devices to determine if the issue is specific to your setup or if its a more general problem.

Community Support:

Reach out to the Chrome OS developer community or forums for assistance. Others may have encountered similar issues and can provide insights or solutions.

By carefully reviewing and adjusting your VPN app configuration, along with thorough testing and debugging, you should be able to resolve the issues youre experiencing on Chrome OS.