Docker:安装frp服务端与客户端

来源

https://hub.docker.com/r/snowdreamtech/frps

https://github.com/fatedier/frp

服务端部署

1
2
3
4
5
6
7
8
9
10
version: '3.3'
services:
frps:
restart: always
network_mode: host
volumes:
- './frps.ini:/etc/frp/frps.ini'
- './frps_log:/tmp/frps_log'
container_name: frps
image: snowdreamtech/frps
  • mkdir frps && cd frps && mkdir frps_log
  • nano docker-compose.yml
  • nano frps.ini
  • docker-compose up -d
  • tail frps_log/frps.log
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
[common]
tls_only = true
authentication_method = token
token = <token>
bind_port = 21000
bind_udp_port = 20999
kcp_bind_port = 21000
dashboard_port = 11750
dashboard_user = Limour
dashboard_pwd = <passwd>
allow_ports = 21001-21999
subdomain_host = limour.top
vhost_http_port = 21080
vhost_https_port = 21443

log_file = /tmp/frps_log/frps.log
log_level = info
log_max_days = 3

客户端部署

1
2
3
4
5
6
7
8
9
version: '3.3'
services:
frpc_001:
restart: always
network_mode: host
volumes:
- './frpc.ini:/etc/frp/frpc.ini'
container_name: frpc_001
image: snowdreamtech/frpc
  • mkdir frpc_001 && cd frpc_001
  • nano docker-compose.yml
  • nano frpc.ini
  • sudo docker-compose up -d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
[common]
server_addr = frp.limour.top
server_port = 21000
tls_enable = true
token = <token>
user = rasp4

[ssh]
type = tcp
local_ip = 127.0.0.1
local_port = 22
remote_port = 21122

[V2rayA]
type = http
local_ip = 127.0.0.1
local_port = 2017
use_compression = true
subdomain = v2r4
host_header_rewrite = 127.0.0.1

[CaaS]
type = http
use_compression = true
subdomain = caas4
plugin = http2https
plugin_local_addr = 127.0.0.1:8443
plugin_host_header_rewrite = 127.0.0.1
plugin_header_X-From-Where = frp

[app_web]
type = http
local_ip = 192.168.1.1
local_port = 80
use_compression = true
subdomain = app
http_user = Limour
http_pwd = <APP_PASSWORD>

Docker:安装frp服务端与客户端
https://occdn.limour.top/2004.html
Author
Limour
Posted on
July 7, 2022
Licensed under