plugin: new plugin static_file for getting files by http protocol

This commit is contained in:
fatedier
2018-01-24 17:49:13 +08:00
parent 33d8816ced
commit 68dfc89bce
4 changed files with 158 additions and 44 deletions

View File

@@ -73,6 +73,16 @@ local_port = 22
# if remote_port is 0, frps will assgin a random port for you
remote_port = 0
# if you want tp expose multiple ports, add 'range:' prefix to the section name
# frpc will generate multiple proxies such as 'tcp_port_6010', 'tcp_port_6011' and so on.
[range:tcp_port]
type = tcp
local_ip = 127.0.0.1
local_port = 6010-6020,6022,6024-6028
remote_port = 6010-6020,6022,6024-6028
use_encryption = false
use_compression = false
[dns]
type = udp
local_ip = 114.114.114.114
@@ -81,6 +91,14 @@ remote_port = 6002
use_encryption = false
use_compression = false
[range:udp_port]
type = udp
local_ip = 127.0.0.1
local_port = 6010-6020
remote_port = 6010-6020
use_encryption = false
use_compression = false
# Resolve your domain names to [server_addr] so you can use http://web01.yourdomain.com to browse web01 and http://web02.yourdomain.com to browse web02
[web01]
type = http
@@ -124,6 +142,15 @@ plugin = http_proxy
plugin_http_user = abc
plugin_http_passwd = abc
[plugin_static_file]
type = tcp
remote_port = 6005
plugin = static_file
plugin_local_path = /var/www/blog
plugin_strip_prefix = static
plugin_http_user = abc
plugin_http_passwd = abc
[secret_tcp]
# If the type is secret tcp, remote_port is useless
# Who want to connect local port should deploy another frpc with stcp proxy and role is visitor