https://github.com/returnfi/port-shifter
Port-shifter: Multi-method Tunneling with Shell Scripts
https://github.com/returnfi/port-shifter
dokodemo-door gost gost-tunnel haproxy haproxy-loadbalancer iptables xray xtls
Last synced: about 1 month ago
JSON representation
Port-shifter: Multi-method Tunneling with Shell Scripts
- Host: GitHub
- URL: https://github.com/returnfi/port-shifter
- Owner: ReturnFI
- License: gpl-3.0
- Created: 2024-06-12T07:14:23.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-10-17T19:13:49.000Z (7 months ago)
- Last Synced: 2025-04-02T23:12:33.466Z (about 2 months ago)
- Topics: dokodemo-door, gost, gost-tunnel, haproxy, haproxy-loadbalancer, iptables, xray, xtls
- Language: Shell
- Homepage:
- Size: 110 KB
- Stars: 54
- Watchers: 2
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Port-Shifter
Port Shifter is a script designed to manage iptables, GOST, Xray, and HAProxy installations on a Linux server. It provides an easy-to-use interface for setting up these services, checking their status, and uninstalling them.
## Features
- IPTables: Configure iptables rules for TCP and UDP ports.
- GOST: Set up a secure tunnel with GOST.
- Xray: Install and configure Xray for enhanced security.
- HAProxy: Install and configure HAProxy for load balancing.
- DNS Configuration: Update DNS server settings.
- System Updates: Keep your server up-to-dat## Install
```shell
bash <(curl https://raw.githubusercontent.com/ReturnFI/Port-Shifter/main/install.sh)
```
## Supported Operating SystemsThis script has been tested and is compatible with the following operating systems:
* Ubuntu 20.04+
* Debian 11+
* CentOS 8+
* Fedora 36+
* AlmaLinux 9+
* Rocky Linux 9+# Usage+(Video)
The script provides a dialog-based interface for managing various services. Below are the available functions:
IPTables
1.Install IPTables:
- Configures iptables rules for TCP and UDP ports.
- Prompts for server IP and ports to be configured.2.Check IPTables Ports:
- Displays the current iptables rules and service status.3.Uninstall IPTables:
- Removes iptables rules and stops the service.
GOST
1.Install GOST:
- Downloads and installs GOST.
- Prompts for domain/IP and port configuration.2.Check GOST Ports:
- Displays the current GOST ports and service status.
3.Add Another Port to GOST:
- Adds a new port and domain/IP to the existing GOST configuration.
4.Remove Port And Domain
- Remove a port and domain/IP From GOST configuration.
5.Uninstall GOST:
- Stops and removes GOST service and binary.
Xray
1.Install Xray:
- Installs Xray using the official script.
- Prompts for domain/IP and port configuration.2.Check Xray Service:
- Displays the current Xray ports and service status.
3.Add Another Inbound:
- Adds a new inbound configuration to Xray.
4.Remove Inbound:
- Removes an existing inbound configuration from Xray.
5.Uninstall Xray:
- Removes Xray configuration and uninstalls the service.
HAProxy
1.Install HAProxy:- Installs HAProxy and configures it based on user input.
2.Check HAProxy:
- Displays the current HAProxy ports and service status.
3.Add more tunnel Configuration:
- Adds a new configuration to HAProxy
4.Remove tunnel Configuration
- Removes an existing configuration from HAProxy
5.Uninstall HAProxy:
- Stops and removes HAProxy service and configuration.
Options
1.Configure DNS:
- Updates DNS server settings.
2.Update Server:
- Updates the server's package list and installed packages.
## Notes
- Ensure you have a backup of your current iptables rules and configurations before running this script.
- Running this script will modify system configurations and install various services. Use with caution on production servers.# Disclaimer
This project is only for personal learning and communication, please do not use it for illegal purposes, please do not use it in a production environment