Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[problem] Forward Multi ports on TCP #638

Open
kingsgod opened this issue Dec 30, 2024 · 2 comments
Open

[problem] Forward Multi ports on TCP #638

kingsgod opened this issue Dec 30, 2024 · 2 comments

Comments

@kingsgod
Copy link

kingsgod commented Dec 30, 2024

Hi Ginuerzh

I need to use udp and tcp simultaneously
because I have installed 2 types of vpn on server-2:
WireGuard (udp) and Open (tcp)
wireguard_port=51820
ovpn_port=1194
and I want both to be tunneled to server-1 via Gost.
in my test:
Wireguard=ok
OpenVPN=It didn't work.
And also by Server-3: I manage users
such as simultaneous connections, timeout and usage volume, etc.

plz help me:

---------------------------------------------------server-2-------------------------------------------------
sudo apt update
sudo apt install wget nano -y
wget https://github.com/ginuerzh/gost/releases/download/v2.12.0/gost_2.12.0_linux_amd64.tar.gz
tar -xvzf gost_2.12.0_linux_amd64.tar.gz
sudo mv gost /usr/local/bin/gost && sudo chmod +x /usr/local/bin/gost

nano /usr/lib/systemd/system/gost2.service

[Unit]
Description=GO Simple Tunnel
After=network.target
Wants=network.target

[Service]
Type=simple
ExecStart=/usr/local/bin/gost -L=relay+kcp://:3333

[Install]
WantedBy=multi-user.target

systemctl daemon-reload
systemctl enable gost2.service
systemctl start gost2.service
systemctl restart gost2.service
systemctl status gost2.service

------------------------------------------------- server-1 --------------------------------------------------
sudo apt update
sudo apt install wget nano -y
wget https://github.com/ginuerzh/gost/releases/download/v2.12.0/gost_2.12.0_linux_amd64.tar.gz
tar -xvzf gost_2.12.0_linux_amd64.tar.gz
sudo mv gost /usr/local/bin/gost && sudo chmod +x /usr/local/bin/gost

nano /usr/lib/systemd/system/gost1.service

[Unit]
Description=GO Simple Tunnel
After=network.target
Wants=network.target

[Service]
Type=simple
ExecStart=/usr/local/bin/gost -L=udp://:80/b.example.com:51820 -L=tcp://:8080/b.example.com:1194 -F relay+kcp://b.example.com:3333

[Install]
WantedBy=multi-user.target

systemctl enable gost.1service
systemctl start gost1.service
systemctl daemon-reload
systemctl restart gost1.service
systemctl status gost1.service

@kingsgod
Copy link
Author

kingsgod commented Jan 1, 2025

Also, when I use this line of code to restart when the tunnel crashes, the connection says: Active and running. But I checked the server itself and it is not working.

[Unit]
Description=GO Simple Tunnel
After=network.target
Wants=network.target

[Service]
Type=simple
ExecStart=/usr/local/bin/gost -L=relay+kcp://:3333
Restart=on-failure
RestartSec=5

[Install]
WantedBy=multi-user.target

[Unit]
Description=GO Simple Tunnel
After=network.target
Wants=network.target

[Service]
Type=simple
ExecStart=/usr/local/bin/gost -L=udp://:80/b.example.com:51820 -L=tcp://:8080/b.example.com:1194 -F relay+kcp://b.example.com:3333
Restart=on-failure
RestartSec=5

[Install]
WantedBy=multi-user.target

@imshuai
Copy link

imshuai commented Jan 11, 2025

try this config

server 1

gost -L udp://:80/127.0.0.1:51820 -L tcp://:8080/127.0.0.1:1194 -F relay+kcp://b.example.com:3333

server 2

gost -L relay+kcp://:3333

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants