Introduction
In this article, we will discuss how to set up a Socks5 proxy using Chrome and make WebSockets work with it. This configuration is useful when you want to use a proxy server for security or access control reasons while using WebSocket-enabled applications.
Prerequisites
To follow this tutorial, you will need:
- A Socks5 proxy server running on your local machine or a remote server.
- Google Chrome browser.
Setting Up the Proxy Server
To set up a Socks5 proxy server, you can use tools like ssh2socks or glados. For this tutorial, we will use ssh2socks.
Follow the instructions in the ssh2socks installation guide to set up the proxy server on your local machine or a remote server.
Configuring Google Chrome
Once you have set up the Socks5 proxy server, you need to configure Google Chrome to use it.
Opening the Proxy Settings
Open Google Chrome and type "chrome://settings" in the address bar and press Enter.
Accessing Proxy Settings
Scroll down to the bottom of the page and click on "Advanced" to expand the advanced settings.
Configuring Socks5 Proxy
Under the "System" section, find "Open your computer's proxy settings." Click on the "Change proxy settings" button.
In the "Internet Properties" window, go to the "Connections" tab and click on "LAN settings."
Check the "Use a proxy server for your LAN" option and enter the following details:
Address: 127.0.0.1
Port: 1083
Protocol: SOCKS version 5
Host Resolver Rules
Add the following host resolver rules:
MAP * ~ NOTFOUND, EXCLUDE 127.0.0.1
This rule tells Chrome to use the proxy server for all requests except those to the localhost.
Testing the Setup
To test the setup, try accessing a WebSocket-enabled application and see if it works with the proxy server.
For example, you can try using Discord with the VC feature. If you encounter any issues, make sure your proxy server is running and the Chrome settings are correctly configured.
Summary
In this article, we discussed how to set up a Socks5 proxy server using ssh2socks and configure Google Chrome to use it for WebSocket-enabled applications. We also covered the necessary steps to set up host resolver rules and test the setup.