mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00
luci-app-frpc: tidy up code (#8168)
This commit is contained in:
parent
ac2d41bd27
commit
0ed591b402
@ -10,7 +10,7 @@ LUCI_TITLE:=LuCI for FRPC
|
|||||||
LUCI_DEPENDS:=+wget +frpc
|
LUCI_DEPENDS:=+wget +frpc
|
||||||
LUCI_PKGARCH:=all
|
LUCI_PKGARCH:=all
|
||||||
PKG_VERSION:=1.4
|
PKG_VERSION:=1.4
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
include $(TOPDIR)/feeds/luci/luci.mk
|
include $(TOPDIR)/feeds/luci/luci.mk
|
||||||
|
|
||||||
|
@ -5,14 +5,14 @@ function index()
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
entry({"admin", "services", "frp"}, cbi("frp/frp"), _("Frp Setting"), 100).dependent = true
|
entry({"admin", "services", "frp"}, cbi("frp/basic"), _("Frp Setting"), 100).dependent = true
|
||||||
entry({"admin", "services", "frp", "config"}, cbi("frp/config")).leaf = true
|
entry({"admin", "services", "frp", "config"}, cbi("frp/config")).leaf = true
|
||||||
entry({"admin", "services", "frp", "status"}, call("status")).leaf = true
|
entry({"admin", "services", "frp", "status"}, call("act_status")).leaf = true
|
||||||
end
|
end
|
||||||
|
|
||||||
function status()
|
function act_status()
|
||||||
local e={}
|
local e = {}
|
||||||
e.running=luci.sys.call("pidof frpc > /dev/null")==0
|
e.running = luci.sys.call("pidof frpc > /dev/null") == 0
|
||||||
luci.http.prepare_content("application/json")
|
luci.http.prepare_content("application/json")
|
||||||
luci.http.write_json(e)
|
luci.http.write_json(e)
|
||||||
end
|
end
|
||||||
|
241
package/lean/luci-app-frpc/luasrc/model/cbi/frp/basic.lua
Normal file
241
package/lean/luci-app-frpc/luasrc/model/cbi/frp/basic.lua
Normal file
@ -0,0 +1,241 @@
|
|||||||
|
local o=require"luci.dispatcher"
|
||||||
|
local e=require("luci.model.ipkg")
|
||||||
|
local s=require"nixio.fs"
|
||||||
|
local e=luci.model.uci.cursor()
|
||||||
|
local i="frp"
|
||||||
|
local a,t,e
|
||||||
|
local n={}
|
||||||
|
|
||||||
|
a = Map("frp")
|
||||||
|
a.title = translate("Frp Setting")
|
||||||
|
a.description = translate("Frp is a fast reverse proxy to help you expose a local server behind a NAT or firewall to the internet.")
|
||||||
|
|
||||||
|
a:section(SimpleSection).template="frp/frp_status"
|
||||||
|
|
||||||
|
t = a:section(NamedSection, "common","frp")
|
||||||
|
t.anonymous = true
|
||||||
|
t.addremove = false
|
||||||
|
|
||||||
|
t:tab("base", translate("Basic Settings"))
|
||||||
|
t:tab("other", translate("Other Settings"))
|
||||||
|
t:tab("log", translate("Client Log"))
|
||||||
|
|
||||||
|
e = t:taboption("base", Flag, "enabled", translate("Enabled"))
|
||||||
|
e.rmempty = false
|
||||||
|
|
||||||
|
e = t:taboption("base", Value, "server_addr", translate("Server"))
|
||||||
|
e.optional = false
|
||||||
|
e.rmempty = false
|
||||||
|
|
||||||
|
e = t:taboption("base", Value, "server_port", translate("Port"))
|
||||||
|
e.datatype = "port"
|
||||||
|
e.optional = false
|
||||||
|
e.rmempty = false
|
||||||
|
|
||||||
|
e = t:taboption("base", Value, "token", translate("Token"))
|
||||||
|
e.description = translate("Time duration between server of frpc and frps mustn't exceed 15 minutes.")
|
||||||
|
e.optional = false
|
||||||
|
e.password = true
|
||||||
|
e.rmempty = false
|
||||||
|
|
||||||
|
e = t:taboption("base", Value, "user", translate("User"))
|
||||||
|
e.description = translate("Commonly used to distinguish you with other clients.")
|
||||||
|
e.optional = true
|
||||||
|
e.default = ""
|
||||||
|
e.rmempty = false
|
||||||
|
|
||||||
|
e = t:taboption("base", Value, "vhost_http_port", translate("Vhost HTTP Port"))
|
||||||
|
e.datatype = "port"
|
||||||
|
e.rmempty = false
|
||||||
|
|
||||||
|
e = t:taboption("base", Value, "vhost_https_port", translate("Vhost HTTPS Port"))
|
||||||
|
e.datatype = "port"
|
||||||
|
e.rmempty = false
|
||||||
|
|
||||||
|
e = t:taboption("base", Value, "time", translate("Service registration interval"))
|
||||||
|
e.description = translate("0 means disable this feature, unit: min")
|
||||||
|
e.datatype = "range(0,59)"
|
||||||
|
e.default = 30
|
||||||
|
e.rmempty = false
|
||||||
|
|
||||||
|
e = t:taboption("other", Flag, "login_fail_exit", translate("Exit program when first login failed"))
|
||||||
|
e.description = translate("decide if exit program when first login failed, otherwise continuous relogin to frps.")
|
||||||
|
e.default = "1"
|
||||||
|
e.rmempty = false
|
||||||
|
|
||||||
|
e = t:taboption("other", Flag, "tcp_mux", translate("TCP Stream Multiplexing"))
|
||||||
|
e.description = translate("Default is Ture. This feature in frps.ini and frpc.ini must be same.")
|
||||||
|
e.default = "1"
|
||||||
|
e.rmempty = false
|
||||||
|
|
||||||
|
e = t:taboption("other", Flag, "tls_enable", translate("Use TLS Connection"))
|
||||||
|
e.description = translate("if tls_enable is true, frpc will connect frps by tls.")
|
||||||
|
e.default = "0"
|
||||||
|
e.rmempty = false
|
||||||
|
|
||||||
|
e = t:taboption("other", ListValue, "protocol", translate("Protocol Type"))
|
||||||
|
e.description = translate("Frp support kcp protocol since v0.12.0")
|
||||||
|
e.default = "tcp"
|
||||||
|
e:value("tcp", translate("TCP Protocol"))
|
||||||
|
e:value("kcp", translate("KCP Protocol"))
|
||||||
|
|
||||||
|
e = t:taboption("other", Flag, "enable_http_proxy", translate("Connect frps by HTTP PROXY"))
|
||||||
|
e.description = translate("frpc can connect frps using HTTP PROXY")
|
||||||
|
e.default = "0"
|
||||||
|
e.rmempty = false
|
||||||
|
e:depends("protocol","tcp")
|
||||||
|
|
||||||
|
e = t:taboption("other", Value, "http_proxy", translate("HTTP PROXY"))
|
||||||
|
e.datatype = "uinteger"
|
||||||
|
e.placeholder = "http://user:pwd@192.168.1.128:8080"
|
||||||
|
e:depends("enable_http_proxy",1)
|
||||||
|
e.optional = false
|
||||||
|
|
||||||
|
e = t:taboption("other", Flag, "enable_cpool", translate("Enable Connection Pool"))
|
||||||
|
e.description = translate("This feature is fit for a large number of short connections.")
|
||||||
|
e.rmempty = false
|
||||||
|
|
||||||
|
e = t:taboption("other", Value, "pool_count", translate("Connection Pool"))
|
||||||
|
e.description = translate("Connections will be established in advance.")
|
||||||
|
e.datatype = "uinteger"
|
||||||
|
e.default = "1"
|
||||||
|
e:depends("enable_cpool",1)
|
||||||
|
e.optional=false
|
||||||
|
|
||||||
|
e = t:taboption("other", ListValue, "log_level", translate("Log Level"))
|
||||||
|
e.default = "warn"
|
||||||
|
e:value("trace", translate("Trace"))
|
||||||
|
e:value("debug", translate("Debug"))
|
||||||
|
e:value("info", translate("Info"))
|
||||||
|
e:value("warn", translate("Warning"))
|
||||||
|
e:value("error", translate("Error"))
|
||||||
|
|
||||||
|
e = t:taboption("other", Value, "log_max_days", translate("Log Keepd Max Days"))
|
||||||
|
e.datatype = "uinteger"
|
||||||
|
e.default = "3"
|
||||||
|
e.rmempty = false
|
||||||
|
e.optional = false
|
||||||
|
|
||||||
|
e = t:taboption("other", Flag, "admin_enable", translate("Enable Web API"))
|
||||||
|
e.description = translate("set admin address for control frpc's action by http api such as reload.")
|
||||||
|
e.default = "0"
|
||||||
|
e.rmempty=false
|
||||||
|
|
||||||
|
e = t:taboption("other", Value, "admin_port", translate("Admin Web Port"))
|
||||||
|
e.datatype = "port"
|
||||||
|
e.default = 7400
|
||||||
|
e.rmempty = false
|
||||||
|
e:depends("admin_enable",1)
|
||||||
|
|
||||||
|
e = t:taboption("other", Value, "admin_user", translate("Admin Web UserName"))
|
||||||
|
e.optional = false
|
||||||
|
e.default = "admin"
|
||||||
|
e.rmempty=false
|
||||||
|
e:depends("admin_enable",1)
|
||||||
|
|
||||||
|
e = t:taboption("other", Value, "admin_pwd", translate("Admin Web PassWord"))
|
||||||
|
e.optional = false
|
||||||
|
e.default = "admin"
|
||||||
|
e.password = true
|
||||||
|
e.rmempty = false
|
||||||
|
e:depends("admin_enable",1)
|
||||||
|
|
||||||
|
e = t:taboption("log", TextValue,"log")
|
||||||
|
e.rows = 26
|
||||||
|
e.wrap = "off"
|
||||||
|
e.readonly = true
|
||||||
|
e.cfgvalue = function(t,t)
|
||||||
|
return s.readfile("/var/etc/frp/frpc.log")or""
|
||||||
|
end
|
||||||
|
e.write = function(e,e,e)
|
||||||
|
end
|
||||||
|
|
||||||
|
t = a:section(TypedSection, "proxy", translate("Services List"))
|
||||||
|
t.anonymous = true
|
||||||
|
t.addremove = true
|
||||||
|
t.template = "cbi/tblsection"
|
||||||
|
t.extedit = o.build_url("admin","services","frp","config","%s")
|
||||||
|
|
||||||
|
function t.create(e,t)
|
||||||
|
new = TypedSection.create(e,t)
|
||||||
|
luci.http.redirect(e.extedit:format(new))
|
||||||
|
end
|
||||||
|
|
||||||
|
function t.remove(e,t)
|
||||||
|
e.map.proceed = true
|
||||||
|
e.map:del(t)
|
||||||
|
luci.http.redirect(o.build_url("admin","services","frp"))
|
||||||
|
end
|
||||||
|
|
||||||
|
local o = ""
|
||||||
|
e = t:option(DummyValue, "remark", translate("Service Remark Name"))
|
||||||
|
e.width="10%"
|
||||||
|
|
||||||
|
e = t:option(DummyValue, "type", translate("Frp Protocol Type"))
|
||||||
|
e.width="10%"
|
||||||
|
|
||||||
|
e = t:option(DummyValue, "custom_domains", translate("Domain/Subdomain"))
|
||||||
|
e.width="20%"
|
||||||
|
|
||||||
|
e.cfgvalue = function(t,n)
|
||||||
|
local t = a.uci:get(i,n,"domain_type")or""
|
||||||
|
local m = a.uci:get(i,n,"type")or""
|
||||||
|
if t=="custom_domains" then
|
||||||
|
local b = a.uci:get(i,n,"custom_domains")or"" return b end
|
||||||
|
if t=="subdomain" then
|
||||||
|
local b = a.uci:get(i,n,"subdomain")or"" return b end
|
||||||
|
if t=="both_dtype" then
|
||||||
|
local b = a.uci:get(i,n,"custom_domains")or""
|
||||||
|
local c = a.uci:get(i,n,"subdomain")or""
|
||||||
|
b="%s/%s"%{b,c} return b end
|
||||||
|
if m=="tcp" or m=="udp" then
|
||||||
|
local b=a.uci:get(i,"common","server_addr")or"" return b end
|
||||||
|
end
|
||||||
|
|
||||||
|
e = t:option(DummyValue,"remote_port",translate("Remote Port"))
|
||||||
|
e.width = "10%"
|
||||||
|
e.cfgvalue = function(t,b)
|
||||||
|
local t=a.uci:get(i,b,"type")or""
|
||||||
|
if t==""or b==""then return""end
|
||||||
|
if t=="http" then
|
||||||
|
local b=a.uci:get(i,"common","vhost_http_port")or"" return b end
|
||||||
|
if t=="https" then
|
||||||
|
local b=a.uci:get(i,"common","vhost_https_port")or"" return b end
|
||||||
|
if t=="tcp" or t=="udp" then
|
||||||
|
local b=a.uci:get(i,b,"remote_port")or"" return b end
|
||||||
|
end
|
||||||
|
|
||||||
|
e = t:option(DummyValue, "local_ip", translate("Local Host Address"))
|
||||||
|
e.width = "15%"
|
||||||
|
|
||||||
|
e = t:option(DummyValue, "local_port", translate("Local Host Port"))
|
||||||
|
e.width = "10%"
|
||||||
|
|
||||||
|
e = t:option(DummyValue, "use_encryption", translate("Use Encryption"))
|
||||||
|
e.width = "15%"
|
||||||
|
|
||||||
|
e.cfgvalue = function(t,n)
|
||||||
|
local t=a.uci:get(i,n,"use_encryption")or""
|
||||||
|
local b
|
||||||
|
if t==""or b==""then return""end
|
||||||
|
if t=="1" then b="ON"
|
||||||
|
else b="OFF" end
|
||||||
|
return b
|
||||||
|
end
|
||||||
|
|
||||||
|
e = t:option(DummyValue, "use_compression", translate("Use Compression"))
|
||||||
|
e.width = "15%"
|
||||||
|
e.cfgvalue=function(t,n)
|
||||||
|
local t = a.uci:get(i,n,"use_compression")or""
|
||||||
|
local b
|
||||||
|
if t==""or b==""then return""end
|
||||||
|
if t=="1" then b="ON"
|
||||||
|
else b="OFF" end
|
||||||
|
return b
|
||||||
|
end
|
||||||
|
|
||||||
|
e = t:option(Flag, "enable", translate("Enable State"))
|
||||||
|
e.width = "10%"
|
||||||
|
e.rmempty = false
|
||||||
|
|
||||||
|
return a
|
@ -1,53 +1,71 @@
|
|||||||
local n="frp"
|
local n = "frp"
|
||||||
local i=require"luci.dispatcher"
|
local i = require"luci.dispatcher"
|
||||||
local o=require"luci.model.network".init()
|
local o = require"luci.model.network".init()
|
||||||
local m=require"nixio.fs"
|
local m = require"nixio.fs"
|
||||||
local a,t,e
|
local a,t,e
|
||||||
arg[1]=arg[1]or""
|
|
||||||
a=Map(n,translate("Frp Domain Config"))
|
arg[1] = arg[1]or""
|
||||||
a.redirect=i.build_url("admin","services","frp")
|
|
||||||
t=a:section(NamedSection,arg[1],"frp",translate("Config Frp Protocol"))
|
a = Map("frp")
|
||||||
t.addremove=false
|
a.title = translate("Frp Domain Config")
|
||||||
t.dynamic=false
|
a.redirect = i.build_url("admin","services","frp")
|
||||||
t:tab("base",translate("Basic Settings"))
|
|
||||||
t:tab("other",translate("Other Settings"))
|
t = a:section(NamedSection, arg[1], "frp")
|
||||||
e=t:taboption("base",ListValue,"enable",translate("Enable State"))
|
t.title = translate("Config Frp Protocol")
|
||||||
e.default="1"
|
t.addremove = false
|
||||||
e.rmempty=false
|
t.dynamic = false
|
||||||
e:value("1",translate("Enable"))
|
|
||||||
e:value("0",translate("Disable"))
|
t:tab("base", translate("Basic Settings"))
|
||||||
e=t:taboption("base",ListValue, "type", translate("Frp Protocol Type"))
|
t:tab("other", translate("Other Settings"))
|
||||||
e:value("http",translate("HTTP"))
|
|
||||||
e:value("https",translate("HTTPS"))
|
e = t:taboption("base", ListValue,"enable", translate("Enable State"))
|
||||||
e:value("tcp",translate("TCP"))
|
e.default = "1"
|
||||||
e:value("udp",translate("UDP"))
|
e.rmempty = false
|
||||||
e:value("stcp",translate("STCP"))
|
e:value("1", translate("Enable"))
|
||||||
e = t:taboption("base",ListValue, "domain_type", translate("Domain Type"))
|
e:value("0", translate("Disable"))
|
||||||
|
|
||||||
|
e = t:taboption("base", ListValue, "type", translate("Frp Protocol Type"))
|
||||||
|
e:value("http", translate("HTTP"))
|
||||||
|
e:value("https", translate("HTTPS"))
|
||||||
|
e:value("tcp", translate("TCP"))
|
||||||
|
e:value("udp", translate("UDP"))
|
||||||
|
e:value("stcp", translate("STCP"))
|
||||||
|
|
||||||
|
e = t:taboption("base", ListValue, "domain_type", translate("Domain Type"))
|
||||||
e.default = "custom_domains"
|
e.default = "custom_domains"
|
||||||
e:value("custom_domains",translate("Custom Domains"))
|
e:value("custom_domains", translate("Custom Domains"))
|
||||||
e:value("subdomain",translate("SubDomain"))
|
e:value("subdomain", translate("SubDomain"))
|
||||||
e:value("both_dtype",translate("Both the above two Domain types"))
|
e:value("both_dtype", translate("Both the above two Domain types"))
|
||||||
e:depends("type","http")
|
e:depends("type","http")
|
||||||
e:depends("type","https")
|
e:depends("type","https")
|
||||||
e = t:taboption("base",Value, "custom_domains", translate("Custom Domains"), translate("If SubDomain is used, Custom Domains couldn't be subdomain or wildcard domain of the maindomain(subdomain_host)."))
|
|
||||||
|
e = t:taboption("base", Value, "custom_domains", translate("Custom Domains"))
|
||||||
|
e.description = translate("If SubDomain is used, Custom Domains couldn't be subdomain or wildcard domain of the maindomain(subdomain_host).")
|
||||||
e:depends("domain_type","custom_domains")
|
e:depends("domain_type","custom_domains")
|
||||||
e:depends("domain_type","both_dtype")
|
e:depends("domain_type","both_dtype")
|
||||||
e = t:taboption("base",Value, "subdomain", translate("SubDomain"), translate("subdomain_host must be configured in server: frps in advance."))
|
|
||||||
|
e = t:taboption("base", Value, "subdomain", translate("SubDomain"))
|
||||||
|
e.description = translate("subdomain_host must be configured in server: frps in advance.")
|
||||||
e:depends("domain_type","subdomain")
|
e:depends("domain_type","subdomain")
|
||||||
e:depends("domain_type","both_dtype")
|
e:depends("domain_type","both_dtype")
|
||||||
e = t:taboption("base",ListValue, "stcp_role", translate("STCP Role"))
|
|
||||||
|
e = t:taboption("base", ListValue, "stcp_role", translate("STCP Role"))
|
||||||
e.default = "server"
|
e.default = "server"
|
||||||
e:value("server",translate("STCP Server"))
|
e:value("server", translate("STCP Server"))
|
||||||
e:value("visitor",translate("STCP Vistor"))
|
e:value("visitor", translate("STCP Vistor"))
|
||||||
e:depends("type","stcp")
|
e:depends("type","stcp")
|
||||||
e = t:taboption("base",Value, "remote_port", translate("Remote Port"))
|
|
||||||
|
e = t:taboption("base", Value, "remote_port", translate("Remote Port"))
|
||||||
e.datatype = "port"
|
e.datatype = "port"
|
||||||
e:depends("type","tcp")
|
e:depends("type","tcp")
|
||||||
e:depends("type","udp")
|
e:depends("type","udp")
|
||||||
e = t:taboption("other",Flag, "enable_plugin", translate("Use Plugin"),translate("If plugin is defined, local_ip and local_port is useless, plugin will handle connections got from frps."))
|
|
||||||
|
e = t:taboption("other", Flag, "enable_plugin", translate("Use Plugin"))
|
||||||
|
e.description = translate("If plugin is defined, local_ip and local_port is useless, plugin will handle connections got from frps.")
|
||||||
e.default = "0"
|
e.default = "0"
|
||||||
e:depends("type","tcp")
|
e:depends("type","tcp")
|
||||||
e = t:taboption("base",Value, "local_ip", translate("Local Host Address"))
|
|
||||||
|
e = t:taboption("base", Value, "local_ip", translate("Local Host Address"))
|
||||||
luci.sys.net.ipv4_hints(function(x,d)
|
luci.sys.net.ipv4_hints(function(x,d)
|
||||||
e:value(x,"%s (%s)"%{x,d})
|
e:value(x,"%s (%s)"%{x,d})
|
||||||
end)
|
end)
|
||||||
@ -56,91 +74,130 @@ e:depends("type","udp")
|
|||||||
e:depends("type","http")
|
e:depends("type","http")
|
||||||
e:depends("type","https")
|
e:depends("type","https")
|
||||||
e:depends("enable_plugin",0)
|
e:depends("enable_plugin",0)
|
||||||
e = t:taboption("base",Value, "local_port", translate("Local Host Port"))
|
|
||||||
|
e = t:taboption("base", Value, "local_port", translate("Local Host Port"))
|
||||||
e.datatype = "port"
|
e.datatype = "port"
|
||||||
e:depends("type","udp")
|
e:depends("type","udp")
|
||||||
e:depends("type","http")
|
e:depends("type","http")
|
||||||
e:depends("type","https")
|
e:depends("type","https")
|
||||||
e:depends("enable_plugin",0)
|
e:depends("enable_plugin",0)
|
||||||
e = t:taboption("base",Value, "stcp_secretkey", translate("STCP Screct Key"))
|
|
||||||
|
e = t:taboption("base", Value, "stcp_secretkey", translate("STCP Screct Key"))
|
||||||
e.default = "abcdefg"
|
e.default = "abcdefg"
|
||||||
e:depends("type","stcp")
|
e:depends("type","stcp")
|
||||||
e = t:taboption("base",Value, "stcp_servername", translate("STCP Server Name"), translate("STCP Server Name is Service Remark Name of STCP Server"))
|
|
||||||
|
e = t:taboption("base", Value, "stcp_servername", translate("STCP Server Name"))
|
||||||
|
e.description = translate("STCP Server Name is Service Remark Name of STCP Server")
|
||||||
e.default = "secret_tcp"
|
e.default = "secret_tcp"
|
||||||
e:depends("stcp_role","visitor")
|
e:depends("stcp_role","visitor")
|
||||||
e = t:taboption("other",Flag, "enable_locations", translate("Enable URL routing"), translate("Frp support forward http requests to different backward web services by url routing."))
|
|
||||||
|
e = t:taboption("other", Flag, "enable_locations", translate("Enable URL routing"))
|
||||||
|
e.description = translate("Frp support forward http requests to different backward web services by url routing.")
|
||||||
e:depends("type","http")
|
e:depends("type","http")
|
||||||
e = t:taboption("other",Value, "locations ", translate("URL routing"), translate("Http requests with url prefix /news will be forwarded to this service."))
|
|
||||||
e.default="locations=/"
|
e = t:taboption("other", Value, "locations ", translate("URL routing"))
|
||||||
|
e.description = translate("Http requests with url prefix /news will be forwarded to this service.")
|
||||||
|
e.default = "locations=/"
|
||||||
e:depends("enable_locations",1)
|
e:depends("enable_locations",1)
|
||||||
e = t:taboption("other",ListValue, "plugin", translate("Choose Plugin"))
|
|
||||||
e:value("http_proxy",translate("http_proxy"))
|
e = t:taboption("other", ListValue, "plugin", translate("Choose Plugin"))
|
||||||
e:value("socks5",translate("socks5"))
|
e:value("http_proxy", translate("http_proxy"))
|
||||||
e:value("unix_domain_socket",translate("unix_domain_socket"))
|
e:value("socks5", translate("socks5"))
|
||||||
|
e:value("unix_domain_socket", translate("unix_domain_socket"))
|
||||||
e:depends("enable_plugin",1)
|
e:depends("enable_plugin",1)
|
||||||
e = t:taboption("other",Flag, "enable_plugin_httpuserpw", translate("Proxy Authentication"),translate("Other PCs could access the Internet through frpc's network by using http_proxy plugin."))
|
|
||||||
|
e = t:taboption("other", Flag, "enable_plugin_httpuserpw", translate("Proxy Authentication"))
|
||||||
|
e.description = translate("Other PCs could access the Internet through frpc's network by using http_proxy plugin.")
|
||||||
e.default = "0"
|
e.default = "0"
|
||||||
e:depends("plugin","http_proxy")
|
e:depends("plugin","http_proxy")
|
||||||
e = t:taboption("other",Value, "plugin_http_user", translate("HTTP Proxy UserName"))
|
|
||||||
|
e = t:taboption("other", Value, "plugin_http_user", translate("HTTP Proxy UserName"))
|
||||||
e.default = "abc"
|
e.default = "abc"
|
||||||
e:depends("enable_plugin_httpuserpw",1)
|
e:depends("enable_plugin_httpuserpw",1)
|
||||||
e = t:taboption("other",Value, "plugin_http_passwd", translate("HTTP Proxy Password"))
|
|
||||||
|
e = t:taboption("other", Value, "plugin_http_passwd", translate("HTTP Proxy Password"))
|
||||||
e.default = "abc"
|
e.default = "abc"
|
||||||
e:depends("enable_plugin_httpuserpw",1)
|
e:depends("enable_plugin_httpuserpw",1)
|
||||||
e = t:taboption("other",Value, "plugin_unix_path", translate("Plugin Unix Sock Path"))
|
|
||||||
|
e = t:taboption("other", Value, "plugin_unix_path", translate("Plugin Unix Sock Path"))
|
||||||
e.default = "/var/run/docker.sock"
|
e.default = "/var/run/docker.sock"
|
||||||
e:depends("plugin","unix_domain_socket")
|
e:depends("plugin","unix_domain_socket")
|
||||||
e = t:taboption("other",Flag, "enable_http_auth", translate("Password protecting your web service"), translate("Http username and password are safety certification for http protocol."))
|
|
||||||
|
e = t:taboption("other", Flag, "enable_http_auth", translate("Password protecting your web service"))
|
||||||
|
e.description = translate("Http username and password are safety certification for http protocol.")
|
||||||
e.default = "0"
|
e.default = "0"
|
||||||
e:depends("type","http")
|
e:depends("type","http")
|
||||||
e = t:taboption("other",Value, "http_user", translate("HTTP UserName"))
|
|
||||||
|
e = t:taboption("other", Value, "http_user", translate("HTTP UserName"))
|
||||||
e.default = "frp"
|
e.default = "frp"
|
||||||
e:depends("enable_http_auth",1)
|
e:depends("enable_http_auth",1)
|
||||||
e = t:taboption("other",Value, "http_pwd", translate("HTTP PassWord"))
|
|
||||||
|
e = t:taboption("other", Value, "http_pwd", translate("HTTP PassWord"))
|
||||||
e.default = "frp"
|
e.default = "frp"
|
||||||
e:depends("enable_http_auth",1)
|
e:depends("enable_http_auth",1)
|
||||||
e = t:taboption("other",Flag, "enable_host_header_rewrite", translate("Rewriting the Host Header"), translate("Frp can rewrite http requests with a modified Host header."))
|
|
||||||
|
e = t:taboption("other", Flag, "enable_host_header_rewrite", translate("Rewriting the Host Header"))
|
||||||
|
e.description = translate("Frp can rewrite http requests with a modified Host header.")
|
||||||
e.default = "0"
|
e.default = "0"
|
||||||
e:depends("type","http")
|
e:depends("type","http")
|
||||||
e = t:taboption("other",Value, "host_header_rewrite", translate("Host Header"), translate("The Host header will be rewritten to match the hostname portion of the forwarding address."))
|
|
||||||
|
e = t:taboption("other", Value, "host_header_rewrite", translate("Host Header"))
|
||||||
|
e.description = translate("The Host header will be rewritten to match the hostname portion of the forwarding address.")
|
||||||
e.default = "dev.yourdomain.com"
|
e.default = "dev.yourdomain.com"
|
||||||
e:depends("enable_host_header_rewrite",1)
|
e:depends("enable_host_header_rewrite",1)
|
||||||
e=t:taboption("other",Flag,"enable_https_plugin",translate("Use Plugin"))
|
|
||||||
e.default="0"
|
e = t:taboption("other", Flag, "enable_https_plugin", translate("Use Plugin"))
|
||||||
|
e.default = "0"
|
||||||
e:depends("type","https")
|
e:depends("type","https")
|
||||||
e=t:taboption("other",ListValue,"https_plugin",translate("Choose Plugin"),translate("If plugin is defined, local_ip and local_port is useless, plugin will handle connections got from frps."))
|
|
||||||
e:value("https2http",translate("https2http"))
|
e = t:taboption("other", ListValue, "https_plugin", translate("Choose Plugin"))
|
||||||
|
e.description = translate("If plugin is defined, local_ip and local_port is useless, plugin will handle connections got from frps.")
|
||||||
|
e:value("https2http", translate("https2http"))
|
||||||
e:depends("enable_https_plugin",1)
|
e:depends("enable_https_plugin",1)
|
||||||
e=t:taboption("other",Value,"plugin_local_addr",translate("Plugin_Local_Addr"))
|
|
||||||
|
e = t:taboption("other", Value, "plugin_local_addr", translate("Plugin_Local_Addr"))
|
||||||
e.default="127.0.0.1:80"
|
e.default="127.0.0.1:80"
|
||||||
e:depends("https_plugin","https2http")
|
e:depends("https_plugin","https2http")
|
||||||
e=t:taboption("other",Value,"plugin_crt_path",translate("plugin_crt_path"))
|
|
||||||
e.default="./server.crt"
|
e = t:taboption("other", Value, "plugin_crt_path", translate("plugin_crt_path"))
|
||||||
|
e.default = "./server.crt"
|
||||||
e:depends("https_plugin","https2http")
|
e:depends("https_plugin","https2http")
|
||||||
e=t:taboption("other",Value,"plugin_key_path",translate("plugin_key_path"))
|
|
||||||
e.default="./server.key"
|
e = t:taboption("other", Value, "plugin_key_path", translate("plugin_key_path"))
|
||||||
|
e.default = "./server.key"
|
||||||
e:depends("https_plugin","https2http")
|
e:depends("https_plugin","https2http")
|
||||||
e=t:taboption("other",Value,"plugin_host_header_rewrite",translate("plugin_host_header_rewrite"))
|
|
||||||
e.default="127.0.0.1"
|
e = t:taboption("other", Value, "plugin_host_header_rewrite", translate("plugin_host_header_rewrite"))
|
||||||
|
e.default = "127.0.0.1"
|
||||||
e:depends("https_plugin","https2http")
|
e:depends("https_plugin","https2http")
|
||||||
e=t:taboption("other",Value,"plugin_header_X_From_Where",translate("plugin_header_X-From-Where"))
|
|
||||||
e.default="frp"
|
e = t:taboption("other", Value, "plugin_header_X_From_Where", translate("plugin_header_X-From-Where"))
|
||||||
|
e.default = "frp"
|
||||||
e:depends("https_plugin","https2http")
|
e:depends("https_plugin","https2http")
|
||||||
e = t:taboption("base",ListValue, "proxy_protocol_version", translate("Proxy-Protocol Version"), translate("Proxy Protocol to send user's real IP to local services."))
|
|
||||||
|
e = t:taboption("base", ListValue, "proxy_protocol_version", translate("Proxy-Protocol Version"))
|
||||||
|
e.description = translate("Proxy Protocol to send user's real IP to local services.")
|
||||||
e.default = "disable"
|
e.default = "disable"
|
||||||
e:value("disable",translate("Disable"))
|
e:value("disable", translate("Disable"))
|
||||||
e:value("v1",translate("V1"))
|
e:value("v1", translate("V1"))
|
||||||
e:value("v2",translate("V2"))
|
e:value("v2", translate("V2"))
|
||||||
e:depends("type","tcp")
|
e:depends("type","tcp")
|
||||||
e:depends("type","stcp")
|
e:depends("type","stcp")
|
||||||
e:depends("type","http")
|
e:depends("type","http")
|
||||||
e:depends("type","https")
|
e:depends("type","https")
|
||||||
e = t:taboption("base",Flag, "use_encryption", translate("Use Encryption"), translate("Encrypted the communication between frpc and frps, will effectively prevent the traffic intercepted."))
|
|
||||||
|
e = t:taboption("base",Flag, "use_encryption", translate("Use Encryption"))
|
||||||
|
e.description = translate("Encrypted the communication between frpc and frps, will effectively prevent the traffic intercepted.")
|
||||||
e.default = "1"
|
e.default = "1"
|
||||||
e.rmempty = false
|
e.rmempty = false
|
||||||
e = t:taboption("base",Flag, "use_compression", translate("Use Compression"), translate("The contents will be compressed to speed up the traffic forwarding speed, but this will consume some additional cpu resources."))
|
|
||||||
|
e = t:taboption("base",Flag, "use_compression", translate("Use Compression"))
|
||||||
|
e.description = translate("The contents will be compressed to speed up the traffic forwarding speed, but this will consume some additional cpu resources.")
|
||||||
e.default = "1"
|
e.default = "1"
|
||||||
e.rmempty = false
|
e.rmempty = false
|
||||||
e = t:taboption("base",Value, "remark", translate("Service Remark Name"), translate("<font color=\"red\">Please ensure the remark name is unique.</font>"))
|
|
||||||
|
e = t:taboption("base",Value, "remark", translate("Service Remark Name"))
|
||||||
|
e.description = translate("<font color=\"red\">Please ensure the remark name is unique.</font>")
|
||||||
e.rmempty = false
|
e.rmempty = false
|
||||||
|
|
||||||
return a
|
return a
|
||||||
|
@ -1,187 +0,0 @@
|
|||||||
local o=require"luci.dispatcher"
|
|
||||||
local e=require("luci.model.ipkg")
|
|
||||||
local s=require"nixio.fs"
|
|
||||||
local e=luci.model.uci.cursor()
|
|
||||||
local i="frp"
|
|
||||||
local a,t,e
|
|
||||||
local n={}
|
|
||||||
a=Map(i,translate("Frp Setting"), translate("Frp is a fast reverse proxy to help you expose a local server behind a NAT or firewall to the internet."))
|
|
||||||
a:section(SimpleSection).template="frp/frp_status"
|
|
||||||
t=a:section(NamedSection,"common","frp",translate("Global Setting"))
|
|
||||||
t.anonymous=true
|
|
||||||
t.addremove=false
|
|
||||||
t:tab("base",translate("Basic Settings"))
|
|
||||||
t:tab("other",translate("Other Settings"))
|
|
||||||
t:tab("log",translate("Client Log"))
|
|
||||||
e=t:taboption("base",Flag, "enabled", translate("Enabled"))
|
|
||||||
e.rmempty=false
|
|
||||||
e=t:taboption("base",Value, "server_addr", translate("Server"))
|
|
||||||
e.optional=false
|
|
||||||
e.rmempty=false
|
|
||||||
e=t:taboption("base",Value, "server_port", translate("Port"))
|
|
||||||
e.datatype = "port"
|
|
||||||
e.optional=false
|
|
||||||
e.rmempty=false
|
|
||||||
e=t:taboption("base",Value, "token", translate("Token"), translate("Time duration between server of frpc and frps mustn't exceed 15 minutes."))
|
|
||||||
e.optional=false
|
|
||||||
e.password=true
|
|
||||||
e.rmempty=false
|
|
||||||
e=t:taboption("base",Value, "user", translate("User"), translate("Commonly used to distinguish you with other clients."))
|
|
||||||
e.optional=true
|
|
||||||
e.default = ""
|
|
||||||
e.rmempty=false
|
|
||||||
e=t:taboption("base",Value, "vhost_http_port", translate("Vhost HTTP Port"))
|
|
||||||
e.datatype = "port"
|
|
||||||
e.rmempty=false
|
|
||||||
e=t:taboption("base",Value, "vhost_https_port", translate("Vhost HTTPS Port"))
|
|
||||||
e.datatype = "port"
|
|
||||||
e.rmempty=false
|
|
||||||
e=t:taboption("other",Flag, "login_fail_exit", translate("Exit program when first login failed"),translate("decide if exit program when first login failed, otherwise continuous relogin to frps."))
|
|
||||||
e.default = "1"
|
|
||||||
e.rmempty=false
|
|
||||||
e=t:taboption("other",Flag, "tcp_mux", translate("TCP Stream Multiplexing"), translate("Default is Ture. This feature in frps.ini and frpc.ini must be same."))
|
|
||||||
e.default = "1"
|
|
||||||
e.rmempty=false
|
|
||||||
e=t:taboption("other",Flag, "tls_enable", translate("Use TLS Connection"), translate("if tls_enable is true, frpc will connect frps by tls."))
|
|
||||||
e.default = "0"
|
|
||||||
e.rmempty=false
|
|
||||||
e=t:taboption("other",ListValue, "protocol", translate("Protocol Type"),translate("Frp support kcp protocol since v0.12.0"))
|
|
||||||
e.default = "tcp"
|
|
||||||
e:value("tcp",translate("TCP Protocol"))
|
|
||||||
e:value("kcp",translate("KCP Protocol"))
|
|
||||||
e=t:taboption("other",Flag, "enable_http_proxy", translate("Connect frps by HTTP PROXY"), translate("frpc can connect frps using HTTP PROXY"))
|
|
||||||
e.default = "0"
|
|
||||||
e.rmempty=false
|
|
||||||
e:depends("protocol","tcp")
|
|
||||||
e=t:taboption("other",Value, "http_proxy", translate("HTTP PROXY"))
|
|
||||||
e.datatype="uinteger"
|
|
||||||
e.placeholder="http://user:pwd@192.168.1.128:8080"
|
|
||||||
e:depends("enable_http_proxy",1)
|
|
||||||
e.optional=false
|
|
||||||
e=t:taboption("other",Flag, "enable_cpool", translate("Enable Connection Pool"), translate("This feature is fit for a large number of short connections."))
|
|
||||||
e.rmempty=false
|
|
||||||
e=t:taboption("other",Value, "pool_count", translate("Connection Pool"), translate("Connections will be established in advance."))
|
|
||||||
e.datatype="uinteger"
|
|
||||||
e.default = "1"
|
|
||||||
e:depends("enable_cpool",1)
|
|
||||||
e.optional=false
|
|
||||||
e=t:taboption("base",Value,"time",translate("Service registration interval"),translate("0 means disable this feature, unit: min"))
|
|
||||||
e.datatype="range(0,59)"
|
|
||||||
e.default=30
|
|
||||||
e.rmempty=false
|
|
||||||
e=t:taboption("other",ListValue, "log_level", translate("Log Level"))
|
|
||||||
e.default = "warn"
|
|
||||||
e:value("trace",translate("Trace"))
|
|
||||||
e:value("debug",translate("Debug"))
|
|
||||||
e:value("info",translate("Info"))
|
|
||||||
e:value("warn",translate("Warning"))
|
|
||||||
e:value("error",translate("Error"))
|
|
||||||
e=t:taboption("other",Value, "log_max_days", translate("Log Keepd Max Days"))
|
|
||||||
e.datatype = "uinteger"
|
|
||||||
e.default = "3"
|
|
||||||
e.rmempty=false
|
|
||||||
e.optional=false
|
|
||||||
e=t:taboption("other",Flag, "admin_enable", translate("Enable Web API"), translate("set admin address for control frpc's action by http api such as reload."))
|
|
||||||
e.default = "0"
|
|
||||||
e.rmempty=false
|
|
||||||
e=t:taboption("other",Value, "admin_port", translate("Admin Web Port"))
|
|
||||||
e.datatype = "port"
|
|
||||||
e.default=7400
|
|
||||||
e.rmempty=false
|
|
||||||
e:depends("admin_enable",1)
|
|
||||||
e=t:taboption("other",Value, "admin_user", translate("Admin Web UserName"))
|
|
||||||
e.optional=false
|
|
||||||
e.default = "admin"
|
|
||||||
e.rmempty=false
|
|
||||||
e:depends("admin_enable",1)
|
|
||||||
e=t:taboption("other",Value, "admin_pwd", translate("Admin Web PassWord"))
|
|
||||||
e.optional=false
|
|
||||||
e.default = "admin"
|
|
||||||
e.password=true
|
|
||||||
e.rmempty=false
|
|
||||||
e:depends("admin_enable",1)
|
|
||||||
|
|
||||||
e=t:taboption("log",TextValue,"log")
|
|
||||||
e.rows=26
|
|
||||||
e.wrap="off"
|
|
||||||
e.readonly=true
|
|
||||||
e.cfgvalue=function(t,t)
|
|
||||||
return s.readfile("/var/etc/frp/frpc.log")or""
|
|
||||||
end
|
|
||||||
e.write=function(e,e,e)
|
|
||||||
end
|
|
||||||
t=a:section(TypedSection,"proxy",translate("Services List"))
|
|
||||||
t.anonymous=true
|
|
||||||
t.addremove=true
|
|
||||||
t.template="cbi/tblsection"
|
|
||||||
t.extedit=o.build_url("admin","services","frp","config","%s")
|
|
||||||
function t.create(e,t)
|
|
||||||
new=TypedSection.create(e,t)
|
|
||||||
luci.http.redirect(e.extedit:format(new))
|
|
||||||
end
|
|
||||||
function t.remove(e,t)
|
|
||||||
e.map.proceed=true
|
|
||||||
e.map:del(t)
|
|
||||||
luci.http.redirect(o.build_url("admin","services","frp"))
|
|
||||||
end
|
|
||||||
local o=""
|
|
||||||
e=t:option(DummyValue,"remark",translate("Service Remark Name"))
|
|
||||||
e.width="10%"
|
|
||||||
e=t:option(DummyValue,"type",translate("Frp Protocol Type"))
|
|
||||||
e.width="10%"
|
|
||||||
e=t:option(DummyValue,"custom_domains",translate("Domain/Subdomain"))
|
|
||||||
e.width="20%"
|
|
||||||
e.cfgvalue=function(t,n)
|
|
||||||
local t=a.uci:get(i,n,"domain_type")or""
|
|
||||||
local m=a.uci:get(i,n,"type")or""
|
|
||||||
if t=="custom_domains" then
|
|
||||||
local b=a.uci:get(i,n,"custom_domains")or"" return b end
|
|
||||||
if t=="subdomain" then
|
|
||||||
local b=a.uci:get(i,n,"subdomain")or"" return b end
|
|
||||||
if t=="both_dtype" then
|
|
||||||
local b=a.uci:get(i,n,"custom_domains")or""
|
|
||||||
local c=a.uci:get(i,n,"subdomain")or""
|
|
||||||
b="%s/%s"%{b,c} return b end
|
|
||||||
if m=="tcp" or m=="udp" then
|
|
||||||
local b=a.uci:get(i,"common","server_addr")or"" return b end
|
|
||||||
end
|
|
||||||
e=t:option(DummyValue,"remote_port",translate("Remote Port"))
|
|
||||||
e.width="10%"
|
|
||||||
e.cfgvalue=function(t,b)
|
|
||||||
local t=a.uci:get(i,b,"type")or""
|
|
||||||
if t==""or b==""then return""end
|
|
||||||
if t=="http" then
|
|
||||||
local b=a.uci:get(i,"common","vhost_http_port")or"" return b end
|
|
||||||
if t=="https" then
|
|
||||||
local b=a.uci:get(i,"common","vhost_https_port")or"" return b end
|
|
||||||
if t=="tcp" or t=="udp" then
|
|
||||||
local b=a.uci:get(i,b,"remote_port")or"" return b end
|
|
||||||
end
|
|
||||||
e=t:option(DummyValue,"local_ip",translate("Local Host Address"))
|
|
||||||
e.width="15%"
|
|
||||||
e=t:option(DummyValue,"local_port",translate("Local Host Port"))
|
|
||||||
e.width="10%"
|
|
||||||
e=t:option(DummyValue,"use_encryption",translate("Use Encryption"))
|
|
||||||
e.width="15%"
|
|
||||||
e.cfgvalue=function(t,n)
|
|
||||||
local t=a.uci:get(i,n,"use_encryption")or""
|
|
||||||
local b
|
|
||||||
if t==""or b==""then return""end
|
|
||||||
if t=="1" then b="ON"
|
|
||||||
else b="OFF" end
|
|
||||||
return b
|
|
||||||
end
|
|
||||||
e=t:option(DummyValue,"use_compression",translate("Use Compression"))
|
|
||||||
e.width="15%"
|
|
||||||
e.cfgvalue=function(t,n)
|
|
||||||
local t=a.uci:get(i,n,"use_compression")or""
|
|
||||||
local b
|
|
||||||
if t==""or b==""then return""end
|
|
||||||
if t=="1" then b="ON"
|
|
||||||
else b="OFF" end
|
|
||||||
return b
|
|
||||||
end
|
|
||||||
e=t:option(Flag,"enable",translate("Enable State"))
|
|
||||||
e.width="10%"
|
|
||||||
e.rmempty=false
|
|
||||||
return a
|
|
@ -4,10 +4,10 @@ XHR.poll(5, '<%=url([[admin]], [[services]], [[frp]], [[status]])%>', null,
|
|||||||
var tb = document.getElementById('frp_status');
|
var tb = document.getElementById('frp_status');
|
||||||
if (data && tb) {
|
if (data && tb) {
|
||||||
if (data.running) {
|
if (data.running) {
|
||||||
var links = '<em><b><font color=green><%:The Frp service is running.%></font></b></em>';
|
var links = '<em><b><font color=green>Frp <%:RUNNING%></font></b></em>';
|
||||||
tb.innerHTML = links;
|
tb.innerHTML = links;
|
||||||
} else {
|
} else {
|
||||||
tb.innerHTML = '<em><b><font color=red><%:The Frp service is not running.%></font></b></em>';
|
tb.innerHTML = '<em><b><font color=red>Frp <%:NOT RUNNING%></font></b></em>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -16,7 +16,6 @@ XHR.poll(5, '<%=url([[admin]], [[services]], [[frp]], [[status]])%>', null,
|
|||||||
</script>
|
</script>
|
||||||
<style>.mar-10 {margin-left: 50px; margin-right: 10px;}</style>
|
<style>.mar-10 {margin-left: 50px; margin-right: 10px;}</style>
|
||||||
<fieldset class="cbi-section">
|
<fieldset class="cbi-section">
|
||||||
<legend><%:Frp Status%></legend>
|
|
||||||
<p id="frp_status">
|
<p id="frp_status">
|
||||||
<em><%:Collecting data...%></em>
|
<em><%:Collecting data...%></em>
|
||||||
</p>
|
</p>
|
||||||
|
@ -1,297 +1,290 @@
|
|||||||
msgid ""
|
msgid ""
|
||||||
msgstr "Content-Type: text/plain; charset=UTF-8"
|
msgstr "Content-Type: text/plain; charset=UTF-8"
|
||||||
|
|
||||||
|
msgid "Frp Setting"
|
||||||
msgid "Frp Setting"
|
msgstr "Frp 内网穿透"
|
||||||
msgstr "Frp 内网穿透"
|
|
||||||
|
msgid "NOT RUNNING"
|
||||||
msgid "Frp Status"
|
msgstr "未运行"
|
||||||
msgstr "Frp状态"
|
|
||||||
|
msgid "RUNNING"
|
||||||
msgid "The Frp service is not running."
|
msgstr "运行中"
|
||||||
msgstr "Frp服务未运行"
|
|
||||||
|
msgid "Frp is a fast reverse proxy to help you expose a local server behind a NAT or firewall to the internet."
|
||||||
msgid "The Frp service is running."
|
msgstr "Frp 是一个可用于内网穿透的高性能的反向代理应用。"
|
||||||
msgstr "Frp服务正在运行"
|
|
||||||
|
msgid "Basic Settings"
|
||||||
msgid "Frp is a fast reverse proxy to help you expose a local server behind a NAT or firewall to the internet."
|
msgstr "基本设置"
|
||||||
msgstr "Frp 是一个可用于内网穿透的高性能的反向代理应用。"
|
|
||||||
|
msgid "Other Settings"
|
||||||
msgid "Global Setting"
|
msgstr "其他设置"
|
||||||
msgstr "全局设置"
|
|
||||||
|
msgid "Client Log"
|
||||||
msgid "Basic Settings"
|
msgstr "日志"
|
||||||
msgstr "基本设置"
|
|
||||||
|
msgid "Enabled"
|
||||||
msgid "Other Settings"
|
msgstr "启用"
|
||||||
msgstr "其他设置"
|
|
||||||
|
msgid "Server"
|
||||||
msgid "Client Log"
|
msgstr "服务器"
|
||||||
msgstr "日志"
|
|
||||||
|
msgid "Port"
|
||||||
msgid "Enabled"
|
msgstr "端口"
|
||||||
msgstr "启用"
|
|
||||||
|
msgid "Token"
|
||||||
msgid "Server"
|
msgstr "令牌"
|
||||||
msgstr "服务器"
|
|
||||||
|
msgid "User"
|
||||||
msgid "Port"
|
msgstr "用户名"
|
||||||
msgstr "端口"
|
|
||||||
|
msgid "Commonly used to distinguish you with other clients."
|
||||||
msgid "Token"
|
msgstr "通常用于区分你与其他客户端"
|
||||||
msgstr "令牌"
|
|
||||||
|
msgid "Time duration between server of frpc and frps mustn't exceed 15 minutes."
|
||||||
msgid "User"
|
msgstr "frpc服务器与frps之间的时间间隔不得超过15分钟"
|
||||||
msgstr "用户名"
|
|
||||||
|
msgid "Vhost HTTP Port"
|
||||||
msgid "Commonly used to distinguish you with other clients."
|
msgstr "HTTP 穿透服务端口"
|
||||||
msgstr "通常用于区分你与其他客户端"
|
|
||||||
|
msgid "Vhost HTTPS Port"
|
||||||
msgid "Time duration between server of frpc and frps mustn't exceed 15 minutes."
|
msgstr "HTTPS 穿透服务端口"
|
||||||
msgstr "frpc服务器与frps之间的时间间隔不得超过15分钟"
|
|
||||||
|
msgid "Exit program when first login failed"
|
||||||
msgid "Vhost HTTP Port"
|
msgstr "初始登录失败即退出程序"
|
||||||
msgstr "HTTP穿透服务端口"
|
|
||||||
|
msgid "TCP Stream Multiplexing"
|
||||||
msgid "Vhost HTTPS Port"
|
msgstr "TCP 端口复用"
|
||||||
msgstr "HTTPS穿透服务端口"
|
|
||||||
|
msgid "decide if exit program when first login failed, otherwise continuous relogin to frps."
|
||||||
msgid "Exit program when first login failed"
|
msgstr "第一次登录失败就退出程序,否则将持续尝试登陆 Frp 服务器。"
|
||||||
msgstr "初始登录失败即退出程序"
|
|
||||||
|
msgid "Default is Ture. This feature in frps.ini and frpc.ini must be same."
|
||||||
msgid "TCP Stream Multiplexing"
|
msgstr "该功能默认启用,该配置项在服务端和客户端必须保持一致。"
|
||||||
msgstr "TCP端口复用"
|
|
||||||
|
msgid "Use TLS Connection"
|
||||||
msgid "decide if exit program when first login failed, otherwise continuous relogin to frps."
|
msgstr "TLS 连接"
|
||||||
msgstr "第一次登录失败就退出程序,否则将持续尝试登陆 Frp 服务器。"
|
|
||||||
|
msgid "if tls_enable is true, frpc will connect frps by tls."
|
||||||
msgid "Default is Ture. This feature in frps.ini and frpc.ini must be same."
|
msgstr "使用 TLS 协议与服务器连接(若连接服务器异常可以尝试开启)"
|
||||||
msgstr "该功能默认启用,该配置项在服务端和客户端必须保持一致。"
|
|
||||||
|
msgid "Protocol Type"
|
||||||
msgid "Use TLS Connection"
|
msgstr "协议类型"
|
||||||
msgstr "TLS连接"
|
|
||||||
|
msgid "Frp support kcp protocol since v0.12.0"
|
||||||
msgid "if tls_enable is true, frpc will connect frps by tls."
|
msgstr "从 v0.12.0 版本开始,底层通信协议支持选择 kcp 协议加速。"
|
||||||
msgstr "使用TLS协议与服务器连接(若连接服务器异常可以尝试开启)"
|
|
||||||
|
msgid "TCP Protocol"
|
||||||
msgid "Protocol Type"
|
msgstr "TCP 协议"
|
||||||
msgstr "协议类型"
|
|
||||||
|
msgid "KCP Protocol"
|
||||||
msgid "Frp support kcp protocol since v0.12.0"
|
msgstr "KCP 协议"
|
||||||
msgstr "从 v0.12.0 版本开始,底层通信协议支持选择 kcp 协议加速。"
|
|
||||||
|
msgid "Connect frps by HTTP PROXY"
|
||||||
msgid "TCP Protocol"
|
msgstr "通过代理连接 frps"
|
||||||
msgstr "TCP协议"
|
|
||||||
|
msgid "frpc can connect frps using HTTP PROXY"
|
||||||
msgid "KCP Protocol"
|
msgstr "frpc 支持通过 HTTP PROXY 和 frps 进行通信"
|
||||||
msgstr "KCP协议"
|
|
||||||
|
msgid "HTTP PROXY"
|
||||||
msgid "Connect frps by HTTP PROXY"
|
msgstr "HTTP 代理"
|
||||||
msgstr "通过代理连接 frps"
|
|
||||||
|
msgid "Enable Connection Pool"
|
||||||
msgid "frpc can connect frps using HTTP PROXY"
|
msgstr "启用连接池功能"
|
||||||
msgstr "frpc 支持通过 HTTP PROXY 和 frps 进行通信"
|
|
||||||
|
msgid "This feature is fit for a large number of short connections."
|
||||||
msgid "HTTP PROXY"
|
msgstr "适合有大量短连接请求时开启"
|
||||||
msgstr "HTTP代理"
|
|
||||||
|
msgid "Connection Pool"
|
||||||
msgid "Enable Connection Pool"
|
msgstr "指定预创建连接的数量"
|
||||||
msgstr "启用连接池功能"
|
|
||||||
|
msgid "Connections will be established in advance."
|
||||||
msgid "This feature is fit for a large number of short connections."
|
msgstr "frpc 会预先和服务端建立起指定数量的连接。"
|
||||||
msgstr "适合有大量短连接请求时开启"
|
|
||||||
|
msgid "Service registration interval"
|
||||||
msgid "Connection Pool"
|
msgstr "服务注册间隔"
|
||||||
msgstr "指定预创建连接的数量"
|
|
||||||
|
msgid "0 means disable this feature, unit: min"
|
||||||
msgid "Connections will be established in advance."
|
msgstr "0表示禁用定时注册功能,单位:分钟"
|
||||||
msgstr "frpc 会预先和服务端建立起指定数量的连接。"
|
|
||||||
|
msgid "Log Level"
|
||||||
msgid "Service registration interval"
|
msgstr "日志记录等级"
|
||||||
msgstr "服务注册间隔"
|
|
||||||
|
msgid "Trace"
|
||||||
msgid "0 means disable this feature, unit: min"
|
msgstr "追踪"
|
||||||
msgstr "0表示禁用定时注册功能,单位:分钟"
|
|
||||||
|
msgid "Debug"
|
||||||
msgid "Log Level"
|
msgstr "调试"
|
||||||
msgstr "日志记录等级"
|
|
||||||
|
msgid "Info"
|
||||||
msgid "Trace"
|
msgstr "信息"
|
||||||
msgstr "追踪"
|
|
||||||
|
msgid "Warning"
|
||||||
msgid "Debug"
|
msgstr "警告"
|
||||||
msgstr "调试"
|
|
||||||
|
msgid "Error"
|
||||||
msgid "Info"
|
msgstr "错误"
|
||||||
msgstr "信息"
|
|
||||||
|
msgid "Log Keepd Max Days"
|
||||||
msgid "Warning"
|
msgstr "日志记录天数"
|
||||||
msgstr "警告"
|
|
||||||
|
msgid "Enable Web API"
|
||||||
msgid "Error"
|
msgstr "开启网页管理"
|
||||||
msgstr "错误"
|
|
||||||
|
msgid "set admin address for control frpc's action by http api such as reload."
|
||||||
msgid "Log Keepd Max Days"
|
msgstr "可通过http查看客户端状态以及通过API控制"
|
||||||
msgstr "日志记录天数"
|
|
||||||
|
msgid "Admin Web Port"
|
||||||
msgid "Enable Web API"
|
msgstr "管理员端口号"
|
||||||
msgstr "开启网页管理"
|
|
||||||
|
msgid "Admin Web UserName"
|
||||||
msgid "set admin address for control frpc's action by http api such as reload."
|
msgstr "管理员用户名"
|
||||||
msgstr "可通过http查看客户端状态以及通过API控制"
|
|
||||||
|
msgid "Admin Web PassWord"
|
||||||
msgid "Admin Web Port"
|
msgstr "管理员密码"
|
||||||
msgstr "管理员端口号"
|
|
||||||
|
msgid "Services List"
|
||||||
msgid "Admin Web UserName"
|
msgstr "服务列表"
|
||||||
msgstr "管理员用户名"
|
|
||||||
|
msgid "Service Remark Name"
|
||||||
msgid "Admin Web PassWord"
|
msgstr "服务备注名"
|
||||||
msgstr "管理员密码"
|
|
||||||
|
msgid "Domain/Subdomain"
|
||||||
msgid "Services List"
|
msgstr "域名/子域名"
|
||||||
msgstr "服务列表"
|
|
||||||
|
msgid "Remote Port"
|
||||||
msgid "Service Remark Name"
|
msgstr "远程主机端口"
|
||||||
msgstr "服务备注名"
|
|
||||||
|
msgid "Local Host Address"
|
||||||
msgid "Domain/Subdomain"
|
msgstr "内网主机地址"
|
||||||
msgstr "域名/子域名"
|
|
||||||
|
msgid "Local Host Port"
|
||||||
msgid "Remote Port"
|
msgstr "内网主机端口"
|
||||||
msgstr "远程主机端口"
|
|
||||||
|
msgid "Use Encryption"
|
||||||
msgid "Local Host Address"
|
msgstr "开启数据加密"
|
||||||
msgstr "内网主机地址"
|
|
||||||
|
msgid "Use Compression"
|
||||||
msgid "Local Host Port"
|
msgstr "使用压缩"
|
||||||
msgstr "内网主机端口"
|
|
||||||
|
msgid "Enable State"
|
||||||
msgid "Use Encryption"
|
msgstr "开启状态"
|
||||||
msgstr "开启数据加密"
|
|
||||||
|
msgid "Frp Domain Config"
|
||||||
msgid "Use Compression"
|
msgstr "Frp 域名配置"
|
||||||
msgstr "使用压缩"
|
|
||||||
|
msgid "Config Frp Protocol"
|
||||||
msgid "Enable State"
|
msgstr "配置 Frp 协议参数"
|
||||||
msgstr "开启状态"
|
|
||||||
|
msgid "Disable"
|
||||||
msgid "Frp Domain Config"
|
msgstr "关闭"
|
||||||
msgstr "Frp域名配置"
|
|
||||||
|
msgid "Frp Protocol Type"
|
||||||
msgid "Config Frp Protocol"
|
msgstr "Frp 协议类型"
|
||||||
msgstr "配置 Frp 协议参数"
|
|
||||||
|
msgid "Domain Type"
|
||||||
msgid "Disable"
|
msgstr "域名类型"
|
||||||
msgstr "关闭"
|
|
||||||
|
msgid "Custom Domains"
|
||||||
msgid "Frp Protocol Type"
|
msgstr "自定义域名"
|
||||||
msgstr "Frp 协议类型"
|
|
||||||
|
msgid "SubDomain"
|
||||||
msgid "Domain Type"
|
msgstr "子域名"
|
||||||
msgstr "域名类型"
|
|
||||||
|
msgid "Both the above two Domain types"
|
||||||
msgid "Custom Domains"
|
msgstr "同时使用2种域名"
|
||||||
msgstr "自定义域名"
|
|
||||||
|
msgid "If SubDomain is used, Custom Domains couldn't be subdomain or wildcard domain of the maindomain(subdomain_host)."
|
||||||
msgid "SubDomain"
|
msgstr "如果服务端配置了主域名(subdomain_host),则自定义域名不能是属于主域名(subdomain_host) 的子域名或者泛域名。"
|
||||||
msgstr "子域名"
|
|
||||||
|
msgid "subdomain_host must be configured in server: frps in advance."
|
||||||
msgid "Both the above two Domain types"
|
msgstr "使用子域名时,必须预先在服务端配置主域名(subdomain_host)参数。"
|
||||||
msgstr "同时使用2种域名"
|
|
||||||
|
msgid "STCP Role"
|
||||||
msgid "If SubDomain is used, Custom Domains couldn't be subdomain or wildcard domain of the maindomain(subdomain_host)."
|
msgstr "SFTP 服务类型"
|
||||||
msgstr "如果服务端配置了主域名(subdomain_host),则自定义域名不能是属于主域名(subdomain_host) 的子域名或者泛域名。"
|
|
||||||
|
msgid "Use Plugin"
|
||||||
msgid "subdomain_host must be configured in server: frps in advance."
|
msgstr "使用插件"
|
||||||
msgstr "使用子域名时,必须预先在服务端配置主域名(subdomain_host)参数。"
|
|
||||||
|
msgid "If plugin is defined, local_ip and local_port is useless, plugin will handle connections got from frps."
|
||||||
msgid "STCP Role"
|
msgstr "使用插件使用插件模式时,本地 IP 地址和端口无需配置,插件将会处理来自服务端的链接请求。"
|
||||||
msgstr "SFTP服务类型"
|
|
||||||
|
msgid "STCP Screct Key"
|
||||||
msgid "Use Plugin"
|
msgstr "SFTP 密钥"
|
||||||
msgstr "使用插件"
|
|
||||||
|
msgid "STCP Server Name"
|
||||||
msgid "If plugin is defined, local_ip and local_port is useless, plugin will handle connections got from frps."
|
msgstr "SFTP 服务名称"
|
||||||
msgstr "使用插件使用插件模式时,本地 IP 地址和端口无需配置,插件将会处理来自服务端的链接请求。"
|
|
||||||
|
msgid "Enable URL routing"
|
||||||
msgid "STCP Screct Key"
|
msgstr "启用 URL 路由"
|
||||||
msgstr "SFTP密钥"
|
|
||||||
|
msgid "Frp support forward http requests to different backward web services by url routing."
|
||||||
msgid "STCP Server Name"
|
msgstr "Frp 支持通过url路由将http请求转发到不同的反向web服务。"
|
||||||
msgstr "SFTP服务名称"
|
|
||||||
|
msgid "Choose Plugin"
|
||||||
msgid "Enable URL routing"
|
msgstr "选择插件"
|
||||||
msgstr "启用 URL 路由"
|
|
||||||
|
msgid "Proxy Authentication"
|
||||||
msgid "Frp support forward http requests to different backward web services by url routing."
|
msgstr "代理认证"
|
||||||
msgstr "Frp支持通过url路由将http请求转发到不同的反向web服务。"
|
|
||||||
|
msgid "Other PCs could access the Internet through frpc's network by using http_proxy plugin."
|
||||||
msgid "Choose Plugin"
|
msgstr "http proxy 插件,可以使其他机器通过 frpc 的网络访问互联网;开启身份验证之后需要用户名、密码才能连接到 HTTP 代理。"
|
||||||
msgstr "选择插件"
|
|
||||||
|
msgid "HTTP Proxy UserName"
|
||||||
msgid "Proxy Authentication"
|
msgstr "HTTP 代理用户名"
|
||||||
msgstr "代理认证"
|
|
||||||
|
msgid "HTTP Proxy Password"
|
||||||
msgid "Other PCs could access the Internet through frpc's network by using http_proxy plugin."
|
msgstr "HTTP 代理密码"
|
||||||
msgstr "http proxy 插件,可以使其他机器通过 frpc 的网络访问互联网;开启身份验证之后需要用户名、密码才能连接到 HTTP 代理。"
|
|
||||||
|
msgid "Plugin Unix Sock Path"
|
||||||
msgid "HTTP Proxy UserName"
|
msgstr "Unix Sock 插件路径"
|
||||||
msgstr "HTTP 代理用户名"
|
|
||||||
|
msgid "Password protecting your web service"
|
||||||
msgid "HTTP Proxy Password"
|
msgstr "密码保护您的web服务"
|
||||||
msgstr "HTTP 代理密码"
|
|
||||||
|
msgid "HTTP UserName"
|
||||||
msgid "Plugin Unix Sock Path"
|
msgstr "HTTP 用户名"
|
||||||
msgstr "Unix Sock 插件路径"
|
|
||||||
|
msgid "HTTP PassWord"
|
||||||
msgid "Password protecting your web service"
|
msgstr "HTTP 密码"
|
||||||
msgstr "密码保护您的web服务"
|
|
||||||
|
msgid "Rewriting the Host Header"
|
||||||
msgid "HTTP UserName"
|
msgstr "修改 Host Header"
|
||||||
msgstr "HTTP 用户名"
|
|
||||||
|
msgid "Frp can rewrite http requests with a modified Host header."
|
||||||
msgid "HTTP PassWord"
|
msgstr "Frp可以用修改后的主机头重写http请求。"
|
||||||
msgstr "HTTP 密码"
|
|
||||||
|
msgid "Proxy-Protocol Version"
|
||||||
msgid "Rewriting the Host Header"
|
msgstr "Proxy-Protocol 版本"
|
||||||
msgstr "修改 Host Header"
|
|
||||||
|
msgid "Encrypted the communication between frpc and frps, will effectively prevent the traffic intercepted."
|
||||||
msgid "Frp can rewrite http requests with a modified Host header."
|
msgstr "将 frpc 与 frps 之间的通信内容加密传输,将会有效防止流量被拦截。"
|
||||||
msgstr "Frp可以用修改后的主机头重写http请求。"
|
|
||||||
|
msgid "The contents will be compressed to speed up the traffic forwarding speed, but this will consume some additional cpu resources."
|
||||||
msgid "Proxy-Protocol Version"
|
msgstr "对传输内容进行压缩,加快流量转发速度,但是会额外消耗一些 cpu 资源。"
|
||||||
msgstr "Proxy-Protocol 版本"
|
|
||||||
|
msgid "Http username and password are safety certification for http protocol."
|
||||||
msgid "Encrypted the communication between frpc and frps, will effectively prevent the traffic intercepted."
|
msgstr "Http用户名和密码是Http协议的安全认证。"
|
||||||
msgstr "将 frpc 与 frps 之间的通信内容加密传输,将会有效防止流量被拦截。"
|
|
||||||
|
msgid "Proxy Protocol to send user's real IP to local services."
|
||||||
msgid "The contents will be compressed to speed up the traffic forwarding speed, but this will consume some additional cpu resources."
|
msgstr "将用户的真实IP发送到本地服务的代理协议。"
|
||||||
msgstr "对传输内容进行压缩,加快流量转发速度,但是会额外消耗一些 cpu 资源。"
|
|
||||||
|
msgid "STCP Server Name is Service Remark Name of STCP Server"
|
||||||
msgid "Http username and password are safety certification for http protocol."
|
msgstr "STCP服务器别名"
|
||||||
msgstr "Http用户名和密码是Http协议的安全认证。"
|
|
||||||
|
msgid "<font color=\"red\">Please ensure the remark name is unique.</font>"
|
||||||
msgid "Proxy Protocol to send user's real IP to local services."
|
msgstr "<font color=\"red\">确保备注名唯一</font>"
|
||||||
msgstr "将用户的真实IP发送到本地服务的代理协议。"
|
|
||||||
|
msgid "Plugin_Local_Addr"
|
||||||
msgid "STCP Server Name is Service Remark Name of STCP Server"
|
msgstr "插件本地地址(格式 IP:Port)"
|
||||||
msgstr "STCP服务器别名"
|
|
||||||
|
msgid "plugin_crt_path"
|
||||||
msgid "<font color=\"red\">Please ensure the remark name is unique.</font>"
|
msgstr "插件证书路径"
|
||||||
msgstr "<font color=\"red\">确保备注名唯一</font>"
|
|
||||||
|
msgid "plugin_key_path"
|
||||||
msgid "Plugin_Local_Addr"
|
msgstr "插件私钥路径"
|
||||||
msgstr "插件本地地址(格式 IP:Port)"
|
|
||||||
|
msgid "plugin_host_header_rewrite"
|
||||||
msgid "plugin_crt_path"
|
msgstr "插件 Host Header 重写"
|
||||||
msgstr "插件证书路径"
|
|
||||||
|
msgid "plugin_header_X-From-Where"
|
||||||
msgid "plugin_key_path"
|
msgstr "插件X-From-Where请求头"
|
||||||
msgstr "插件私钥路径"
|
|
||||||
|
|
||||||
msgid "plugin_host_header_rewrite"
|
|
||||||
msgstr "插件 Host Header 重写"
|
|
||||||
|
|
||||||
msgid "plugin_header_X-From-Where"
|
|
||||||
msgstr "插件X-From-Where请求头"
|
|
||||||
|
Loading…
Reference in New Issue
Block a user