ProxyMobile logo
Guide

How to Set Up a Mobile Proxy: HTTP(S) and SOCKS5

Setup takes about five minutes once you know which four values matter. Nearly every support ticket in this area comes down to the wrong port, the wrong protocol or an authentication method that was never enabled. Work through the steps below in order and you will not hit any of them.

The four values you need

Every proxy configuration reduces to a host, a port, a username and a password. The host is the address of the server that fronts your modem. The port determines which protocol you are speaking. The username and password authenticate you, unless you have chosen to authorise your own IP address instead.

Each port comes as a pair: one number for HTTP and HTTPS, another for SOCKS5. They point at the same modem and the same carrier address, so choosing between them is about what your software supports, not about which one is better.

Write the four values down before you start configuring anything. Most failed setups are a value pasted into the wrong field, and having them in front of you makes that obvious.

Choosing HTTP(S) or SOCKS5

Use HTTP and HTTPS for browsers, browser automation, API clients and anything that speaks the web. It is the most widely supported option and it handles encrypted traffic through the CONNECT method, so HTTPS sites work normally.

Use SOCKS5 when the traffic is not plain web traffic, when a tool asks for SOCKS specifically, or when you need UDP. UDP support matters for real time protocols and for some mobile applications, and its absence is a common limitation elsewhere.

If you are unsure, start with HTTP and HTTPS. Almost every tool accepts it, and you can move to SOCKS5 later without changing the modem or the location.

Configuring the connection

In a browser, either use the network settings of a profile that supports per profile proxies or an extension that keeps configuration isolated. Avoid setting the proxy system wide unless you genuinely want every application on the machine to use it, because background software will then send traffic through your allowance without asking.

In code, most HTTP libraries accept a proxy URL in the form scheme, credentials, host and port. Curl uses the proxy flag, Python requests takes a proxies dictionary, and Node clients usually take an agent. For SOCKS5 the scheme changes to socks5, and where DNS should be resolved by the proxy rather than locally, use the variant your library provides for remote resolution.

On a phone or tablet, configure the proxy in the settings for the specific network you are connected to. Enter the host and port, then supply credentials when prompted. Remember that the setting belongs to that network entry alone, so the device will fall back to a direct connection as soon as it joins a different one.

Authentication choices

Username and password authentication works everywhere and travels with you, which is the right default for laptops and for servers whose address may change. Keep the credentials out of shared documents and out of committed code.

IP authorisation removes the credential prompt by allowing a specific source address to connect. It is convenient for a fixed server, and it fails silently the moment your own address changes, which is why it suits static infrastructure rather than a machine on a home connection with a dynamic address.

Whichever you pick, rotate the password when a team member leaves and avoid sharing one set of credentials across unrelated projects. If two workloads need to be told apart later, they should not have been authenticating as the same identity in the first place.

Testing and reading the result

Test with a request to any service that echoes the calling address, sent through the proxy. Compare the answer with the same request sent without the proxy. If they differ, your traffic is routed correctly. If they match, the configuration is not being applied at all, which usually means the tool ignored the setting rather than that the proxy failed.

Then check the location and the network owner of the returned address. It should belong to a mobile carrier. Be aware that the city recorded in a geolocation database is a registry entry, not a measurement, so a nearby city is not a fault.

Finish by exercising the real workload briefly. Load a page that matters to your task, run one API call, confirm the speed feels right for the connection type, then trigger a rotation and confirm the address changes as expected.

Frequently asked

My browser works but my script does not. What is wrong?

Almost always the library is not picking up the proxy setting. Set it explicitly in the client rather than relying on environment variables, and confirm you used the socks5 scheme if you pointed the script at the SOCKS port.

Should I let the proxy resolve DNS?

For most work, yes. Remote resolution keeps lookups on the same path as your traffic and avoids a local resolver revealing a different location. Many SOCKS clients offer a specific option for this.

Do I need separate credentials for HTTP and SOCKS5?

No. The two ports front the same modem and accept the same username and password. Only the port number and the scheme change, so you can switch a tool from one to the other without requesting anything new.

USA mobile proxies on hardware we own

Real 4G and 5G carrier IPs in eight US metros, with unlimited rotation, sticky sessions and HTTP(S) or SOCKS5. Plans start at $5/day.

View plans See all locations

More guides

All ProxyMobile resources →