/hiddify-relay

A single script that is both efficient and user-friendly has been developed for creating relay servers. This script can be executed on any platform that supports Bash.

Primary LanguageShellGNU General Public License v3.0GPL-3.0

Lang_farsi  فارسی          


Hiddify Logo

Hiddify Relay builder

This script provides you with the following methods to create a tunnel between a relay server and your main server.

1. IP-Tables       2. GOST       3. Dokodemo-Door       4. HA-Proxy       5. Socat       

⚙️ Installation

In order to create tunnels on your relay server, you just need to run the following command.

bash -c "$(curl -L https://raw.githubusercontent.com/hiddify/hiddify-relay/main/install.sh)"
Relay-builder Menu

🛠️ IP-Tables Tunnel

Click for IP-Tables Tunnel details According to the 1st picture above, choose number `1` and enter the `IP-Tables tunnel` to manage it.

IP-Tables Tunnel Menu

1. Install iptables rules

After selecting the number 1 in the IP-Tables Menu, it asks you to enter the IP address of the main server and press Enter button to activate the tunnel on ports 443 and 80.

2. Check ports in use This option shows you the ports used in the IPTables tunnel.

3. Uninstall iptables rules This option clears all rules created for the tunnel and all other rules.

[!NOTE] Be careful that if you have created special rules next to the tunnel manually, they will be deleted with this command.

4. Back to Main Menu In order to go back to the main menu press 4 .

🛠️ GOST Tunnel

Click for GOST Tunnel details According to the 1st picture above, choose number `2` and enter the `GOST Tunnel` to manage it.

GOST Tunnel

1. Install GOST

  • After choosing number 1, wait until the tunnel is installed.
  • After the installation is complete, in the first step, you must enter the desired port for the tunnel and then press Enter.
  • In the next step, enter the domain or subdomain of your main server, then press Enter. Wait until the tunnel should be started.
  • After starting, the message Gost tunnel is installed and activated will be displayed in green.

2. Check GOST Port and Status

After selecting option 2, the ports used in the tunnel and the status of the tunnel will be displayed on the screen.

3. Add Another Port and Domain

  • You can use this option if you want to tunnel from the relay server to several outside servers.
  • After selecting the number 3, you must enter the new port, press the Enter button, then enter the domain of the main server and press the Enter button.
  • You can enter option number 2 to ensure that the previous steps are correctly done and to check the used ports and to see if the tunnel is activated.

4. Uninstall GOST

This option will remove the GOST tunnel from your relay server.

5. Back to Main Menu

In order to go back to the main menu press 5 .

🛠️ Dokodemo-door Tunnel

Click for Dokodemo-door Tunnel details According to the 1st picture above, choose number `3` and enter the `Dekodemo-door Tunnel` to manage it.

Dokodemo Tunnel

1. Install Xray and add inbound

  • After selecting number 1 in the Dokodemo-door tunnel menu, wait for the Xray kernel to be installed on the relay server.
  • After installation, enter the IP address or the domain of the main server in the address section.
  • in the next section enter the desired port of the tunnel (recommended: 443,80), then press the Enter button.
  • The message Inbound added and tunnel started will be displayed.

2. Check Xray Service Status

After selecting option 2, the ports used in the tunnel and the status of the tunnel will be displayed on the screen.

3. Add another inbound

  • You can use option 3 in the Dokodemo-door tunnel menu to create another inbound connection and connect your relay server to several external servers.
  • After selecting option 3, in the new address section, enter the IP address or the domain of your new server, then press Enter.
  • Next step, enter the new port in the new port field and press Enter button.
  • The message Another inbound added will be displayed.
  • You can enter option number 2 to ensure that the previous steps are correctly done and to check the used ports and to see if the tunnel is activated.

4. Uninstall Xray and Dokodemo-Door tunnel

Choose this option to remove Dokodemo-door tunnel and Xray core from your relay server.

5. Back to Main Menu In order to go back to the main menu press 5.

🛠️ HA-Proxy Tunnel

Click for HA-Proxy Tunnel details According to the 1st picture above, choose number `4` and enter the `HA-Proxy Tunnel` to manage it.

HA-Proxy Tunnel

1. Install HA-Proxy

  • After selecting option 1, wait for the installation of the HA-Proxy package.
  • After installation, in the Relay port section, enter the desired port in your relay server (recommended port 443)
  • Then enter the IP address of your main server in the Enter Main-Server IP field.
  • Then, in the Enter Main-Server Port section, enter the port freed on your main and external server (e.g. by default, Hiddify Manager uses port 443, and it is recommended to use this port).
  • After the correct operation, the message HA-Proxy tunnel is installed and activated. will be displayed on the screen.

2. Check HA-Proxy Ports and Status After selecting option 2, the ports used in the tunnel and the status of the tunnel will be displayed on the screen.

3. Uninstall HA-Proxy Use this option to remove HA-Proxy tunnel from the relay server.

4. Back to Main Menu In order to go back to the main menu press 4.

🛠️ Socat Tunnel

Click for Socat Tunnel details According to the 1st picture above, choose number `5` and enter the `Socat Tunnel` to manage it.

Socat Tunnel

1. Install Socat And Setup Tunnel Service

  • After selecting option 1, wait for the installation of the Socat package.
  • Then enter the IP and Port of main server.
  • After the correct operation, the message Socat tunnel is installed and activated. will be displayed on the screen.

2. Check Socat Port After selecting option 2, the ports used in the tunnel will be displayed on the screen.

3. Uninstall Socat And Remove Tunnel Service Use this option to remove Socat tunnel from the relay server.

4. Back To Main Menu In order to go back to the main menu press 4.


Note

If you want to add the relay server to Hiddify Manager please read this article.



Email Telegram Channel Telegram Group Youtube Twitter

We appreciate all people who are participating in this project. Some people here and many many more outside of Github. It means a lot to us. ♥

Made with Contrib.Rocks