Skip to content

How to Set Up a SOCKS5 Proxy: A Beginner's Guide

SOCKS5 is a general-purpose proxy protocol. This beginner's guide explains the parts you need, shows how to test a SOCKS5 proxy, and covers common mistakes.

9 min readUpdated Nov 13, 2026By XPASS Editorial Team

How to Set Up a SOCKS5 Proxy: A Beginner's Guide

SOCKS5 sounds technical, but the idea is simple. A SOCKS5 proxy is a relay: your program connects to the proxy, tells it where you want to go, and the proxy opens the connection for you and passes the data back and forth. It does not read or change the content. That makes it flexible, because the same relay can carry web pages, e-mail connections, chat clients and many other programs.

This guide is written for beginners. It explains what the protocol does, what details you need before you start, how to test the proxy before trusting it, and how to put it into a browser. It assumes you will use the proxy lawfully and in line with the terms of the services you connect to. If you want a side-by-side look at the other proxy types, read the comparison of HTTP, HTTPS and SOCKS5 proxies.

What SOCKS5 actually does

The SOCKS protocol is defined in RFC 1928 for version 5. In outline, a session goes like this.

  1. Your program opens a TCP connection to the proxy.
  2. The two sides agree on an authentication method. The standard allows "no authentication", GSSAPI, and user name and password (the last is described separately in RFC 1929). Providers usually offer user name and password, or no authentication with an allowed source address.
  3. Your program sends a request containing the destination. The destination can be an IPv4 address, an IPv6 address, or a domain name.
  4. The proxy opens the connection to the destination and reports success or failure.
  5. From then on, bytes flow in both directions without the proxy interpreting them.

Version 5 supports three commands: CONNECT for ordinary TCP connections, BIND for incoming connections, and UDP ASSOCIATE for UDP traffic. In everyday use, CONNECT is by far the most common. Whether a given proxy supports UDP is a question for the provider; do not assume it.

Two consequences are worth remembering:

  • SOCKS5 does not encrypt anything by itself. If you load an HTTPS site through it, the page is encrypted by HTTPS, as usual. If you load a plain HTTP site, the content travels unencrypted, just as it would without a proxy.
  • SOCKS5 does not understand HTTP. It cannot cache pages, add headers or filter content. That is the job of an HTTP proxy.

What you need before you start

Gather these details from your provider's dashboard or delivery message.

Item Example Notes
Host proxy.example.net or an IP address The address you connect to.
Port 1080 The port number varies by provider.
Protocol SOCKS5 Check that it says SOCKS5, not only "SOCKS".
User name provider-assigned Only if authentication is used.
Password provider-assigned Keep it private.
Authorisation by address your public IP Some plans allow your address instead of credentials.

The values above are placeholders for illustration. Use the ones your provider gives you. If the plan page does not state the protocol clearly, ask support before you spend time on setup.

Step 1: Test with curl first

Before you configure a browser, test the proxy from the command line. A failure here is much easier to read than a blank browser page. The curl tool is available on macOS and Linux and in recent Windows versions.

Without credentials:

curl --socks5-hostname proxy.example.net:1080 https://example.com/

With credentials:

curl --socks5-hostname proxy.example.net:1080 -U myuser:mypassword https://example.com/

To see which address the destination observes, request a page that returns your public IP address and compare it with the result of the same command without the proxy option.

Notice the option name. --socks5-hostname sends the domain name to the proxy to be resolved there. The shorter --socks5 resolves the name on your own computer. The URL form socks5h:// has the same meaning as --socks5-hostname, while socks5:// resolves locally. This distinction matters because the lookup is itself a network request, and you normally want it to come from the same place as the rest of the traffic. The background on name resolution is in RFC 1035 and in the article on how DNS works.

If curl reports "connection refused" or "timed out", the host or port is wrong, or something blocks the port. If it reports an authentication failure, check the user name and password. If it works, you now have a reliable reference.

