FRPS服务端配置文件解析
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
[common]
bind_addr = 0.0.0.0
bind_port = 7000
bind_udp_port = 7001
kcp_bind_port = 7000
proxy_bind_addr = 127.0.0.1
vhost_http_port = 80
vhost_https_port = 443
vhost_http_timeout = 60
dashboard_addr = 0.0.0.0
dashboard_port = 7500
dashboard_user = admin
dashboard_pwd = admin
log_file = ./frps.log
log_level = info
log_max_days = 3
token = 12345678
allow_ports = 2000-3000,3001,3003,4000-50000
max_pool_count = 5
max_ports_per_client = 0
subdomain_host = frps.com
tcp_mux = true
|
frpc客户端
配置解析common字段
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
[common]
server_addr = 0.0.0.0
server_port = 7000
http_proxy = socks5://user:passwd@192.168.1.128:1080
log_file = ./frpc.log
log_level = info
log_max_days = 3
token = 12345678
admin_addr = 127.0.0.1
admin_port = 7400
admin_user = admin
admin_pwd = admin
pool_count = 5
tcp_mux = true
user = your_name
login_fail_exit = true
protocol = tcp
[ssh]
...
...
[dns]
...
...
|
代理模块配置
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
|
[ssh]
type = tcp
local_ip = 127.0.0.1
local_port = 22
plugin = unix_domain_socket
plugin_unix_path = /var/run/docker.sock
use_encryption = false
use_compression = false
remote_port = 6001
[range:abc]
local_port = 6010-6020,6022,6024-6028
remote_port = 6010-6020,6022,6024-6028
[test1]
type = tcp
local_port = 8080
remote_port = 80
group = web
group_key = 123
[test2]
type = tcp
local_port = 8081
remote_port = 80
group = web
group_key = 123
health_check_type = tcp
health_check_timeout_s = 3
health_check_max_failed = 3
health_check_interval_s = 10
[web01]
type = http
local_ip = 127.0.0.1
local_port = 80
http_user = admin
http_pwd = admin
subdomain = web01
custom_domains = web02.yourdomain.com
locations = /pic,/abc
host_header_rewrite = example.com
header_X-From-Where = frp
health_check_type = http
health_check_url = /status
health_check_interval_s = 10
health_check_max_failed = 3
health_check_timeout_s = 3
[plugin_http_proxy]
type = tcp
remote_port = 6004
plugin = http_proxy
plugin_http_user = abc
plugin_http_passwd = abc
[plugin_socks5]
type = tcp
remote_port = 6005
plugin = socks5
plugin_user = abc
plugin_passwd = abc
[plugin_static_file]
type = tcp
remote_port = 6006
plugin = static_file
plugin_local_path = /var/www/blog
plugin_strip_prefix = static
plugin_http_user = abc
plugin_http_passwd = abc
[secret_sshaaa]
type = stcp
sk = abcdefg
local_ip = 127.0.0.1
local_port = 22
[secret_ssh_visitor]
type = stcp
role = visitor
server_name = secret_sshaaa
sk = abcdefg
bind_addr = 127.0.0.1
bind_port = 6000
[p2p_ssh]
type = xtcp
sk = abcdefg
local_ip = 127.0.0.1
local_port = 22
[p2p_ssh_visitor]
type = xtcp
role = visitor
server_name = p2p_ssh
sk = abcdefg
bind_addr = 127.0.0.1
bind_port = 6000
ssh -oPort=6000 [email protected]
|
命令行使用
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
frps \
--bind_addr 0.0.0.0 \
--bind_port 1989 \
--dashboard_addr 0.0.0.0 \
--dashboard_port 1990 \
--dashboard_pwd stest \
--dashboard_user admin \
--token stest
./frpc tcp \
--local_port 22 \
--proxy_name kylin \
--server_addr xxx.xx.xx.xx:1989 \
--remote_port 1991 \
--token stest \
--uc \
--ue
|
来源:
https://www.li-rui.top/2019/02/20/toos_and_service/%E5%86%85%E7%BD%91%E7%A9%BF%E9%80%8Ffrp%E9%85%8D%E7%BD%AE%E8%AF%A6%E8%A7%A3/
https://www.chuantou.org/49.html
共有 0 条评论