mirror of
https://github.com/ImranR98/selfhostingfromscratch.git
synced 2026-04-24 06:38:36 -04:00
Add FRP
This commit is contained in:
23
frpc.toml
Normal file
23
frpc.toml
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
serverAddr = "137.220.35.151"
|
||||||
|
serverPort = 7000
|
||||||
|
auth.additionalScopes = ["HeartBeats", "NewWorkConns"]
|
||||||
|
auth.method = "token"
|
||||||
|
auth.token = "mysupersecrettoken"
|
||||||
|
|
||||||
|
[[proxies]]
|
||||||
|
name = "http"
|
||||||
|
type = "tcp"
|
||||||
|
localIP = "127.0.0.1"
|
||||||
|
localPort = 80
|
||||||
|
remotePort = 80
|
||||||
|
transport.useEncryption = true
|
||||||
|
transport.proxyProtocolVersion = "v2"
|
||||||
|
|
||||||
|
[[proxies]]
|
||||||
|
name = "https"
|
||||||
|
type = "tcp"
|
||||||
|
localIP = "127.0.0.1"
|
||||||
|
localPort = 443
|
||||||
|
remotePort = 443
|
||||||
|
transport.useEncryption = true
|
||||||
|
transport.proxyProtocolVersion = "v2"
|
||||||
4
frps.toml
Normal file
4
frps.toml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
bindPort = 7000
|
||||||
|
auth.additionalScopes = ["HeartBeats", "NewWorkConns"]
|
||||||
|
auth.method = "token"
|
||||||
|
auth.token = "mysupersecrettoken"
|
||||||
10
proxy.docker-compose.yaml
Normal file
10
proxy.docker-compose.yaml
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
services:
|
||||||
|
|
||||||
|
frps: # https://github.com/fatedier/frp
|
||||||
|
image: fatedier/frps:v0.65.0
|
||||||
|
container_name: frps
|
||||||
|
restart: always
|
||||||
|
volumes:
|
||||||
|
- ./frps.toml:/frps.toml
|
||||||
|
network_mode: host
|
||||||
|
command: "-c /frps.toml"
|
||||||
@@ -1,5 +1,14 @@
|
|||||||
services:
|
services:
|
||||||
|
|
||||||
|
frpc: # https://github.com/fatedier/frp
|
||||||
|
image: fatedier/frpc:v0.65.0
|
||||||
|
container_name: frpc
|
||||||
|
restart: always
|
||||||
|
volumes:
|
||||||
|
- ./frpc.toml:/frpc.toml
|
||||||
|
network_mode: host
|
||||||
|
command: "-c /frpc.toml"
|
||||||
|
|
||||||
traefik: # https://github.com/traefik/traefik
|
traefik: # https://github.com/traefik/traefik
|
||||||
image: traefik:latest
|
image: traefik:latest
|
||||||
container_name: traefik
|
container_name: traefik
|
||||||
@@ -19,14 +28,16 @@ services:
|
|||||||
- "--entrypoints.web.http.redirections.entrypoint.permanent=true"
|
- "--entrypoints.web.http.redirections.entrypoint.permanent=true"
|
||||||
- "--entryPoints.websecure=true"
|
- "--entryPoints.websecure=true"
|
||||||
- "--entryPoints.websecure.address=:443"
|
- "--entryPoints.websecure.address=:443"
|
||||||
|
- "--entryPoints.websecure.proxyProtocol.trustedIPs=172.19.0.1/32"
|
||||||
ports:
|
ports:
|
||||||
- "80:80"
|
- "80:80"
|
||||||
- "443:443"
|
- "443:443"
|
||||||
volumes:
|
volumes:
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
|
- traefik_acme:/acme
|
||||||
labels:
|
labels:
|
||||||
- "traefik.enable=true"
|
- "traefik.enable=true"
|
||||||
- "traefik.http.routers.api.rule=Host(`traefik.imranr.cloud`)" # Add to /etc/hosts
|
- "traefik.http.routers.api.rule=Host(`traefik.imranr.cloud`)"
|
||||||
- "traefik.http.routers.api.entryPoints=websecure"
|
- "traefik.http.routers.api.entryPoints=websecure"
|
||||||
- "traefik.http.routers.api.service=api@internal"
|
- "traefik.http.routers.api.service=api@internal"
|
||||||
- "traefik.http.routers.api.tls=true"
|
- "traefik.http.routers.api.tls=true"
|
||||||
@@ -48,13 +59,14 @@ services:
|
|||||||
- traefik
|
- traefik
|
||||||
labels:
|
labels:
|
||||||
- "traefik.enable=true"
|
- "traefik.enable=true"
|
||||||
- "traefik.http.routers.filebrowser.rule=Host(`files.imranr.cloud`)" # Add to /etc/hosts
|
- "traefik.http.routers.filebrowser.rule=Host(`files.imranr.cloud`)"
|
||||||
- "traefik.http.routers.filebrowser.entrypoints=websecure"
|
- "traefik.http.routers.filebrowser.entrypoints=websecure"
|
||||||
- "traefik.http.routers.filebrowser.tls=true"
|
- "traefik.http.routers.filebrowser.tls=true"
|
||||||
- "traefik.http.services.filebrowser.loadbalancer.server.port=80"
|
- "traefik.http.services.filebrowser.loadbalancer.server.port=80"
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
filebrowser_db:
|
filebrowser_db:
|
||||||
|
traefik_acme:
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
traefik:
|
traefik:
|
||||||
|
|||||||
Reference in New Issue
Block a user