Step 2: Put SOCKS5 into a browser

Browsers differ in how they take SOCKS5 settings.

Firefox. Open Settings, scroll to Network Settings, choose Manual proxy configuration, type the host and port in the SOCKS fields, select SOCKS v5, and tick "Proxy DNS when using SOCKS v5". The full walkthrough, including how to keep the proxy in a separate profile so your everyday browser is not affected, is in the Firefox separate-profile guide.

Chrome and other Chromium browsers. Chrome normally follows the operating system proxy settings, and the system dialogs are not always friendly to SOCKS5. Many people instead start the browser with a command-line flag such as --proxy-server="socks5://proxy.example.net:1080". Chrome's support for SOCKS5 with a user name and password is limited, so a proxy that depends on credentials may not work well there. The details are covered in the Google Chrome guide.

Other programs. Many applications have their own proxy section in their settings. Look for a field labelled SOCKS or SOCKS5. If a program has no proxy setting at all, it will ignore a browser configuration entirely; in that case you would need a tool that forces connections through a proxy, which is beyond a beginner setup.

Step 3: Check that it is really being used

After the setup, always verify.

  1. Open a page that shows your public IP address.
  2. Confirm that the address matches the proxy, not your home or office connection.
  3. Open a second page that shows location information and compare it with the first.
  4. Disable the proxy and reload. The address should change back.

A worked example: Maya wants to review how her small shop's product page appears to visitors in another country. She uses curl with --socks5-hostname to fetch the page and check that the proxy works, then sets the same details in a dedicated browser profile to look at the layout, prices and shipping notes shown there. Because she tested with curl first, a blank browser page would not leave her guessing about the cause.

Common mistakes

  • Choosing the wrong protocol. Entering SOCKS5 details into the HTTP field, or the other way around, produces confusing errors. Match the field to the protocol.
  • Forgetting remote name resolution. Using --socks5 or leaving "Proxy DNS" unticked can make the lookup come from your own network. Pick the option that sends the name to the proxy when you want the lookup done there.
  • Mixing up the port. Some providers give different ports for different protocols on the same host.
  • Treating the proxy as encryption. If you handle sensitive data, rely on HTTPS or another encrypted protocol, not on the proxy.
  • Saving the password in a shared profile. Anyone who can open that profile can read or reuse it.
  • Ignoring terms. Using a proxy to get around a website's rules, or to do anything unlawful, is not acceptable and can have consequences. Respect each site's terms, rate limits and robots rules.

A worked comparison makes the difference between the two proxy types concrete. Imagine you want to open one web page and also run a command-line tool that is not a browser. An HTTP proxy understands web requests, so it suits the page. A SOCKS5 proxy, described in RFC 1928, simply relays connections, so it can carry the browser and many other kinds of programs, as long as each program has a setting that supports SOCKS5. The practical decision rule is simple: if the application has a clear SOCKS5 option, use it; if it only offers an HTTP proxy field, use an HTTP endpoint instead of forcing it.

Pay attention to DNS in particular. With the socks5:// scheme in curl, the name of the website is usually resolved on your own machine before the connection is relayed. With socks5h://, the proxy resolves the name. If you are testing what a visitor in another region would see, resolving at the proxy end often matters, so check which behavior your tool uses. A beginner mistake is to see the right exit address in an IP check and assume everything went through the proxy, while name lookups still left from the home network. Compare results for both schemes on a harmless test page and keep the one that matches your goal.

When something does not work, go back one step at a time. Retest with curl, check the port, check the credentials, and only then blame the browser or the application.

Limits and what to watch for

SOCKS5 is general, but it is not magic. Performance depends on the distance to the proxy, the load on its network and the destination. A proxy adds a hop, so a small increase in delay is normal. Some websites treat traffic from certain address types differently, so a page may look different through a proxy. UDP-based services, such as some voice and game traffic, work only if the proxy supports UDP ASSOCIATE and your program uses it, so check before relying on it. Some corporate or public networks block unusual outbound ports, which can stop a SOCKS5 connection even when the settings are correct. Finally, anything you send to a proxy operator passes through their machine, so choose a provider you can read terms for and keep unencrypted sensitive data out of the connection.

If something stops working, go back to the curl command. If curl succeeds and the browser fails, the problem is in the browser settings. If curl fails too, the problem is the host, the port, the credentials or the network path.

A short checklist for repeat setups

Once you have done this a couple of times, a checklist keeps it quick. Confirm the protocol says SOCKS5. Copy the host and port exactly. Test with curl using --socks5-hostname. Put the same values into the browser or application. Verify the visible public IP address. Record where the credentials are stored and when the plan ends, so that an expired plan is the first thing you suspect when a working setup suddenly stops.

It is also worth keeping a copy of your working curl command in a private note, with the password replaced by a placeholder. Months later, when something fails, that one line tells you in seconds whether the proxy itself is healthy. Combine it with a dedicated browser profile, and you separate "the proxy is down" from "my browser settings changed" in under a minute.

Summary

A SOCKS5 proxy is a general relay that passes your connections through another machine without interpreting them. To set one up, collect the host, port and credentials, test them with curl using the host-name option, enter them into the correct SOCKS fields in your browser or application, and verify the public IP address. Remember that SOCKS5 does not encrypt traffic, that remote name resolution is a setting you should choose deliberately, and that lawful use within site terms is your responsibility.

When you are ready to look at proxy options, the Proxy page is the place to check what each plan includes.

Frequently asked questions

What is a SOCKS5 proxy?

It is a proxy that relays TCP connections, and optionally UDP, on behalf of a client without interpreting the application protocol inside. Because it works below HTTP, it can carry web traffic and other kinds of connections.

What details do I need to set up SOCKS5?

You need the proxy host name or IP address, the port, and, if the proxy requires it, a user name and password. Also confirm whether the proxy can resolve domain names for you.

What is the difference between socks5 and socks5h in curl?

With socks5, curl resolves the domain name on your computer and sends the address to the proxy. With socks5h, curl passes the domain name to the proxy, which resolves it. The h stands for host name resolution at the proxy.

Does SOCKS5 encrypt my traffic?

No. SOCKS5 only relays connections. Encryption comes from the protocol you run through it, such as HTTPS. The link between you and the proxy is not encrypted by SOCKS5 itself.

Why does my browser keep asking for a password with SOCKS5?

The credentials may be wrong or expired, or the proxy may expect authorisation by source address. Some browsers also handle SOCKS5 user name and password less smoothly than HTTP proxies, so ask the provider about alternatives.

About the author

Bob Kanokphon Thongdee, founder of XPASS VPN

Bob Kanokphon Thongdee

  • Founder of XPASS VPN
  • Co-founder of eSIMonline.asia
  • More than 7 years in online marketing
  • Founder of Cojourney Visa and Cojourney Travel

Need a proxy for this?

XPASS Proxy sells residential proxy traffic by the gigabyte, with the price shown before you pay.

See proxy plans

Keep reading

Proxy Guides

How to Set Up a Proxy in Firefox with a Separate Profile

Firefox stores proxy settings per profile. This guide shows how to create a dedicated profile, enter the proxy details, and check that only that profile uses the proxy.

9 min read

Proxy Guides

HTTP Proxy vs HTTPS Proxy vs SOCKS5: What Is the Difference?

The three names sound similar but describe different things. Learn how HTTP, HTTPS and SOCKS5 proxies differ, what each can carry, and how to pick one.

10 min read

Proxy Guides

How to Set Up a Proxy in Google Chrome

Chrome has no Proxy screen of its own. See how to use the system setting, how to launch a separate profile with a Proxy flag, and how to check that it works.

9 min read