https://github.com/saaiful/socks5
Setup a SOCKS5 proxy server on an Ubuntu system
https://github.com/saaiful/socks5
proxy socks socks5
Last synced: 6 months ago
JSON representation
Setup a SOCKS5 proxy server on an Ubuntu system
- Host: GitHub
- URL: https://github.com/saaiful/socks5
- Owner: saaiful
- Created: 2023-08-03T18:09:24.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-08-14T14:10:35.000Z (11 months ago)
- Last Synced: 2025-08-14T16:09:21.578Z (11 months ago)
- Topics: proxy, socks, socks5
- Language: Shell
- Homepage:
- Size: 21.5 KB
- Stars: 124
- Watchers: 3
- Forks: 47
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SOCKS5 Proxy Setup Script for Ubuntu
This repository contains a script that helps you to setup a SOCKS5 proxy server on an Ubuntu system. The server uses `dante-server` and supports username/password authentication.
## Prerequisites
- Ubuntu system (This script was tested on Ubuntu 20.04, but should work with other versions as well).
- User with `sudo` privileges.
## Features
- **Installation:** Installs dante-server and configures it with SOCKS5 authentication.
- **Reconfiguration:** Update port and settings dynamically.
- **User Management:** Add or update users with username/password authentication.
- **Testing:** Automatically tests the proxy after setup using `curl`.
- **Uninstallation:** Completely removes dante-server along with its configuration and logs.
- **Dynamic Network Interface Detection:** Automatically detects the primary network interface for seamless configuration.
- **Port Selection:** Allows specifying a custom port with validation.
## Installation
Run the script
```bash
wget https://raw.githubusercontent.com/saaiful/socks5/main/socks5.sh
sudo bash socks5.sh
```
You will be prompted for various options such as `reconfiguring`, `adding users`, or `uninstalling` the SOCKS5 server if it is already installed. During installation, you'll also be prompted for a `username` and `password` for the proxy authentication.
## Testing the Proxy
The proxy can be tested from a Linux machine using `curl`. If you don't have curl installed, it can be installed with the following command:
```bash
apt-get install curl
```
## Uninstallation
To completely remove the SOCKS5 server, select the `Uninstall` option when running the script. This will stop the service, remove the package, and clean up all related configuration and log files.
You can then test the proxy with:
```
curl -x socks5://username:password@proxy_server_ip:1080 https://ifconfig.me
curl -x socks5://username:password@proxy_server_ip:1080 https://ipinfo.io
```