Understanding Proxies and VPNs: A Guide for Android Developers

Sagar Kisan Avhad
3 min readJun 20, 2024

--

Photo by Omar Flores on Unsplash

Hello everyone,

I hope you’re all doing well. As an Android developer, I often use a web debugging tool called Charles. If you’re not familiar with it, let me explain briefly.

Charles is a tool that helps us watch and check the network traffic on our apps. We can change requests and responses using this tool. We can also send fake responses and change the status code of an API to see how the app behaves. For more details, refer to this.

Now, back to our main topic. When using Charles, I often come across terms like setting up a WIFI proxy on a phone (or emulator), external proxy server, proxy settings, and SSL proxy settings. These terms can be confusing and raise many questions, such as:

  • What is a proxy?
  • What is a proxy server?
  • Why do we need to set a WiFi proxy?
  • What is the difference between none, manual, and proxy auto-config types?
  • What is the difference between a VPN and a proxy?

Let’s dive into what I found about proxies.

Photo by Big Dodzy on Unsplash

A proxy acts like a middleman between your phone (or emulator) and the internet. It sits between your device and the internet, and it is another computer or server that all your internet traffic goes through before reaching websites or online services.

When we use Charles, the proxy server is usually our laptop or computer unless we set an external proxy server in Charles.

Using your phone’s WIFI proxy settings, you can set and remove a proxy server.

  • WIFI Proxy: None: No proxy server is used.
  • WIFI Proxy: Manual or Proxy Auto-Config: A proxy server is used.
  • Manual: You enter the IP address and port of the proxy server (usually your laptop’s IP and a port number). This tells your device where to find the proxy server.
  • Proxy Auto-Config: You provide a URL to a PAC file. This file contains a script that automatically tells your phone which proxy server to use.

If you want to use another computer or server as the proxy server, you enter its IP and port details in your phone’s WiFi settings and in Charles, set the external proxy server option.

What is a VPN?

A VPN (Virtual Private Network) is different from a proxy. Imagine you have a special tunnel from your house directly to your friend’s house. When you send a message through this tunnel, nobody else can see it, and it’s like you’re at your friend’s house. A VPN works like that tunnel for your computer or phone. It keeps your internet activities private and safe by making a secure path to another place on the internet.

When we are in the office, we use a private network. When working from home, we use a VPN to keep our internet activities safe and private for our organization. VPNs like Cisco AnyConnect or ProtonVPN create a virtual private network at home, making it feel like you’re right at your desk in the office.

Congratulations! By understanding proxies and VPNs, you can better secure your internet activities and troubleshoot network issues effectively.

Feel free to share this blog, and you can reach out to me on Twitter, Linkedin, Github for any questions or discussions. Happy coding!

--

--