Skip to content

Instantly share code, notes, and snippets.

@websofter
Created June 11, 2026 07:02
Show Gist options
  • Select an option

  • Save websofter/97f7868d9937f4308c6cfaff7a8a95a3 to your computer and use it in GitHub Desktop.

Select an option

Save websofter/97f7868d9937f4308c6cfaff7a8a95a3 to your computer and use it in GitHub Desktop.
Example for FRP Proxy settings
services:
frps:
image: snowdreamtech/frps
container_name: frps
restart: unless-stopped
volumes:
- ./frps.toml:/etc/frp/frps.toml:ro
ports:
- "7000:7000"
- "5173:5173"
- "8050:8050"
serverAddr = "45.13.226.224"
serverPort = 7000
auth.method = "token"
auth.token = "my-super-secret-token"
[[proxies]]
name = "frontend"
type = "tcp"
localIP = "127.0.0.1"
localPort = 5173
remotePort = 5173
[[proxies]]
name = "backend"
type = "tcp"
localIP = "127.0.0.1"
localPort = 8050
remotePort = 8050
bindPort = 7000
auth.method = "token"
auth.token = "my-super-secret-token"
server {
server_name dev.motive.wsofter.com;
client_max_body_size 20M;
location = /api {
return 301 /api/;
}
location /api/ {
proxy_pass http://127.0.0.1:8050/;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_cache_bypass $http_upgrade;
}
location / {
proxy_pass http://127.0.0.1:5173;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_cache_bypass $http_upgrade;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment