Skip to content

Instantly share code, notes, and snippets.

@tynevosa
Last active June 12, 2025 13:55
Show Gist options
  • Save tynevosa/7059fc0917490462dcd1b8705bbdfcfb to your computer and use it in GitHub Desktop.
Save tynevosa/7059fc0917490462dcd1b8705bbdfcfb to your computer and use it in GitHub Desktop.
Setup Reverse Proxy (FRP)

1. Setup FRPS on VPS (linux-based OS)

Download the FRP on VPS

wget https://github.com/fatedier/frp/releases/download/v0.62.1/frp_0.62.1_linux_amd64.tar.gz

cd frp_0.62.1_linux_amd64

Edit frps.toml

bindPort = 7000

# The default value is 127.0.0.1. Change it to 0.0.0.0 when you want to access it from a public network.
webServer.addr = "0.0.0.0"
webServer.port = 7500
# dashboard's username and password are both optional
webServer.user = "admin"
webServer.password = "admin"

Register FRPS as a system service

sudo nano /etc/systemd/system/frps.service
[Unit]
Description=FRPS Service
After=network.target

[Service]
User=root
ExecStart=/{path}/frp_0.62.1_linux_amd64/frps -c /{path}/frp_0.62.1_linux_amd64/frps.toml
Restart=always
RestartSec=60

[Install]
WantedBy=multi-user.target
sudo systemctl enable frps.service
sudo systemctl start frps.service

2. Setup Proxy server on local PC (linux-based OS)

Follow below guide. https://gist.github.com/jackblk/fdac4c744ddf2a0533278a38888f3caf


3. Setup FRPC on local PC (linux-based OS)

Download the FRP on VPS

wget https://github.com/fatedier/frp/releases/download/v0.62.1/frp_0.62.1_linux_amd64.tar.gz

cd frp_0.62.1_linux_amd64

Edit frpc.toml NOTE : use public IP address of VPS in serverAddr

serverAddr = "x.x.x.x"
serverPort = 7000

[[proxies]]
name = "proxy"
type = "tcp"
localPort = 3128
remotePort = 13128

Register FRPC as a system service

sudo nano /etc/systemd/system/frpc.service
[Unit]
Description=FRPC Service
After=network.target

[Service]
User=root
ExecStart=/{path}/frp_0.62.1_linux_amd64/frpc -c /{path}/frp_0.62.1_linux_amd64/frpc.toml
Restart=always
RestartSec=60

[Install]
WantedBy=multi-user.target
sudo systemctl enable frpc.service
sudo systemctl start frpc.service

NOW, your reverse proxy is ready on x.x.x.x:13128

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment