Tutorial for creating a Selfhosted SOCKS5 Proxy in a few seconds using a free and OpenSource script.
tl;dr ?
* `get_external_address`: retrieves the external IP address of the server
* `generate_password_file`: generates a password file for the proxy server
* `generate_pam`: generates a PAM configuration file for the proxy server
* `generate_config_v11` and `generate_config_v14`: generate configuration files for Dante Socks proxy server versions 1.1 and 1.4, respectively
* `open_ufw_port` and `open_firewalld_port`: open the specified port in the firewall
The script then uses these functions to set up the proxy server on the specified distribution. For example, on Ubuntu 24.04, the script will install the necessary packages, generate the password file and PAM configuration file, and configure the firewall to allow incoming connections on the specified port. this script is free and opensource and can be found in this Github repo.
Skip to the steps here
What is a Socks5 Proxy Server?
A Socks proxy server is a proxy server that establishes a TCP connection to another server on behalf of a client, then routes all the traffic back and forth between the client and the server. This allows clients to access servers that may be blocked or restricted by firewalls or other security measures. Socks5 proxy has several advantages over a VPN based on the use case.
Opensource Socks5 Proxy Script
The script is written in bash and is designed to work on various Linux distributions, including Ubuntu, Debian, CentOS, and Oracle Linux. It automates the installation and configuration of the Dante Socks proxy server, a popular open-source Socks proxy server software. It is based on an updated version of this script and provides a convenient way to set up a Socks proxy server with minimal user input even for the latest Linux Operating systems.Steps to create Socks5 proxy in a few seconds
Open Linux shell and run the below two commands
export PORT=1234; export PASSWORD=mySuperSecretPasswordcurl https://raw.githubusercontent.com/thehackcave/socksfive/main/socksfive.txt | sudo --preserve-env bash
Note down the Address, Port, Username and password and use it. Make sure to use the actual port and password you want. That's all
Features of Socks5 Script
The script provides the following features:- Installs and configures the Dante Socks proxy server
- Generates a random password for the proxy server
- Configures the firewall to allow incoming connections on the specified port
- Provides the user with the proxy server's address, port, username, and password
How Selfhosted Socks5 Script Works
The script uses a series of functions to automate the setup process. These functions include:* `get_external_address`: retrieves the external IP address of the server
* `generate_password_file`: generates a password file for the proxy server
* `generate_pam`: generates a PAM configuration file for the proxy server
* `generate_config_v11` and `generate_config_v14`: generate configuration files for Dante Socks proxy server versions 1.1 and 1.4, respectively
* `open_ufw_port` and `open_firewalld_port`: open the specified port in the firewall
The script then uses these functions to set up the proxy server on the specified distribution. For example, on Ubuntu 24.04, the script will install the necessary packages, generate the password file and PAM configuration file, and configure the firewall to allow incoming connections on the specified port. this script is free and opensource and can be found in this Github repo.
COMMENTS