add frpc frps

This commit is contained in:
paldier 2019-01-16 20:14:27 +08:00
parent b379a99477
commit 806939aff7
48 changed files with 3976 additions and 0 deletions

34
frpc/backup.sh Normal file
View File

@ -0,0 +1,34 @@
#! /bin/bash
MD5='md5sum'
unamestr=`uname`
if [[ "$unamestr" == 'Darwin' ]]; then
MD5='md5'
fi
# you can do something here
# this shell scripts will run at the end of build.py scripts
MODULE=frpc
mkdir -p history
if [ ! -f ./history/version ];then
touch ./history/version
fi
version_old=`cat history/version | awk '{print $1}' | sort -rn |sed -n 1p`
version_new=`cat config.json.js |grep "version"|cut -d"\"" -f 4`
md5_old=`cat history/version | sort -nk1 | awk '{print $1}' |sed -n 1p`
if [[ "$unamestr" == 'Darwin' ]]; then
md5_new=`${MD5} $MODULE.tar.gz | awk '{print $4}'`
else
md5_new=`${MD5} $MODULE.tar.gz | awk '{print $1}'`
fi
if [ -f ./$MODULE.tar.gz ];then
if [ "$version_old" != "$version_new" ];then
mkdir ./history/$version_new/
cp ./$MODULE.tar.gz ./history/$version_new/
echo $version_new $md5_new >> ./history/version
fi
fi

32
frpc/build.sh Executable file
View File

@ -0,0 +1,32 @@
#!/bin/sh
MODULE=frpc
VERSION=2.1.15
TITLE=frpc穿透
DESCRIPTION=内网穿透利器,谁用谁知道。
HOME_URL=Module_frpc.asp
# Check and include base
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
if [ "$MODULE" == "" ]; then
echo "module not found"
exit 1
fi
if [ -f "$DIR/$MODULE/$MODULE/install.sh" ]; then
echo "install script not found"
exit 2
fi
# now include build_base.sh
. $DIR/../softcenter/build_base.sh
# change to module directory
cd $DIR
# do something here
do_build_result
sh backup.sh $MODULE

8
frpc/config.json.js Normal file
View File

@ -0,0 +1,8 @@
{
"version":"2.1.15",
"md5":"6ad0d26c66249eb415af1f9c72a8e986",
"home_url":"Module_frpc.asp",
"title":"frpc穿透",
"description":"内网穿透利器,谁用谁知道。",
"build_date":"2019-01-16_20:01:32"
}

BIN
frpc/frpc.tar.gz Normal file

Binary file not shown.

BIN
frpc/frpc/bin/base64_encode Executable file

Binary file not shown.

BIN
frpc/frpc/bin/frpc Executable file

Binary file not shown.

View File

@ -0,0 +1,2 @@
#!/bin/sh
sh /jffs/softcenter/scripts/config-frpc.sh

59
frpc/frpc/install.sh Normal file
View File

@ -0,0 +1,59 @@
#!/bin/sh
MODULE=frpc
VERSION="2.1.15"
cd /tmp
rm -f /jffs/softcenter/init.d/S98frpc.sh
if [ ! -x /jffs/softcenter/bin/base64_encode ]; then
cp -f /tmp/frpc/bin/base64_encode /jffs/softcenter/bin/base64_encode
chmod +x /jffs/softcenter/bin/base64_encode
[ ! -e /jffs/softcenter/bin/base64_decode ] && cp -f /jffs/softcenter/bin/base64_encode /jffs/softcenter/bin/base64_decode
fi
cp -f /tmp/${MODULE}/bin/frpc /jffs/softcenter/bin/frpc
cp -f /tmp/${MODULE}/scripts/* /jffs/softcenter/scripts/
cp -f /tmp/${MODULE}/res/* /jffs/softcenter/res/
cp -f /tmp/${MODULE}/webs/* /jffs/softcenter/webs/
cp -f /tmp/${MODULE}/init.d/* /jffs/softcenter/init.d/
[ ! -d /jffs/softcenter/res/layer ] && ( mkdir -p /jffs/softcenter/res/layer/; cp -rf /tmp/frpc/res/layer/* /jffs/softcenter/res/layer/ )
rm -fr /tmp/frp* >/dev/null 2>&1
killall ${MODULE}
chmod +x /jffs/softcenter/bin/frpc
chmod +x /jffs/softcenter/scripts/config-frpc.sh
chmod +x /jffs/softcenter/scripts/frpc_status.sh
chmod +x /jffs/softcenter/scripts/uninstall_frpc.sh
chmod +x /jffs/softcenter/init.d/S98frpc.sh
sleep 1
dbus set frpc_client_version=`/jffs/softcenter/bin/frpc --version`
#if [ "`dbus get frpc_version`"x = "2.1.4"x ]; then
# dbus set frpc_customize_conf="1"
#fi
if [ "`dbus get frpc_common_ddns`"x = ""x ] && [ "`dbus get frpc_ddns`"x = ""x ]; then
dbus set frpc_common_ddns="2"
elif [ "`dbus get frpc_common_ddns`"x = "1"x ] || [ "`dbus get frpc_ddns`"x = "1"x ]; then
dbus set frpc_domain=`nvram get ddns_hostname_x`
dbus set frpc_common_ddns="1"
dbus remove frpc_ddns
elif [ "`dbus get frpc_ddns`"x = "2"x ]; then
dbus set frpc_common_ddns="2"
dbus remove frpc_ddns
fi
if [ "`dbus get frpc_cron_hour_min`"x != ""x ] && [ "`dbus get frpc_cron_time`"x != ""x ]; then
dbus set frpc_common_cron_hour_min="`dbus get frpc_cron_hour_min`"
dbus set frpc_common_cron_time="`dbus get frpc_cron_time`"
dbus remove frpc_cron_hour_min
dbus remove frpc_cron_time
elif [ "`dbus get frpc_cron_hour_min`"x != ""x ] && [ "`dbus get frpc_cron_time`"x != ""x ]; then
dbus set frpc_common_cron_hour_min="hour"
dbus set frpc_common_cron_time="1"
fi
dbus set softcenter_module_frpc_install=1
dbus set softcenter_module_frpc_name=${MODULE}
dbus set softcenter_module_frpc_title="Frpc内网穿透"
dbus set softcenter_module_frpc_description="内网穿透利器,谁用谁知道。"
dbus set softcenter_module_frpc_version="${VERSION}"
dbus set ${MODULE}_version="${VERSION}"
rm -fr /tmp/frp* >/dev/null 2>&1
en=`dbus get frpc_enable`
if [ "${en}"x = "1"x ]; then
sh /jffs/softcenter/scripts/config-frpc.sh
fi

122
frpc/frpc/res/frpc-menu.js Normal file
View File

@ -0,0 +1,122 @@
function openssHint(itemNum){
statusmenu = "";
width="350px";
if(itemNum == 0){
statusmenu ="如果发现开关不能开启,那么请检查<a href='Advanced_System_Content.asp'><u><font color='#00F'>系统管理 -- 系统设置</font></u></a>页面内Enable JFFS custom scripts and configs是否开启。";
_caption = "服务器说明";
}
else if(itemNum == 1){
statusmenu ="此处填入你的frp服务器的地址。</br>建议优先填入<font color='#F46'>IP地址</font>。填入域名,特别是一些服务商给的复杂域名,有时遇到无法解析会导致无法连接!";
_caption = "服务器";
}
else if(itemNum == 2){
statusmenu ="此处填入你的frp服务器的端口对应服务器配置文件中的节[common]下的bind_port字段";
_caption = "服务器端口";
}
else if(itemNum == 3){
statusmenu ="此处填入你的frp服务器的特权授权码。对应服务器配置文件中的节[common]下的privilege_token字段。</br><font color='#F46'>注意:</font>使用带有特殊字符的密码可能会导致frpc链接不上服务器。";
_caption = "Privilege Token";
}
else if(itemNum == 4){
statusmenu ="此处填入你的frp服务器HTTP穿透服务的端口对应服务器配置文件中的节[common]下的vhost_http_port字段";
_caption = "HTTP穿透服务端口";
}
else if(itemNum == 5){
statusmenu ="此处填入你的frp服务器HTTPS穿透服务的端口对应服务器配置文件中的节[common]下的vhost_https_port字段";
_caption = "HTTPS穿透服务端口";
}
else if(itemNum == 6){
statusmenu ="此处是否开启frpc客户端日志。</br><font color='#F46'>注意:</font>默认不开启,开启后日志路径为/tmp/frpc.log";
_caption = "日志记录";
}
else if(itemNum == 7){
statusmenu ="此处选择日志记录等级。</br>可选内容info、warn、error、debug。";
_caption = "日志等级";
}
else if(itemNum == 8){
statusmenu ="此处选择要保留的日志天数。";
_caption = "日志记录天数";
}
else if(itemNum == 9){
statusmenu ="要穿透的协议类型目前有http和tcp两种方式。";
_caption = "协议类型";
}
else if(itemNum == 10){
statusmenu ="此处输入穿透内容的命名描述ac68u-web或ac68u-webshell对应客户端配置文件中的节名称。</br><font color='#F46'>注意:</font>frp服务器上的所有命名不能重复";
_caption = "代理名称";
}
else if(itemNum == 11){
statusmenu ="此处输入穿透内容的域名ac68u.frp.com对应客户端配置文件中节下的custom_domains字段。</br><font color='#F46'>注意:</font>frp上运行的域名不能重复";
_caption = "域名配置";
}
else if(itemNum == 12){
statusmenu ="此处输入要穿透的内部主机IP地址192.168.1.1";
_caption = "内网主机地址";
}
else if(itemNum == 13){
statusmenu ="此处输入要穿透的内部主机的端口80或22";
_caption = "内网主机端口";
}
else if(itemNum == 14){
statusmenu ="此处输入服务器端端口用来映射内部主机端口80或8080</br><font color='#F46'>注意:</font>";
statusmenu +="</br><b><font color='#669900'>http协议</font></b>选择http协议时远程主机端口对应服务器配置文件中的节[common]下的vhost_http_port字段值。";
statusmenu +="</br><b><font color='#669900'>https协议</font></b>选择https协议时远程主机端口对应服务器配置文件中的节[common]下的vhost_https_port字段值。https协议只能对应穿透内网https协议。";
statusmenu +="</br><b><font color='#669900'>tcp协议</font></b>选择tcp协议时远程主机端口应在服务器配置文件中的节[common]下的privilege_allow_ports字段值范围内。";
_caption = "远程主机端口";
}
else if(itemNum == 15){
statusmenu ="如果公司内网防火墙对外网访问进行了流量识别与屏蔽,例如禁止了 ssh 协议等,通过设置加密,将 frpc 与 frps 之间的通信内容加密传输,将会有效防止流量被拦截。";
_caption = "加密";
}
else if(itemNum == 16){
statusmenu ="如果传输的报文长度较长,通过设置对传输内容进行压缩,可以有效减小 frpc 与 frps 之间的网络流量,加快流量转发速度,但是会额外消耗一些 cpu 资源。";
_caption = "压缩";
}
else if(itemNum == 17){
statusmenu ="定时到Frp服务器上重新注册服务以便Frp提供持续的服务。</br><font color='#F46'>注意:</font>填写内容为0时关闭该功能";
_caption = "定时注册服务";
}
else if(itemNum == 18){
statusmenu ="如果穿透服务配置中内网主机地址是路由器管理地址并且内网主机端口为80时在网络地图DDNS处显示相应的域名配置。</br><font color='#F46'>注意:</font>此功能与路由系统自带的DDNS功能冲突frp的DDNS显示设置会覆盖系统自带的DDNS设置";
_caption = "DDNS显示设置";
}
else if(itemNum == 19){
statusmenu ="穿透服务的用户名称如AC68U 配置结果为 {用户名称}.{代理名称}";
_caption = "Frpc用户名称";
}
else if(itemNum == 20){
statusmenu ="从 v0.12.0 版本开始,底层通信协议支持选择 kcp 协议,在弱网环境下传输效率提升明显,但是会有一些额外的流量消耗";
_caption = "底层通信协议";
}
else if(itemNum == 21){
statusmenu ="从 v0.10.0 版本开始,客户端和服务器端之间的连接支持多路复用,不再需要为每一个用户请求创建一个连接,使连接建立的延迟降低,并且避免了大量文件描述符的占用,使 frp 可以承载更高的并发数。</br>该功能默认启用,如需关闭,可以在 frps.ini 和 frpc.ini 中配置,该配置项在服务端和客户端必须一致.";
_caption = "TCP 多路复用";
}
else if(itemNum == 22){
statusmenu ="当客户端连接服务器失败后的动作:</br>失败后重复连接</br>失败后退出客户端";
_caption = "连接设置";
}
else if(itemNum == 23){
statusmenu ="按照官方教程自己编写配置文件";
_caption = "自定义配置";
}
//return overlib(statusmenu, OFFSETX, -160, LEFT, DELAY, 200);
//return overlib(statusmenu, OFFSETX, -160, LEFT, STICKY, WIDTH, 'width', CAPTION, " ", FGCOLOR, "#4D595D", CAPCOLOR, "#000000", CLOSECOLOR, "#000000", MOUSEOFF, "1",TEXTCOLOR, "#FFF", CLOSETITLE, '');
return overlib(statusmenu, OFFSETX, -160, LEFT, STICKY, WIDTH, 'width', CAPTION, _caption, CLOSETITLE, '');
var tag_name= document.getElementsByTagName('a');
for (var i=0;i<tag_name.length;i++)
tag_name[i].onmouseout=nd;
if(helpcontent == [] || helpcontent == "" || hint_array_id > helpcontent.length)
return overlib('<#defaultHint#>', HAUTO, VAUTO);
else if(hint_array_id == 0 && hint_show_id > 21 && hint_show_id < 24)
return overlib(helpcontent[hint_array_id][hint_show_id], FIXX, 270, FIXY, 30);
else{
if(hint_show_id > helpcontent[hint_array_id].length)
return overlib('<#defaultHint#>', HAUTO, VAUTO);
else
return overlib(helpcontent[hint_array_id][hint_show_id], HAUTO, VAUTO);
}
}

135
frpc/frpc/res/frpc.css Normal file
View File

@ -0,0 +1,135 @@
.Bar_container {
width:85%;
height:20px;
border:1px inset #999;
margin:0 auto;
margin-top:20px \9;
background-color:#FFFFFF;
z-index:100;
}
#proceeding_img_text {
position:absolute;
z-index:101;
font-size:11px;
color:#000000;
line-height:21px;
width: 83%;
}
#proceeding_img {
height:21px;
background:#C0D1D3 url(/images/ss_proceding.gif);
}
#ClientList_Block_PC{
border:1px outset #999;
background-color:#576D73;
position:absolute;
*margin-top:26px;
margin-left:2px;
*margin-left:-353px;
width:346px;
text-align:left;
height:auto;
overflow-y:auto;
z-index:200;
padding: 1px;
display:none;
}
#ClientList_Block_PC div{
background-color:#576D73;
height:auto;
*height:20px;
line-height:20px;
text-decoration:none;
font-family: Lucida Console;
padding-left:2px;
}
#ClientList_Block_PC a{
background-color:#EFEFEF;
color:#FFF;
font-size:12px;
font-family:Arial, Helvetica, sans-serif;
text-decoration:none;
}
#ClientList_Block_PC div:hover, #ClientList_Block a:hover {
background-color:#3366FF;
color:#FFFFFF;
cursor:default;
}
.show-btn1, .show-btn2 {
border: 1px solid #222;
background: #576d73;
font-size:10pt;
color: #fff;
padding: 10px 3.75px;
border-radius: 5px 5px 0px 0px;
width:15%;
}
.active {
background: #2f3a3e;
}
.close {
background: red;
color: black;
border-radius: 12px;
line-height: 18px;
text-align: center;
height: 18px;
width: 18px;
font-size: 16px;
padding: 1px;
top: -10px;
right: -10px;
position: absolute;
}
/* use cross as close button */
.close::before {
content: "\2716";
}
.contentM_qis {
position: fixed;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius:10px;
z-index: 10;
background-color:#2B373B;
margin-left: -100px;
top: 10px;
width:720px;
return height:auto;
box-shadow: 3px 3px 10px #000;
background: rgba(0,0,0,0.85);
display:none;
}
.user_title{
text-align:center;
font-size:18px;
color:#99FF00;
padding:10px;
font-weight:bold;
}
.frpc_btn {
border: 1px solid #222;
background: linear-gradient(to bottom, #003333 0%, #000000 100%); /* W3C */
font-size:10pt;
color: #fff;
padding: 5px 5px;
border-radius: 5px 5px 5px 5px;
width:16%;
}
.frpc_btn:hover {
border: 1px solid #222;
background: linear-gradient(to bottom, #27c9c9 0%, #279fd9 100%); /* W3C */
font-size:10pt;
color: #fff;
padding: 5px 5px;
border-radius: 5px 5px 5px 5px;
width:16%;
}
.formbottomdesc {
margin-top:10px;
margin-left:10px;
}
input[type=button]:focus {
outline: none;
}

View File

@ -0,0 +1 @@
<% nvram_dump(".frpc.log",""); %>

View File

@ -0,0 +1 @@
<% nvram_dump(".frpc.ini",""); %>

View File

@ -0,0 +1 @@
<% nvram_dump(".frpc_stcp.ini",""); %>

BIN
frpc/frpc/res/icon-frpc.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

View File

@ -0,0 +1,652 @@
/*! layer-v3.1.0 Web弹层组件 MIT License http://layer.layui.com/ By 贤心 */ ;
! function(e, t) {
"use strict";
var i, n, a = e.layui && layui.define,
o = {
getPath: function() {
var e = document.scripts,
t = e[e.length - 1],
i = t.src;
if (!t.getAttribute("merge")) return i.substring(0, i.lastIndexOf("/") + 1)
}(),
config: {},
end: {},
minIndex: 0,
minLeft: [],
btn: ["&#x786E;&#x5B9A;", "&#x53D6;&#x6D88;"],
type: ["dialog", "page", "iframe", "loading", "tips"],
getStyle: function(t, i) {
var n = t.currentStyle ? t.currentStyle : e.getComputedStyle(t, null);
return n[n.getPropertyValue ? "getPropertyValue" : "getAttribute"](i)
},
link: function(t, i, n) {
if (r.path) {
var a = document.getElementsByTagName("head")[0],
s = document.createElement("link");
"string" == typeof i && (n = i);
var l = (n || t).replace(/\.|\//g, ""),
f = "layuicss-" + l,
c = 0;
s.rel = "stylesheet", s.href = r.path + t, s.id = f, document.getElementById(f) || a.appendChild(s), "function" == typeof i && ! function u() {
return ++c > 80 ? e.console && console.error("layer.css: Invalid") : void(1989 === parseInt(o.getStyle(document.getElementById(f), "width")) ? i() : setTimeout(u, 100))
}()
}
}
},
r = {
v: "3.1.0",
ie: function() {
var t = navigator.userAgent.toLowerCase();
return !!(e.ActiveXObject || "ActiveXObject" in e) && ((t.match(/msie\s(\d+)/) || [])[1] || "11")
}(),
index: e.layer && e.layer.v ? 1e5 : 0,
path: o.getPath,
config: function(e, t) {
return e = e || {}, r.cache = o.config = i.extend({}, o.config, e), r.path = o.config.path || r.path, "string" == typeof e.extend && (e.extend = [e.extend]), o.config.path && r.ready(), e.extend ? (a ? layui.addcss("modules/layer/" + e.extend) : o.link("theme/" + e.extend), this) : this
},
ready: function(e) {
var t = "layer",
i = "",
n = (a ? "modules/layer/" : "theme/") + "default/layer.css?v=" + r.v + i;
return a ? layui.addcss(n, e, t) : o.link(n, e, t), this
},
alert: function(e, t, n) {
var a = "function" == typeof t;
return a && (n = t), r.open(i.extend({
content: e,
yes: n
}, a ? {} : t))
},
confirm: function(e, t, n, a) {
var s = "function" == typeof t;
return s && (a = n, n = t), r.open(i.extend({
content: e,
btn: o.btn,
yes: n,
btn2: a
}, s ? {} : t))
},
msg: function(e, n, a) {
var s = "function" == typeof n,
f = o.config.skin,
c = (f ? f + " " + f + "-msg" : "") || "layui-layer-msg",
u = l.anim.length - 1;
return s && (a = n), r.open(i.extend({
content: e,
time: 3e3,
shade: !1,
skin: c,
title: !1,
closeBtn: !1,
btn: !1,
resize: !1,
end: a
}, s && !o.config.skin ? {
skin: c + " layui-layer-hui",
anim: u
} : function() {
return n = n || {}, (n.icon === -1 || n.icon === t && !o.config.skin) && (n.skin = c + " " + (n.skin || "layui-layer-hui")), n
}()))
},
load: function(e, t) {
return r.open(i.extend({
type: 3,
icon: e || 0,
resize: !1,
shade: .01
}, t))
},
tips: function(e, t, n) {
return r.open(i.extend({
type: 4,
content: [e, t],
closeBtn: !1,
time: 3e3,
shade: !1,
resize: !1,
fixed: !1,
maxWidth: 210
}, n))
}
},
s = function(e) {
var t = this;
t.index = ++r.index, t.config = i.extend({}, t.config, o.config, e), document.body ? t.creat() : setTimeout(function() {
t.creat()
}, 30)
};
s.pt = s.prototype;
var l = ["layui-layer", ".layui-layer-title", ".layui-layer-main", ".layui-layer-dialog", "layui-layer-iframe", "layui-layer-content", "layui-layer-btn", "layui-layer-close"];
l.anim = ["layer-anim-00", "layer-anim-01", "layer-anim-02", "layer-anim-03", "layer-anim-04", "layer-anim-05", "layer-anim-06"], s.pt.config = {
type: 0,
shade: .3,
fixed: !0,
move: l[1],
title: "&#x4FE1;&#x606F;",
offset: "auto",
area: "auto",
closeBtn: 1,
time: 0,
zIndex: 19891014,
maxWidth: 360,
anim: 0,
isOutAnim: !0,
icon: -1,
moveType: 1,
resize: !0,
scrollbar: !0,
tips: 2
}, s.pt.vessel = function(e, t) {
var n = this,
a = n.index,
r = n.config,
s = r.zIndex + a,
f = "object" == typeof r.title,
c = r.maxmin && (1 === r.type || 2 === r.type),
u = r.title ? '<div class="layui-layer-title" style="' + (f ? r.title[1] : "") + '">' + (f ? r.title[0] : r.title) + "</div>" : "";
return r.zIndex = s, t([r.shade ? '<div class="layui-layer-shade" id="layui-layer-shade' + a + '" times="' + a + '" style="' + ("z-index:" + (s - 1) + "; ") + '"></div>' : "", '<div class="' + l[0] + (" layui-layer-" + o.type[r.type]) + (0 != r.type && 2 != r.type || r.shade ? "" : " layui-layer-border") + " " + (r.skin || "") + '" id="' + l[0] + a + '" type="' + o.type[r.type] + '" times="' + a + '" showtime="' + r.time + '" conType="' + (e ? "object" : "string") + '" style="z-index: ' + s + "; width:" + r.area[0] + ";height:" + r.area[1] + (r.fixed ? "" : ";position:absolute;") + '">' + (e && 2 != r.type ? "" : u) + '<div id="' + (r.id || "") + '" class="layui-layer-content' + (0 == r.type && r.icon !== -1 ? " layui-layer-padding" : "") + (3 == r.type ? " layui-layer-loading" + r.icon : "") + '">' + (0 == r.type && r.icon !== -1 ? '<i class="layui-layer-ico layui-layer-ico' + r.icon + '"></i>' : "") + (1 == r.type && e ? "" : r.content || "") + '</div><span class="layui-layer-setwin">' + function() {
var e = c ? '<a class="layui-layer-min" href="javascript:;"><cite></cite></a><a class="layui-layer-ico layui-layer-max" href="javascript:;"></a>' : "";
return r.closeBtn && (e += '<a class="layui-layer-ico ' + l[7] + " " + l[7] + (r.title ? r.closeBtn : 4 == r.type ? "1" : "2") + '" href="javascript:;"></a>'), e
}() + "</span>" + (r.btn ? function() {
var e = "";
"string" == typeof r.btn && (r.btn = [r.btn]);
for (var t = 0, i = r.btn.length; t < i; t++) e += '<a class="' + l[6] + t + '">' + r.btn[t] + "</a>";
return '<div class="' + l[6] + " layui-layer-btn-" + (r.btnAlign || "") + '">' + e + "</div>"
}() : "") + (r.resize ? '<span class="layui-layer-resize"></span>' : "") + "</div>"], u, i('<div class="layui-layer-move"></div>')), n
}, s.pt.creat = function() {
var e = this,
t = e.config,
a = e.index,
s = t.content,
f = "object" == typeof s,
c = i("body");
if (!t.id || !i("#" + t.id)[0]) {
switch ("string" == typeof t.area && (t.area = "auto" === t.area ? ["", ""] : [t.area, ""]), t.shift && (t.anim = t.shift), 6 == r.ie && (t.fixed = !1), t.type) {
case 0:
t.btn = "btn" in t ? t.btn : o.btn[0], r.closeAll("dialog");
break;
case 2:
var s = t.content = f ? t.content : [t.content || "http://layer.layui.com", "auto"];
t.content = '<iframe scrolling="' + (t.content[1] || "auto") + '" allowtransparency="true" id="' + l[4] + a + '" name="' + l[4] + a + '" onload="this.className=\'\';" class="layui-layer-load" frameborder="0" src="' + t.content[0] + '"></iframe>';
break;
case 3:
delete t.title, delete t.closeBtn, t.icon === -1 && 0 === t.icon, r.closeAll("loading");
break;
case 4:
f || (t.content = [t.content, "body"]), t.follow = t.content[1], t.content = t.content[0] + '<i class="layui-layer-TipsG"></i>', delete t.title, t.tips = "object" == typeof t.tips ? t.tips : [t.tips, !0], t.tipsMore || r.closeAll("tips")
}
if (e.vessel(f, function(n, r, u) {
c.append(n[0]), f ? function() {
2 == t.type || 4 == t.type ? function() {
i("body").append(n[1])
}() : function() {
s.parents("." + l[0])[0] || (s.data("display", s.css("display")).show().addClass("layui-layer-wrap").wrap(n[1]), i("#" + l[0] + a).find("." + l[5]).before(r))
}()
}() : c.append(n[1]), i(".layui-layer-move")[0] || c.append(o.moveElem = u), e.layero = i("#" + l[0] + a), t.scrollbar || l.html.css("overflow", "hidden").attr("layer-full", a)
}).auto(a), i("#layui-layer-shade" + e.index).css({
"background-color": t.shade[1] || "#000",
opacity: t.shade[0] || t.shade
}), 2 == t.type && 6 == r.ie && e.layero.find("iframe").attr("src", s[0]), 4 == t.type ? e.tips() : e.offset(), t.fixed && n.on("resize", function() {
e.offset(), (/^\d+%$/.test(t.area[0]) || /^\d+%$/.test(t.area[1])) && e.auto(a), 4 == t.type && e.tips()
}), t.time <= 0 || setTimeout(function() {
r.close(e.index)
}, t.time), e.move().callback(), l.anim[t.anim]) {
var u = "layer-anim " + l.anim[t.anim];
e.layero.addClass(u).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend", function() {
i(this).removeClass(u)
})
}
t.isOutAnim && e.layero.data("isOutAnim", !0)
}
}, s.pt.auto = function(e) {
var t = this,
a = t.config,
o = i("#" + l[0] + e);
"" === a.area[0] && a.maxWidth > 0 && (r.ie && r.ie < 8 && a.btn && o.width(o.innerWidth()), o.outerWidth() > a.maxWidth && o.width(a.maxWidth));
var s = [o.innerWidth(), o.innerHeight()],
f = o.find(l[1]).outerHeight() || 0,
c = o.find("." + l[6]).outerHeight() || 0,
u = function(e) {
e = o.find(e), e.height(s[1] - f - c - 2 * (0 | parseFloat(e.css("padding-top"))))
};
switch (a.type) {
case 2:
u("iframe");
break;
default:
"" === a.area[1] ? a.maxHeight > 0 && o.outerHeight() > a.maxHeight ? (s[1] = a.maxHeight, u("." + l[5])) : a.fixed && s[1] >= n.height() && (s[1] = n.height(), u("." + l[5])) : u("." + l[5])
}
return t
}, s.pt.offset = function() {
var e = this,
t = e.config,
i = e.layero,
a = [i.outerWidth(), i.outerHeight()],
o = "object" == typeof t.offset;
e.offsetTop = (n.height() - a[1]) / 2, e.offsetLeft = (n.width() - a[0]) / 2, o ? (e.offsetTop = t.offset[0], e.offsetLeft = t.offset[1] || e.offsetLeft) : "auto" !== t.offset && ("t" === t.offset ? e.offsetTop = 0 : "r" === t.offset ? e.offsetLeft = n.width() - a[0] : "b" === t.offset ? e.offsetTop = n.height() - a[1] : "l" === t.offset ? e.offsetLeft = 0 : "lt" === t.offset ? (e.offsetTop = 0, e.offsetLeft = 0) : "lb" === t.offset ? (e.offsetTop = n.height() - a[1], e.offsetLeft = 0) : "rt" === t.offset ? (e.offsetTop = 0, e.offsetLeft = n.width() - a[0]) : "rb" === t.offset ? (e.offsetTop = n.height() - a[1], e.offsetLeft = n.width() - a[0]) : e.offsetTop = t.offset), t.fixed || (e.offsetTop = /%$/.test(e.offsetTop) ? n.height() * parseFloat(e.offsetTop) / 100 : parseFloat(e.offsetTop), e.offsetLeft = /%$/.test(e.offsetLeft) ? n.width() * parseFloat(e.offsetLeft) / 100 : parseFloat(e.offsetLeft), e.offsetTop += n.scrollTop(), e.offsetLeft += n.scrollLeft()), i.attr("minLeft") && (e.offsetTop = n.height() - (i.find(l[1]).outerHeight() || 0), e.offsetLeft = i.css("left")), i.css({
top: e.offsetTop,
left: e.offsetLeft
})
}, s.pt.tips = function() {
var e = this,
t = e.config,
a = e.layero,
o = [a.outerWidth(), a.outerHeight()],
r = i(t.follow);
r[0] || (r = i("body"));
var s = {
width: r.outerWidth(),
height: r.outerHeight(),
top: r.offset().top,
left: r.offset().left
},
f = a.find(".layui-layer-TipsG"),
c = t.tips[0];
t.tips[1] || f.remove(), s.autoLeft = function() {
s.left + o[0] - n.width() > 0 ? (s.tipLeft = s.left + s.width - o[0], f.css({
right: 12,
left: "auto"
})) : s.tipLeft = s.left
}, s.where = [
function() {
s.autoLeft(), s.tipTop = s.top - o[1] - 10, f.removeClass("layui-layer-TipsB").addClass("layui-layer-TipsT").css("border-right-color", t.tips[1])
},
function() {
s.tipLeft = s.left + s.width + 10, s.tipTop = s.top, f.removeClass("layui-layer-TipsL").addClass("layui-layer-TipsR").css("border-bottom-color", t.tips[1])
},
function() {
s.autoLeft(), s.tipTop = s.top + s.height + 10, f.removeClass("layui-layer-TipsT").addClass("layui-layer-TipsB").css("border-right-color", t.tips[1])
},
function() {
s.tipLeft = s.left - o[0] - 10, s.tipTop = s.top, f.removeClass("layui-layer-TipsR").addClass("layui-layer-TipsL").css("border-bottom-color", t.tips[1])
}
], s.where[c - 1](), 1 === c ? s.top - (n.scrollTop() + o[1] + 16) < 0 && s.where[2]() : 2 === c ? n.width() - (s.left + s.width + o[0] + 16) > 0 || s.where[3]() : 3 === c ? s.top - n.scrollTop() + s.height + o[1] + 16 - n.height() > 0 && s.where[0]() : 4 === c && o[0] + 16 - s.left > 0 && s.where[1](), a.find("." + l[5]).css({
"background-color": t.tips[1],
"padding-right": t.closeBtn ? "30px" : ""
}), a.css({
left: s.tipLeft - (t.fixed ? n.scrollLeft() : 0),
top: s.tipTop - (t.fixed ? n.scrollTop() : 0)
})
}, s.pt.move = function() {
var e = this,
t = e.config,
a = i(document),
s = e.layero,
l = s.find(t.move),
f = s.find(".layui-layer-resize"),
c = {};
return t.move && l.css("cursor", "move"), l.on("mousedown", function(e) {
e.preventDefault(), t.move && (c.moveStart = !0, c.offset = [e.clientX - parseFloat(s.css("left")), e.clientY - parseFloat(s.css("top"))], o.moveElem.css("cursor", "move").show())
}), f.on("mousedown", function(e) {
e.preventDefault(), c.resizeStart = !0, c.offset = [e.clientX, e.clientY], c.area = [s.outerWidth(), s.outerHeight()], o.moveElem.css("cursor", "se-resize").show()
}), a.on("mousemove", function(i) {
if (c.moveStart) {
var a = i.clientX - c.offset[0],
o = i.clientY - c.offset[1],
l = "fixed" === s.css("position");
if (i.preventDefault(), c.stX = l ? 0 : n.scrollLeft(), c.stY = l ? 0 : n.scrollTop(), !t.moveOut) {
var f = n.width() - s.outerWidth() + c.stX,
u = n.height() - s.outerHeight() + c.stY;
a < c.stX && (a = c.stX), a > f && (a = f), o < c.stY && (o = c.stY), o > u && (o = u)
}
s.css({
left: a,
top: o
})
}
if (t.resize && c.resizeStart) {
var a = i.clientX - c.offset[0],
o = i.clientY - c.offset[1];
i.preventDefault(), r.style(e.index, {
width: c.area[0] + a,
height: c.area[1] + o
}), c.isResize = !0, t.resizing && t.resizing(s)
}
}).on("mouseup", function(e) {
c.moveStart && (delete c.moveStart, o.moveElem.hide(), t.moveEnd && t.moveEnd(s)), c.resizeStart && (delete c.resizeStart, o.moveElem.hide())
}), e
}, s.pt.callback = function() {
function e() {
var e = a.cancel && a.cancel(t.index, n);
e === !1 || r.close(t.index)
}
var t = this,
n = t.layero,
a = t.config;
t.openLayer(), a.success && (2 == a.type ? n.find("iframe").on("load", function() {
a.success(n, t.index)
}) : a.success(n, t.index)), 6 == r.ie && t.IE6(n), n.find("." + l[6]).children("a").on("click", function() {
var e = i(this).index();
if (0 === e) a.yes ? a.yes(t.index, n) : a.btn1 ? a.btn1(t.index, n) : r.close(t.index);
else {
var o = a["btn" + (e + 1)] && a["btn" + (e + 1)](t.index, n);
o === !1 || r.close(t.index)
}
}), n.find("." + l[7]).on("click", e), a.shadeClose && i("#layui-layer-shade" + t.index).on("click", function() {
r.close(t.index)
}), n.find(".layui-layer-min").on("click", function() {
var e = a.min && a.min(n);
e === !1 || r.min(t.index, a)
}), n.find(".layui-layer-max").on("click", function() {
i(this).hasClass("layui-layer-maxmin") ? (r.restore(t.index), a.restore && a.restore(n)) : (r.full(t.index, a), setTimeout(function() {
a.full && a.full(n)
}, 100))
}), a.end && (o.end[t.index] = a.end)
}, o.reselect = function() {
i.each(i("select"), function(e, t) {
var n = i(this);
n.parents("." + l[0])[0] || 1 == n.attr("layer") && i("." + l[0]).length < 1 && n.removeAttr("layer").show(), n = null
})
}, s.pt.IE6 = function(e) {
i("select").each(function(e, t) {
var n = i(this);
n.parents("." + l[0])[0] || "none" === n.css("display") || n.attr({
layer: "1"
}).hide(), n = null
})
}, s.pt.openLayer = function() {
var e = this;
r.zIndex = e.config.zIndex, r.setTop = function(e) {
var t = function() {
r.zIndex++, e.css("z-index", r.zIndex + 1)
};
return r.zIndex = parseInt(e[0].style.zIndex), e.on("mousedown", t), r.zIndex
}
}, o.record = function(e) {
var t = [e.width(), e.height(), e.position().top, e.position().left + parseFloat(e.css("margin-left"))];
e.find(".layui-layer-max").addClass("layui-layer-maxmin"), e.attr({
area: t
})
}, o.rescollbar = function(e) {
l.html.attr("layer-full") == e && (l.html[0].style.removeProperty ? l.html[0].style.removeProperty("overflow") : l.html[0].style.removeAttribute("overflow"), l.html.removeAttr("layer-full"))
}, e.layer = r, r.getChildFrame = function(e, t) {
return t = t || i("." + l[4]).attr("times"), i("#" + l[0] + t).find("iframe").contents().find(e)
}, r.getFrameIndex = function(e) {
return i("#" + e).parents("." + l[4]).attr("times")
}, r.iframeAuto = function(e) {
if (e) {
var t = r.getChildFrame("html", e).outerHeight(),
n = i("#" + l[0] + e),
a = n.find(l[1]).outerHeight() || 0,
o = n.find("." + l[6]).outerHeight() || 0;
n.css({
height: t + a + o
}), n.find("iframe").css({
height: t
})
}
}, r.iframeSrc = function(e, t) {
i("#" + l[0] + e).find("iframe").attr("src", t)
}, r.style = function(e, t, n) {
var a = i("#" + l[0] + e),
r = a.find(".layui-layer-content"),
s = a.attr("type"),
f = a.find(l[1]).outerHeight() || 0,
c = a.find("." + l[6]).outerHeight() || 0;
a.attr("minLeft");
s !== o.type[3] && s !== o.type[4] && (n || (parseFloat(t.width) <= 260 && (t.width = 260), parseFloat(t.height) - f - c <= 64 && (t.height = 64 + f + c)), a.css(t), c = a.find("." + l[6]).outerHeight(), s === o.type[2] ? a.find("iframe").css({
height: parseFloat(t.height) - f - c
}) : r.css({
height: parseFloat(t.height) - f - c - parseFloat(r.css("padding-top")) - parseFloat(r.css("padding-bottom"))
}))
}, r.min = function(e, t) {
var a = i("#" + l[0] + e),
s = a.find(l[1]).outerHeight() || 0,
f = a.attr("minLeft") || 181 * o.minIndex + "px",
c = a.css("position");
o.record(a), o.minLeft[0] && (f = o.minLeft[0], o.minLeft.shift()), a.attr("position", c), r.style(e, {
width: 180,
height: s,
left: f,
top: n.height() - s,
position: "fixed",
overflow: "hidden"
}, !0), a.find(".layui-layer-min").hide(), "page" === a.attr("type") && a.find(l[4]).hide(), o.rescollbar(e), a.attr("minLeft") || o.minIndex++, a.attr("minLeft", f)
}, r.restore = function(e) {
var t = i("#" + l[0] + e),
n = t.attr("area").split(",");
t.attr("type");
r.style(e, {
width: parseFloat(n[0]),
height: parseFloat(n[1]),
top: parseFloat(n[2]),
left: parseFloat(n[3]),
position: t.attr("position"),
overflow: "visible"
}, !0), t.find(".layui-layer-max").removeClass("layui-layer-maxmin"), t.find(".layui-layer-min").show(), "page" === t.attr("type") && t.find(l[4]).show(), o.rescollbar(e)
}, r.full = function(e) {
var t, a = i("#" + l[0] + e);
o.record(a), l.html.attr("layer-full") || l.html.css("overflow", "hidden").attr("layer-full", e), clearTimeout(t), t = setTimeout(function() {
var t = "fixed" === a.css("position");
r.style(e, {
top: t ? 0 : n.scrollTop(),
left: t ? 0 : n.scrollLeft(),
width: n.width(),
height: n.height()
}, !0), a.find(".layui-layer-min").hide()
}, 100)
}, r.title = function(e, t) {
var n = i("#" + l[0] + (t || r.index)).find(l[1]);
n.html(e)
}, r.close = function(e) {
var t = i("#" + l[0] + e),
n = t.attr("type"),
a = "layer-anim-close";
if (t[0]) {
var s = "layui-layer-wrap",
f = function() {
if (n === o.type[1] && "object" === t.attr("conType")) {
t.children(":not(." + l[5] + ")").remove();
for (var a = t.find("." + s), r = 0; r < 2; r++) a.unwrap();
a.css("display", a.data("display")).removeClass(s)
} else {
if (n === o.type[2]) try {
var f = i("#" + l[4] + e)[0];
f.contentWindow.document.write(""), f.contentWindow.close(), t.find("." + l[5])[0].removeChild(f)
} catch (c) {}
t[0].innerHTML = "", t.remove()
}
"function" == typeof o.end[e] && o.end[e](), delete o.end[e]
};
t.data("isOutAnim") && t.addClass("layer-anim " + a), i("#layui-layer-moves, #layui-layer-shade" + e).remove(), 6 == r.ie && o.reselect(), o.rescollbar(e), t.attr("minLeft") && (o.minIndex--, o.minLeft.push(t.attr("minLeft"))), r.ie && r.ie < 10 || !t.data("isOutAnim") ? f() : setTimeout(function() {
f()
}, 200)
}
}, r.closeAll = function(e) {
i.each(i("." + l[0]), function() {
var t = i(this),
n = e ? t.attr("type") === e : 1;
n && r.close(t.attr("times")), n = null
})
};
var f = r.cache || {},
c = function(e) {
return f.skin ? " " + f.skin + " " + f.skin + "-" + e : ""
};
r.prompt = function(e, t) {
var a = "";
if (e = e || {}, "function" == typeof e && (t = e), e.area) {
var o = e.area;
a = 'style="width: ' + o[0] + "; height: " + o[1] + ';"', delete e.area
}
var s, l = 2 == e.formType ? '<textarea class="layui-layer-input"' + a + ">" + (e.value || "") + "</textarea>" : function() {
return '<input type="' + (1 == e.formType ? "password" : "text") + '" class="layui-layer-input" value="' + (e.value || "") + '">'
}(),
f = e.success;
return delete e.success, r.open(i.extend({
type: 1,
btn: ["&#x786E;&#x5B9A;", "&#x53D6;&#x6D88;"],
content: l,
skin: "layui-layer-prompt" + c("prompt"),
maxWidth: n.width(),
success: function(e) {
s = e.find(".layui-layer-input"), s.focus(), "function" == typeof f && f(e)
},
resize: !1,
yes: function(i) {
var n = s.val();
"" === n ? s.focus() : n.length > (e.maxlength || 500) ? r.tips("&#x6700;&#x591A;&#x8F93;&#x5165;" + (e.maxlength || 500) + "&#x4E2A;&#x5B57;&#x6570;", s, {
tips: 1
}) : t && t(n, i, s)
}
}, e))
}, r.tab = function(e) {
e = e || {};
var t = e.tab || {},
n = "layui-this",
a = e.success;
return delete e.success, r.open(i.extend({
type: 1,
skin: "layui-layer-tab" + c("tab"),
resize: !1,
title: function() {
var e = t.length,
i = 1,
a = "";
if (e > 0)
for (a = '<span class="' + n + '">' + t[0].title + "</span>"; i < e; i++) a += "<span>" + t[i].title + "</span>";
return a
}(),
content: '<ul class="layui-layer-tabmain">' + function() {
var e = t.length,
i = 1,
a = "";
if (e > 0)
for (a = '<li class="layui-layer-tabli ' + n + '">' + (t[0].content || "no content") + "</li>"; i < e; i++) a += '<li class="layui-layer-tabli">' + (t[i].content || "no content") + "</li>";
return a
}() + "</ul>",
success: function(t) {
var o = t.find(".layui-layer-title").children(),
r = t.find(".layui-layer-tabmain").children();
o.on("mousedown", function(t) {
t.stopPropagation ? t.stopPropagation() : t.cancelBubble = !0;
var a = i(this),
o = a.index();
a.addClass(n).siblings().removeClass(n), r.eq(o).show().siblings().hide(), "function" == typeof e.change && e.change(o)
}), "function" == typeof a && a(t)
}
}, e))
}, r.photos = function(t, n, a) {
function o(e, t, i) {
var n = new Image;
return n.src = e, n.complete ? t(n) : (n.onload = function() {
n.onload = null, t(n)
}, void(n.onerror = function(e) {
n.onerror = null, i(e)
}))
}
var s = {};
if (t = t || {}, t.photos) {
var l = t.photos.constructor === Object,
f = l ? t.photos : {},
u = f.data || [],
d = f.start || 0;
s.imgIndex = (0 | d) + 1, t.img = t.img || "img";
var y = t.success;
if (delete t.success, l) {
if (0 === u.length) return r.msg("&#x6CA1;&#x6709;&#x56FE;&#x7247;")
} else {
var p = i(t.photos),
h = function() {
u = [], p.find(t.img).each(function(e) {
var t = i(this);
t.attr("layer-index", e), u.push({
alt: t.attr("alt"),
pid: t.attr("layer-pid"),
src: t.attr("layer-src") || t.attr("src"),
thumb: t.attr("src")
})
})
};
if (h(), 0 === u.length) return;
if (n || p.on("click", t.img, function() {
var e = i(this),
n = e.attr("layer-index");
r.photos(i.extend(t, {
photos: {
start: n,
data: u,
tab: t.tab
},
full: t.full
}), !0), h()
}), !n) return
}
s.imgprev = function(e) {
s.imgIndex--, s.imgIndex < 1 && (s.imgIndex = u.length), s.tabimg(e)
}, s.imgnext = function(e, t) {
s.imgIndex++, s.imgIndex > u.length && (s.imgIndex = 1, t) || s.tabimg(e)
}, s.keyup = function(e) {
if (!s.end) {
var t = e.keyCode;
e.preventDefault(), 37 === t ? s.imgprev(!0) : 39 === t ? s.imgnext(!0) : 27 === t && r.close(s.index)
}
}, s.tabimg = function(e) {
if (!(u.length <= 1)) return f.start = s.imgIndex - 1, r.close(s.index), r.photos(t, !0, e)
}, s.event = function() {
s.bigimg.hover(function() {
s.imgsee.show()
}, function() {
s.imgsee.hide()
}), s.bigimg.find(".layui-layer-imgprev").on("click", function(e) {
e.preventDefault(), s.imgprev()
}), s.bigimg.find(".layui-layer-imgnext").on("click", function(e) {
e.preventDefault(), s.imgnext()
}), i(document).on("keyup", s.keyup)
}, s.loadi = r.load(1, {
shade: !("shade" in t) && .9,
scrollbar: !1
}), o(u[d].src, function(n) {
r.close(s.loadi), s.index = r.open(i.extend({
type: 1,
id: "layui-layer-photos",
area: function() {
var a = [n.width, n.height],
o = [i(e).width() - 100, i(e).height() - 100];
if (!t.full && (a[0] > o[0] || a[1] > o[1])) {
var r = [a[0] / o[0], a[1] / o[1]];
r[0] > r[1] ? (a[0] = a[0] / r[0], a[1] = a[1] / r[0]) : r[0] < r[1] && (a[0] = a[0] / r[1], a[1] = a[1] / r[1])
}
return [a[0] + "px", a[1] + "px"]
}(),
title: !1,
shade: .9,
shadeClose: !0,
closeBtn: !1,
move: ".layui-layer-phimg img",
moveType: 1,
scrollbar: !1,
moveOut: !0,
isOutAnim: !1,
skin: "layui-layer-photos" + c("photos"),
content: '<div class="layui-layer-phimg"><img src="' + u[d].src + '" alt="' + (u[d].alt || "") + '" layer-pid="' + u[d].pid + '"><div class="layui-layer-imgsee">' + (u.length > 1 ? '<span class="layui-layer-imguide"><a href="javascript:;" class="layui-layer-iconext layui-layer-imgprev"></a><a href="javascript:;" class="layui-layer-iconext layui-layer-imgnext"></a></span>' : "") + '<div class="layui-layer-imgbar" style="display:' + (a ? "block" : "") + '"><span class="layui-layer-imgtit"><a href="javascript:;">' + (u[d].alt || "") + "</a><em>" + s.imgIndex + "/" + u.length + "</em></span></div></div></div>",
success: function(e, i) {
s.bigimg = e.find(".layui-layer-phimg"), s.imgsee = e.find(".layui-layer-imguide,.layui-layer-imgbar"), s.event(e), t.tab && t.tab(u[d], e), "function" == typeof y && y(e)
},
end: function() {
s.end = !0, i(document).off("keyup", s.keyup)
}
}, t))
}, function() {
r.close(s.loadi), r.msg("&#x5F53;&#x524D;&#x56FE;&#x7247;&#x5730;&#x5740;&#x5F02;&#x5E38;<br>&#x662F;&#x5426;&#x7EE7;&#x7EED;&#x67E5;&#x770B;&#x4E0B;&#x4E00;&#x5F20;&#xFF1F;", {
time: 3e4,
btn: ["&#x4E0B;&#x4E00;&#x5F20;", "&#x4E0D;&#x770B;&#x4E86;"],
yes: function() {
u.length > 1 && s.imgnext(!0, !0)
}
})
})
}
}, o.run = function(t) {
i = t, n = i(e), l.html = i("html"), r.open = function(e) {
var t = new s(e);
return t.index
}
}, e.layui && layui.define ? (r.ready(), layui.define("jquery", function(t) {
r.path = layui.cache.dir, o.run(layui.$j), e.layer = r, t("layer", r)
})) : "function" == typeof define && define.amd ? define(["jquery"], function() {
return o.run(e.jQuery), r
}) : function() {
o.run(e.jQuery), r.ready()
}()
}(window);

View File

@ -0,0 +1,2 @@
/*! layer mobile-v2.0.0 Web弹层组件 MIT License http://layer.layui.com/mobile By 贤心 */
;!function(e){"use strict";var t=document,n="querySelectorAll",i="getElementsByClassName",a=function(e){return t[n](e)},s={type:0,shade:!0,shadeClose:!0,fixed:!0,anim:"scale"},l={extend:function(e){var t=JSON.parse(JSON.stringify(s));for(var n in e)t[n]=e[n];return t},timer:{},end:{}};l.touch=function(e,t){e.addEventListener("click",function(e){t.call(this,e)},!1)};var r=0,o=["layui-m-layer"],c=function(e){var t=this;t.config=l.extend(e),t.view()};c.prototype.view=function(){var e=this,n=e.config,s=t.createElement("div");e.id=s.id=o[0]+r,s.setAttribute("class",o[0]+" "+o[0]+(n.type||0)),s.setAttribute("index",r);var l=function(){var e="object"==typeof n.title;return n.title?'<h3 style="'+(e?n.title[1]:"")+'">'+(e?n.title[0]:n.title)+"</h3>":""}(),c=function(){"string"==typeof n.btn&&(n.btn=[n.btn]);var e,t=(n.btn||[]).length;return 0!==t&&n.btn?(e='<span yes type="1">'+n.btn[0]+"</span>",2===t&&(e='<span no type="0">'+n.btn[1]+"</span>"+e),'<div class="layui-m-layerbtn">'+e+"</div>"):""}();if(n.fixed||(n.top=n.hasOwnProperty("top")?n.top:100,n.style=n.style||"",n.style+=" top:"+(t.body.scrollTop+n.top)+"px"),2===n.type&&(n.content='<i></i><i class="layui-m-layerload"></i><i></i><p>'+(n.content||"")+"</p>"),n.skin&&(n.anim="up"),"msg"===n.skin&&(n.shade=!1),s.innerHTML=(n.shade?"<div "+("string"==typeof n.shade?'style="'+n.shade+'"':"")+' class="layui-m-layershade"></div>':"")+'<div class="layui-m-layermain" '+(n.fixed?"":'style="position:static;"')+'><div class="layui-m-layersection"><div class="layui-m-layerchild '+(n.skin?"layui-m-layer-"+n.skin+" ":"")+(n.className?n.className:"")+" "+(n.anim?"layui-m-anim-"+n.anim:"")+'" '+(n.style?'style="'+n.style+'"':"")+">"+l+'<div class="layui-m-layercont">'+n.content+"</div>"+c+"</div></div></div>",!n.type||2===n.type){var d=t[i](o[0]+n.type),y=d.length;y>=1&&layer.close(d[0].getAttribute("index"))}document.body.appendChild(s);var u=e.elem=a("#"+e.id)[0];n.success&&n.success(u),e.index=r++,e.action(n,u)},c.prototype.action=function(e,t){var n=this;e.time&&(l.timer[n.index]=setTimeout(function(){layer.close(n.index)},1e3*e.time));var a=function(){var t=this.getAttribute("type");0==t?(e.no&&e.no(),layer.close(n.index)):e.yes?e.yes(n.index):layer.close(n.index)};if(e.btn)for(var s=t[i]("layui-m-layerbtn")[0].children,r=s.length,o=0;o<r;o++)l.touch(s[o],a);if(e.shade&&e.shadeClose){var c=t[i]("layui-m-layershade")[0];l.touch(c,function(){layer.close(n.index,e.end)})}e.end&&(l.end[n.index]=e.end)},e.layer={v:"2.0",index:r,open:function(e){var t=new c(e||{});return t.index},close:function(e){var n=a("#"+o[0]+e)[0];n&&(n.innerHTML="",t.body.removeChild(n),clearTimeout(l.timer[e]),delete l.timer[e],"function"==typeof l.end[e]&&l.end[e](),delete l.end[e])},closeAll:function(){for(var e=t[i](o[0]),n=0,a=e.length;n<a;n++)layer.close(0|e[0].getAttribute("index"))}},"function"==typeof define?define(function(){return layer}):function(){var e=document.scripts,n=e[e.length-1],i=n.src,a=i.substring(0,i.lastIndexOf("/")+1);n.getAttribute("merge")||document.head.appendChild(function(){var e=t.createElement("link");return e.href=a+"need/layer.css?2.0",e.type="text/css",e.rel="styleSheet",e.id="layermcss",e}())}()}(window);

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -0,0 +1,795 @@
.layui-layer-imgbar,.layui-layer-imgtit a,.layui-layer-tab .layui-layer-title span,.layui-layer-title{
text-overflow:ellipsis;
white-space:nowrap
}
html #layuicss-layer{
display:none;
position:absolute;
width:1989px
}
.layui-layer,.layui-layer-shade{
position:fixed;
_position:absolute;
pointer-events:auto
}
.layui-layer-shade{
top:0;
left:0;
width:100%;
height:100%;
_height:expression(document.body.offsetHeight+"px")
}
.layui-layer{
-webkit-overflow-scrolling:touch;
top:150px;
left:0;
margin:0;
padding:0;
background-color:#fff;
-webkit-background-clip:content;
border-radius:2px;
box-shadow:1px 1px 50px rgba(0,0,0,.3)
}
.layui-layer-close{
position:absolute
}
.layui-layer-content{
position:relative
}
.layui-layer-border{
border:1px solid #B2B2B2;
border:1px solid rgba(0,0,0,.1);
box-shadow:1px 1px 5px rgba(0,0,0,.2)
}
.layui-layer-load{
background:url(loading-1.gif) center center no-repeat #eee
}
.layui-layer-ico{
background:url(icon.png) no-repeat
}
.layui-layer-btn a,.layui-layer-dialog .layui-layer-ico,.layui-layer-setwin a{
display:inline-block;
*display:inline;
*zoom:1;
vertical-align:top
}
.layui-layer-move{
display:none;
position:fixed;
*position:absolute;
left:0;
top:0;
width:100%;
height:100%;
cursor:move;
opacity:0;
filter:alpha(opacity=0);
background-color:#fff;
z-index:2147483647
}
.layui-layer-resize{
position:absolute;
width:15px;
height:15px;
right:0;
bottom:0;
cursor:se-resize
}
.layer-anim{
-webkit-animation-fill-mode:both;
animation-fill-mode:both;
-webkit-animation-duration:.3s;
animation-duration:.3s
}
@-webkit-keyframes layer-bounceIn{
0%{
opacity:0;
-webkit-transform:scale(.5);
transform:scale(.5)
}
100%{
opacity:1;
-webkit-transform:scale(1);
transform:scale(1)
}
}
@keyframes layer-bounceIn{
0%{
opacity:0;
-webkit-transform:scale(.5);
-ms-transform:scale(.5);
transform:scale(.5)
}
100%{
opacity:1;
-webkit-transform:scale(1);
-ms-transform:scale(1);
transform:scale(1)
}
}
.layer-anim-00{
-webkit-animation-name:layer-bounceIn;
animation-name:layer-bounceIn
}
@-webkit-keyframes layer-zoomInDown{
0%{
opacity:0;
-webkit-transform:scale(.1) translateY(-2000px);
transform:scale(.1) translateY(-2000px);
-webkit-animation-timing-function:ease-in-out;
animation-timing-function:ease-in-out
}
60%{
opacity:1;
-webkit-transform:scale(.475) translateY(60px);
transform:scale(.475) translateY(60px);
-webkit-animation-timing-function:ease-out;
animation-timing-function:ease-out
}
}
@keyframes layer-zoomInDown{
0%{
opacity:0;
-webkit-transform:scale(.1) translateY(-2000px);
-ms-transform:scale(.1) translateY(-2000px);
transform:scale(.1) translateY(-2000px);
-webkit-animation-timing-function:ease-in-out;
animation-timing-function:ease-in-out
}
60%{
opacity:1;
-webkit-transform:scale(.475) translateY(60px);
-ms-transform:scale(.475) translateY(60px);
transform:scale(.475) translateY(60px);
-webkit-animation-timing-function:ease-out;
animation-timing-function:ease-out
}
}
.layer-anim-01{
-webkit-animation-name:layer-zoomInDown;
animation-name:layer-zoomInDown
}
@-webkit-keyframes layer-fadeInUpBig{
0%{
opacity:0;
-webkit-transform:translateY(2000px);
transform:translateY(2000px)
}
100%{
opacity:1;
-webkit-transform:translateY(0);
transform:translateY(0)
}
}
@keyframes layer-fadeInUpBig{
0%{
opacity:0;
-webkit-transform:translateY(2000px);
-ms-transform:translateY(2000px);
transform:translateY(2000px)
}
100%{
opacity:1;
-webkit-transform:translateY(0);
-ms-transform:translateY(0);
transform:translateY(0)
}
}
.layer-anim-02{
-webkit-animation-name:layer-fadeInUpBig;
animation-name:layer-fadeInUpBig
}
@-webkit-keyframes layer-zoomInLeft{
0%{
opacity:0;
-webkit-transform:scale(.1) translateX(-2000px);
transform:scale(.1) translateX(-2000px);
-webkit-animation-timing-function:ease-in-out;
animation-timing-function:ease-in-out
}
60%{
opacity:1;
-webkit-transform:scale(.475) translateX(48px);
transform:scale(.475) translateX(48px);
-webkit-animation-timing-function:ease-out;
animation-timing-function:ease-out
}
}
@keyframes layer-zoomInLeft{
0%{
opacity:0;
-webkit-transform:scale(.1) translateX(-2000px);
-ms-transform:scale(.1) translateX(-2000px);
transform:scale(.1) translateX(-2000px);
-webkit-animation-timing-function:ease-in-out;
animation-timing-function:ease-in-out
}
60%{
opacity:1;
-webkit-transform:scale(.475) translateX(48px);
-ms-transform:scale(.475) translateX(48px);
transform:scale(.475) translateX(48px);
-webkit-animation-timing-function:ease-out;
animation-timing-function:ease-out
}
}
.layer-anim-03{
-webkit-animation-name:layer-zoomInLeft;
animation-name:layer-zoomInLeft
}
@-webkit-keyframes layer-rollIn{
0%{
opacity:0;
-webkit-transform:translateX(-100%) rotate(-120deg);
transform:translateX(-100%) rotate(-120deg)
}
100%{
opacity:1;
-webkit-transform:translateX(0) rotate(0);
transform:translateX(0) rotate(0)
}
}
@keyframes layer-rollIn{
0%{
opacity:0;
-webkit-transform:translateX(-100%) rotate(-120deg);
-ms-transform:translateX(-100%) rotate(-120deg);
transform:translateX(-100%) rotate(-120deg)
}
100%{
opacity:1;
-webkit-transform:translateX(0) rotate(0);
-ms-transform:translateX(0) rotate(0);
transform:translateX(0) rotate(0)
}
}
.layer-anim-04{
-webkit-animation-name:layer-rollIn;
animation-name:layer-rollIn
}
@keyframes layer-fadeIn{
0%{
opacity:0
}
100%{
opacity:1
}
}
.layer-anim-05{
-webkit-animation-name:layer-fadeIn;
animation-name:layer-fadeIn
}
@-webkit-keyframes layer-shake{
0%,100%{
-webkit-transform:translateX(0);
transform:translateX(0)
}
10%,30%,50%,70%,90%{
-webkit-transform:translateX(-10px);
transform:translateX(-10px)
}
20%,40%,60%,80%{
-webkit-transform:translateX(10px);
transform:translateX(10px)
}
}
@keyframes layer-shake{
0%,100%{
-webkit-transform:translateX(0);
-ms-transform:translateX(0);
transform:translateX(0)
}
10%,30%,50%,70%,90%{
-webkit-transform:translateX(-10px);
-ms-transform:translateX(-10px);
transform:translateX(-10px)
}
20%,40%,60%,80%{
-webkit-transform:translateX(10px);
-ms-transform:translateX(10px);
transform:translateX(10px)
}
}
.layer-anim-06{
-webkit-animation-name:layer-shake;
animation-name:layer-shake
}
@-webkit-keyframes fadeIn{
0%{
opacity:0
}
100%{
opacity:1
}
}
.layui-layer-title{
padding:0 80px 0 20px;
height:42px;
line-height:42px;
border-bottom:1px solid #eee;
font-size:14px;
color:#333;
overflow:hidden;
background-color:#F8F8F8;
border-radius:2px 2px 0 0
}
.layui-layer-setwin{
position:absolute;
right:15px;
*right:0;
top:15px;
font-size:0;
line-height:initial
}
.layui-layer-setwin a{
position:relative;
width:16px;
height:16px;
margin-left:10px;
font-size:12px;
_overflow:hidden
}
.layui-layer-setwin .layui-layer-min cite{
position:absolute;
width:14px;
height:2px;
left:0;
top:50%;
margin-top:-1px;
background-color:#2E2D3C;
cursor:pointer;
_overflow:hidden
}
.layui-layer-setwin .layui-layer-min:hover cite{
background-color:#2D93CA
}
.layui-layer-setwin .layui-layer-max{
background-position:-32px -40px
}
.layui-layer-setwin .layui-layer-max:hover{
background-position:-16px -40px
}
.layui-layer-setwin .layui-layer-maxmin{
background-position:-65px -40px
}
.layui-layer-setwin .layui-layer-maxmin:hover{
background-position:-49px -40px
}
.layui-layer-setwin .layui-layer-close1{
background-position:1px -40px;
cursor:pointer
}
.layui-layer-setwin .layui-layer-close1:hover{
opacity:.7
}
.layui-layer-setwin .layui-layer-close2{
position:absolute;
right:-28px;
top:-28px;
width:30px;
height:30px;
margin-left:0;
background-position:-149px -31px;
*right:-18px;
_display:none
}
.layui-layer-setwin .layui-layer-close2:hover{
background-position:-180px -31px
}
.layui-layer-btn{
text-align:right;
padding:0 15px 12px;
pointer-events:auto;
user-select:none;
-webkit-user-select:none
}
.layui-layer-btn a{
height:28px;
line-height:28px;
margin:5px 5px 0;
padding:0 15px;
border:1px solid #dedede;
background-color:#fff;
color:#333;
border-radius:2px;
font-weight:400;
cursor:pointer;
text-decoration:none
}
.layui-layer-btn a:hover{
opacity:.9;
text-decoration:none
}
.layui-layer-btn a:active{
opacity:.8
}
.layui-layer-btn .layui-layer-btn0{
border-color:#1E9FFF;
background-color:#1E9FFF;
color:#fff
}
.layui-layer-btn-l{
text-align:left
}
.layui-layer-btn-c{
text-align:center
}
.layui-layer-dialog{
min-width:260px
}
.layui-layer-dialog .layui-layer-content{
position:relative;
padding:20px;
line-height:24px;
word-break:break-all;
overflow:hidden;
font-size:14px;
overflow-x:hidden;
overflow-y:auto;
color: #000;
}
.layui-layer-dialog .layui-layer-content .layui-layer-ico{
position:absolute;
top:16px;
left:15px;
_left:-40px;
width:30px;
height:30px
}
.layui-layer-ico1{
background-position:-30px 0
}
.layui-layer-ico2{
background-position:-60px 0
}
.layui-layer-ico3{
background-position:-90px 0
}
.layui-layer-ico4{
background-position:-120px 0
}
.layui-layer-ico5{
background-position:-150px 0
}
.layui-layer-ico6{
background-position:-180px 0
}
.layui-layer-rim{
border:6px solid #8D8D8D;
border:6px solid rgba(0,0,0,.3);
border-radius:5px;
box-shadow:none
}
.layui-layer-msg{
min-width:180px;
border:1px solid #D3D4D3;
box-shadow:none
}
.layui-layer-hui{
min-width:100px;
background-color:#000;
filter:alpha(opacity=60);
background-color:rgba(0,0,0,.6);
color:#fff;
border:none
}
.layui-layer-hui .layui-layer-content{
padding:12px 25px;
text-align:center;
color: white;
}
.layui-layer-dialog .layui-layer-padding{
padding:20px 20px 20px 55px;
text-align:left
}
.layui-layer-page .layui-layer-content{
position:relative;
overflow:auto
}
.layui-layer-iframe .layui-layer-btn,.layui-layer-page .layui-layer-btn{
padding-top:10px
}
.layui-layer-nobg{
background:0 0
}
.layui-layer-iframe iframe{
display:block;
width:100%
}
.layui-layer-loading{
border-radius:100%;
background:0 0;
box-shadow:none;
border:none
}
.layui-layer-loading .layui-layer-content{
width:60px;
height:24px;
background:url(loading-0.gif) no-repeat
}
.layui-layer-loading .layui-layer-loading1{
width:37px;
height:37px;
background:url(loading-1.gif) no-repeat
}
.layui-layer-ico16,.layui-layer-loading .layui-layer-loading2{
width:32px;
height:32px;
background:url(loading-2.gif) no-repeat
}
.layui-layer-tips{
background:0 0;
box-shadow:none;
border:none
}
.layui-layer-tips .layui-layer-content{
position:relative;
line-height:22px;
min-width:12px;
padding:8px 15px;
font-size:12px;
_float:left;
border-radius:2px;
box-shadow:1px 1px 3px rgba(0,0,0,.2);
background-color:#000;
color:#fff
}
.layui-layer-tips .layui-layer-close{
right:-2px;
top:-1px
}
.layui-layer-tips i.layui-layer-TipsG{
position:absolute;
width:0;
height:0;
border-width:8px;
border-color:transparent;
border-style:dashed;
*overflow:hidden
}
.layui-layer-tips i.layui-layer-TipsB,.layui-layer-tips i.layui-layer-TipsT{
left:5px;
border-right-style:solid;
border-right-color:#000
}
.layui-layer-tips i.layui-layer-TipsT{
bottom:-8px
}
.layui-layer-tips i.layui-layer-TipsB{
top:-8px
}
.layui-layer-tips i.layui-layer-TipsL,.layui-layer-tips i.layui-layer-TipsR{
top:5px;
border-bottom-style:solid;
border-bottom-color:#000
}
.layui-layer-tips i.layui-layer-TipsR{
left:-8px
}
.layui-layer-tips i.layui-layer-TipsL{
right:-8px
}
.layui-layer-lan[type=dialog]{
min-width:280px
}
.layui-layer-lan .layui-layer-title{
background:#4476A7;
color:#fff;
border:none
}
.layui-layer-lan .layui-layer-btn{
padding:5px 10px 10px;
text-align:right;
border-top:1px solid #E9E7E7
}
.layui-layer-lan .layui-layer-btn a{
background:#fff;
border-color:#E9E7E7;
color:#333
}
.layui-layer-lan .layui-layer-btn .layui-layer-btn1{
background:#C9C5C5
}
.layui-layer-molv .layui-layer-title{
background:#009f95;
color:#fff;
border:none
}
.layui-layer-molv .layui-layer-btn a{
background:#009f95;
border-color:#009f95
}
.layui-layer-molv .layui-layer-btn .layui-layer-btn1{
background:#92B8B1
}
.layui-layer-iconext{
background:url(icon-ext.png) no-repeat
}
.layui-layer-prompt .layui-layer-input{
display:block;
width:230px;
height:36px;
margin:0 auto;
line-height:30px;
padding-left:10px;
border:1px solid #e6e6e6;
color:#333
}
.layui-layer-prompt textarea.layui-layer-input{
width:300px;
height:100px;
line-height:20px;
padding:6px 10px
}
.layui-layer-prompt .layui-layer-content{
padding:20px
}
.layui-layer-prompt .layui-layer-btn{
padding-top:0
}
.layui-layer-tab{
box-shadow:1px 1px 50px rgba(0,0,0,.4)
}
.layui-layer-tab .layui-layer-title{
padding-left:0;
overflow:visible
}
.layui-layer-tab .layui-layer-title span{
position:relative;
float:left;
min-width:80px;
max-width:260px;
padding:0 20px;
text-align:center;
overflow:hidden;
cursor:pointer
}
.layui-layer-tab .layui-layer-title span.layui-this{
height:43px;
border-left:1px solid #eee;
border-right:1px solid #eee;
background-color:#fff;
z-index:10
}
.layui-layer-tab .layui-layer-title span:first-child{
border-left:none
}
.layui-layer-tabmain{
line-height:24px;
clear:both
}
.layui-layer-tabmain .layui-layer-tabli{
display:none
}
.layui-layer-tabmain .layui-layer-tabli.layui-this{
display:block
}
.layui-layer-photos{
-webkit-animation-duration:.8s;
animation-duration:.8s
}
.layui-layer-photos .layui-layer-content{
overflow:hidden;
text-align:center
}
.layui-layer-photos .layui-layer-phimg img{
position:relative;
width:100%;
display:inline-block;
*display:inline;
*zoom:1;
vertical-align:top
}
.layui-layer-imgbar,.layui-layer-imguide{
display:none
}
.layui-layer-imgnext,.layui-layer-imgprev{
position:absolute;
top:50%;
width:27px;
_width:44px;
height:44px;
margin-top:-22px;
outline:0;
blr:expression(this.onFocus=this.blur())
}
.layui-layer-imgprev{
left:10px;
background-position:-5px -5px;
_background-position:-70px -5px
}
.layui-layer-imgprev:hover{
background-position:-33px -5px;
_background-position:-120px -5px
}
.layui-layer-imgnext{
right:10px;
_right:8px;
background-position:-5px -50px;
_background-position:-70px -50px
}
.layui-layer-imgnext:hover{
background-position:-33px -50px;
_background-position:-120px -50px
}
.layui-layer-imgbar{
position:absolute;
left:0;
bottom:0;
width:100%;
height:32px;
line-height:32px;
background-color:rgba(0,0,0,.8);
background-color:#000\9;
filter:Alpha(opacity=80);
color:#fff;
overflow:hidden;
font-size:0
}
.layui-layer-imgtit *{
display:inline-block;
*display:inline;
*zoom:1;
vertical-align:top;
font-size:12px
}
.layui-layer-imgtit a{
max-width:65%;
overflow:hidden;
color:#fff
}
.layui-layer-imgtit a:hover{
color:#fff;
text-decoration:underline
}
.layui-layer-imgtit em{
padding-left:10px;
font-style:normal
}
@-webkit-keyframes layer-bounceOut{
100%{
opacity:0;
-webkit-transform:scale(.7);
transform:scale(.7)
}
30%{
-webkit-transform:scale(1.05);
transform:scale(1.05)
}
0%{
-webkit-transform:scale(1);
transform:scale(1)
}
}
@keyframes layer-bounceOut{
100%{
opacity:0;
-webkit-transform:scale(.7);
-ms-transform:scale(.7);
transform:scale(.7)
}
30%{
-webkit-transform:scale(1.05);
-ms-transform:scale(1.05);
transform:scale(1.05)
}
0%{
-webkit-transform:scale(1);
-ms-transform:scale(1);
transform:scale(1)
}
}
.layer-anim-close{
-webkit-animation-name:layer-bounceOut;
animation-name:layer-bounceOut;
-webkit-animation-fill-mode:both;
animation-fill-mode:both;
-webkit-animation-duration:.2s;
animation-duration:.2s
}
@media screen and (max-width:1100px){
.layui-layer-iframe{
overflow-y:auto;
-webkit-overflow-scrolling:touch
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 701 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -0,0 +1,186 @@
#!/bin/sh
eval `dbus export frpc_`
source /jffs/softcenter/scripts/base.sh
NAME=frpc
BIN=/jffs/softcenter/bin/frpc
INI_FILE=/tmp/.frpc.ini
STCP_INI_FILE=/tmp/.frpc_stcp.ini
PID_FILE=/var/run/frpc.pid
alias echo_date='echo $(date +%Y年%m月%d日\ %X):'
lan_ip=`nvram get lan_ipaddr`
lan_port="80"
ddns_flag=false
fun_ntp_sync(){
ntp_server=`nvram get ntp_server0`
start_time="`date +%Y%m%d`"
ntpclient -h ${ntp_server} -i3 -l -s > /dev/null 2>&1
if [ "${start_time}"x = "`date +%Y%m%d`"x ]; then
ntpclient -h ntp1.aliyun.com -i3 -l -s > /dev/null 2>&1
fi
}
fun_start_stop(){
dbus set frpc_client_version=`${BIN} --version`
if [ "${frpc_enable}"x = "1"x ];then
if [ "`dbus get frpc_customize_conf`"x = "1"x ];then
_frpc_customize_conf=`dbus get frpc_config | base64_decode` || "未发现配置文件"
cat > ${INI_FILE}<<-EOF
# frpc custom configuration
${_frpc_customize_conf}
EOF
else
stcp_en=`dbus list frpc_proto_node | grep stcp`
cat > ${INI_FILE}<<-EOF
# frpc configuration
[common]
server_addr = ${frpc_common_server_addr}
server_port = ${frpc_common_server_port}
token = ${frpc_common_privilege_token}
log_file = ${frpc_common_log_file}
log_level = ${frpc_common_log_level}
log_max_days = ${frpc_common_log_max_days}
tcp_mux = ${frpc_common_tcp_mux}
protocol = ${frpc_common_protocol}
login_fail_exit = ${frpc_common_login_fail_exit}
user = ${frpc_common_user}
EOF
if [[ "${stcp_en}" != "" ]]; then
cat > ${STCP_INI_FILE}<<-EOF
[common]
server_addr = ${frpc_common_server_addr}
server_port = ${frpc_common_server_port}
token = ${frpc_common_privilege_token}
EOF
fi
server_nu=`dbus list frpc_localhost_node | sort -n -t "_" -k 4|cut -d "=" -f 1|cut -d "_" -f 4`
for nu in ${server_nu}
do
array_subname=`dbus get frpc_subname_node_$nu`
array_type=`dbus get frpc_proto_node_$nu`
array_local_ip=`dbus get frpc_localhost_node_$nu`
array_local_port=`dbus get frpc_localport_node_$nu`
array_remote_port=`dbus get frpc_remoteport_node_$nu`
array_custom_domains=`dbus get frpc_subdomain_node_$nu`
array_use_encryption=`dbus get frpc_encryption_node_$nu`
array_use_gzip=`dbus get frpc_gzip_node_$nu`
if [[ "${array_type}" == "tcp" ]] || [[ "${array_type}" == "udp" ]]; then
cat >> ${INI_FILE} <<EOF
[${array_subname}]
type = ${array_type}
local_ip = ${array_local_ip}
local_port = ${array_local_port}
remote_port = ${array_remote_port}
use_encryption = ${array_use_encryption}
use_compression = ${array_use_gzip}
EOF
elif [[ "${array_type}" == "stcp" ]]; then
cat >> ${INI_FILE} <<EOF
[${array_subname}]
type = ${array_type}
sk = ${array_custom_domains}
local_ip = ${array_local_ip}
local_port = ${array_local_port}
EOF
cat >> ${STCP_INI_FILE}<<-EOF
[secret_tcp_vistor]
# frpc role vistor -> frps -> frpc role server
role = vistor
type = stcp
# the server name you want to vistor
server_name = ${frpc_common_user}.${array_subname}
sk = ${array_custom_domains}
# connect this address to vistor stcp server
bind_addr = 127.0.0.1
bind_port = 9000
EOF
else
cat >> ${INI_FILE} <<EOF
[${array_subname}]
type = ${array_type}
local_ip = ${array_local_ip}
local_port = ${array_local_port}
remote_port = ${array_remote_port}
custom_domains = ${array_custom_domains}
use_encryption = ${array_use_encryption}
use_compression = ${array_use_gzip}
EOF
fi
done
fi
killall frpc || true
echo -n "starting ${NAME}..."
export GOGC=40
start-stop-daemon -S -q -b -m -p ${PID_FILE} -x ${BIN} -- -c ${INI_FILE}
echo " done"
else
killall frpc || true
fi
}
fun_nat_start(){
if [ "${frpc_enable}"x = "1"x ];then
echo_date 添加nat-start触发事件...
dbus set __event__onnatstart_frpc="/jffs/softcenter/scripts/config-frpc.sh"
else
echo_date 删除nat-start触发...
dbus remove __event__onnatstart_frpc
fi
}
fun_crontab(){
if [ "${frpc_enable}"x = "1"x ];then
echo -n "setting ${NAME} crontab..."
if [ "${frpc_common_cron_time}"x = "0"x ]; then
cru d frpc_monitor
else
if [ "${frpc_common_cron_hour_min}"x = "min"x ]; then
cru a frpc_monitor "*/"${frpc_common_cron_time}" * * * * /bin/sh /jffs/softcenter/scripts/config-frpc.sh"
elif [ "${frpc_common_cron_hour_min}"x = "hour"x ]; then
cru a frpc_monitor "0 */"${frpc_common_cron_time}" * * * /bin/sh /jffs/softcenter/scripts/config-frpc.sh"
fi
fi
echo " done"
else
cru d frpc_monitor
fi
}
fun_ddns_stop(){
nvram set ddns_enable_x=0
nvram commit
}
fun_ddns_start(){
# ddns setting
if [ "${frpc_enable}"x = "1"x ];then
# ddns setting
if [[ "${frpc_common_ddns}" == "1" ]] && [[ "${frpc_domain}" != "" ]]; then
nvram set ddns_enable_x=1
nvram set ddns_hostname_x=${frpc_domain}
ddns_custom_updated 1
nvram commit
elif [[ "${frpc_common_ddns}" == "2" ]]; then
echo "ddns no setting"
else
fun_ddns_stop
fi
else
fun_ddns_stop
fi
}
case $ACTION in
start)
fun_ntp_sync
fun_start_stop
fun_nat_start
fun_crontab
fun_ddns_start
;;
*)
fun_ntp_sync
fun_start_stop
fun_nat_start
fun_crontab
fun_ddns_start
;;
esac

View File

@ -0,0 +1,12 @@
#! /bin/sh
frpc_pid=`ps | grep -w frpc | grep -v grep | awk '{print $1}'`
frpc_status=`ps | grep -w frpc | grep -cv grep`
frpc_version=`/jffs/softcenter/bin/frpc -v`
if [ "$frpc_status" == "1" ];then
echo 进程运行正常!版本:${frpc_version} PID${frpc_pid}> /tmp/.frpc.log
else
echo \<em\>【警告】:进程未运行!\<\/em\> 版本:${frpc_version} > /tmp/.frpc.log
fi
echo XU6J03M6 >> /tmp/.frpc.log
sleep 2
rm -rf /tmp/.frpc.log

View File

@ -0,0 +1,35 @@
#!/bin/sh
eval `dbus export frpc_`
source /jffs/softcenter/scripts/base.sh
MODULE=frpc
/jffs/softcenter/scripts/config-frpc.sh stop
rm -f /jffs/softcenter/init.d/S98frpc.sh
rm -f /jffs/softcenter/bin/frpc
rm -f /jffs/softcenter/res/frpc-menu.js
rm -f /jffs/softcenter/res/icon-frpc.png
rm -f /jffs/softcenter/res/frpc_check.html
rm -f /jffs/softcenter/res/frpc_stcp_conf.html
rm -f /jffs/softcenter/res/frpc_conf.html
rm -f /jffs/softcenter/res/frpc.css
rm -f /jffs/softcenter/scripts/config-frpc.sh
rm -f /jffs/softcenter/scripts/frpc_status.sh
rm -f /jffs/softcenter/webs/Module_frpc.asp
rm -f /jffs/softcenter/configs/frpc.ini
rm -f /jffs/softcenter/res/layer/*
rm -f /tmp/.frpc.ini
rm -f /tmp/.frpc_stcp.ini
rm -fr /tmp/frpc*
if [ "${frpc_common_ddns}" == "1" ]; then
nvram set ddns_enable_x=0
nvram commit
fi
values=`dbus list frpc | cut -d "=" -f 1`
for value in $values
do
dbus remove $value
done
dbus remove __event__onwanstart_frpc
dbus remove __event__onnatstart_frpc
cru d frpc_monitor
rm -f /jffs/softcenter/scripts/uninstall_frpc.sh

File diff suppressed because it is too large Load Diff

Binary file not shown.

1
frpc/history/version Normal file
View File

@ -0,0 +1 @@
2.1.15 6ad0d26c66249eb415af1f9c72a8e986

2
frpc/version Normal file
View File

@ -0,0 +1,2 @@
2.1.15
6ad0d26c66249eb415af1f9c72a8e986

33
frps/backup.sh Normal file
View File

@ -0,0 +1,33 @@
#! /bin/bash
MD5='md5sum'
unamestr=`uname`
if [[ "$unamestr" == 'Darwin' ]]; then
MD5='md5'
fi
# you can do something here
# this shell scripts will run at the end of build.py scripts
MODULE=frps
mkdir -p history
if [ ! -f ./history/version ];then
touch ./history/version
fi
version_old=`cat history/version | awk '{print $1}' | sort -rn |sed -n 1p`
version_new=`cat config.json.js |grep "version"|cut -d"\"" -f 4`
md5_old=`cat history/version | sort -nk1 | awk '{print $1}' |sed -n 1p`
if [[ "$unamestr" == 'Darwin' ]]; then
md5_new=`${MD5} $MODULE.tar.gz | awk '{print $4}'`
else
md5_new=`${MD5} $MODULE.tar.gz | awk '{print $1}'`
fi
if [ -f ./$MODULE.tar.gz ];then
if [ "$version_old" != "$version_new" ];then
mkdir ./history/$version_new/
cp ./$MODULE.tar.gz ./history/$version_new/
echo $version_new $md5_new >> ./history/version
fi
fi

32
frps/build.sh Executable file
View File

@ -0,0 +1,32 @@
#!/bin/sh
MODULE=frps
VERSION=1.4.16
TITLE=frps穿透
DESCRIPTION=内网穿透利器,谁用谁知道。
HOME_URL=Module_frps.asp
# Check and include base
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
if [ "$MODULE" == "" ]; then
echo "module not found"
exit 1
fi
if [ -f "$DIR/$MODULE/$MODULE/install.sh" ]; then
echo "install script not found"
exit 2
fi
# now include build_base.sh
. $DIR/../softcenter/build_base.sh
# change to module directory
cd $DIR
# do something here
do_build_result
sh backup.sh $MODULE

8
frps/config.json.js Normal file
View File

@ -0,0 +1,8 @@
{
"version":"1.4.16",
"md5":"7fac5d6a5a6a0b1be355c21ea29f6251",
"home_url":"Module_frps.asp",
"title":"frps穿透",
"description":"内网穿透利器,谁用谁知道。",
"build_date":"2019-01-16_20:13:34"
}

BIN
frps/frps.tar.gz Normal file

Binary file not shown.

BIN
frps/frps/bin/frps Executable file

Binary file not shown.

View File

@ -0,0 +1,2 @@
#!/bin/sh
sh /koolshare/scripts/config-frps.sh

34
frps/frps/install.sh Normal file
View File

@ -0,0 +1,34 @@
#!/bin/sh
MODULE=frps
VERSION="1.4.16"
cd /
rm -f /jffs/softcenter/init.d/S97frps.sh
cp -f /tmp/$MODULE/bin/* /jffs/softcenter/bin/
cp -f /tmp/$MODULE/scripts/* /jffs/softcenter/scripts/
cp -f /tmp/$MODULE/res/* /jffs/softcenter/res/
cp -f /tmp/$MODULE/webs/* /jffs/softcenter/webs/
cp -f /tmp/$MODULE/init.d/* /jffs/softcenter/init.d/
rm -fr /tmp/frps* >/dev/null 2>&1
killall ${MODULE}
chmod +x /jffs/softcenter/bin/${MODULE}
chmod +x /jffs/softcenter/scripts/config-frps.sh
chmod +x /jffs/softcenter/scripts/frps_status.sh
chmod +x /jffs/softcenter/scripts/uninstall_frps.sh
chmod +x /jffs/softcenter/init.d/S97frps.sh
sleep 1
dbus set ${MODULE}_version="${VERSION}"
#dbus set __event__onwanstart_frps=/jffs/softcenter/scripts/config-frps.sh
dbus set ${MODULE}_client_version=`/jffs/softcenter/bin/${MODULE} --version`
dbus set ${MODULE}_common_cron_hour_min="hour"
dbus set ${MODULE}_common_cron_time="12"
dbus set softcenter_module_${MODULE}_install=1
dbus set softcenter_module_${MODULE}_name=${MODULE}
dbus set softcenter_module_${MODULE}_title="Frps内网穿透"
dbus set softcenter_module_${MODULE}_description="Frps路由器服务端内网穿透利器。"
dbus set softcenter_module_${MODULE}_version="${VERSION}"
en=`dbus get ${MODULE}_enable`
if [ "$en" == "1" ]; then
/jffs/softcenter/scripts/config-${MODULE}.sh
fi
echo "${MODULE} ${VERSION} install completed!"

View File

@ -0,0 +1,79 @@
function openssHint(itemNum){
statusmenu = "";
width="350px";
if(itemNum == 0){
statusmenu ="如果发现开关不能开启,那么请检查<a href='Advanced_System_Content.asp'><u><font color='#00F'>系统管理 -- 系统设置</font></u></a>页面内Enable JFFS custom scripts and configs是否开启。";
_caption = "服务器说明";
}
else if(itemNum == 1){
statusmenu ="此处填入你的frp服务器的控制台端口对应服务器配置文件中的节[common]下的dashboard_port字段<br/>";
_caption = "Dashboard port";
}
else if(itemNum == 2){
statusmenu ="此处填入你的frp服务器的服务端口对应服务器配置文件中的节[common]下的bind_port字段";
_caption = "Bind port";
}
else if(itemNum == 3){
statusmenu ="此处填入你的frp服务器的特权授权码。对应服务器配置文件中的节[common]下的privilege_token字段。<br/><font color='#F46'>注意:</font>使用带有特殊字符的密码可能会导致frpc链接不上服务器。";
_caption = "Privilege Token";
}
else if(itemNum == 4){
statusmenu ="此处填入你的frp服务器HTTP穿透服务的端口对应服务器配置文件中的节[common]下的vhost_http_port字段";
_caption = "vhost http port";
}
else if(itemNum == 5){
statusmenu ="此处填入你的frp服务器HTTPS穿透服务的端口对应服务器配置文件中的节[common]下的vhost_https_port字段";
_caption = "vhost https port";
}
else if(itemNum == 6){
statusmenu ="此处是否开启frpc客户端日志。<br/><font color='#F46'>注意:</font>默认不开启,开启后日志路径为/tmp/frpc.log";
_caption = "日志记录";
}
else if(itemNum == 7){
statusmenu ="此处选择日志记录等级。<br/>可选内容info、warn、error、debug。";
_caption = "日志等级";
}
else if(itemNum == 8){
statusmenu ="此处选择要保留的日志天数。";
_caption = "日志记录天数";
}
else if(itemNum == 9){
statusmenu ="最大连接池数量。<br/>默认情况下当用户请求建立连接后frps 才会请求 frpc 主动与后端服务建立一个连接。当为指定的代理启用连接池后frp 会预先和后端服务建立起指定数量的连接,每次接收到用户请求后,会从连接池中取出一个连接和用户连接关联起来,避免了等待与后端服务建立连接以及 frpc 和 frps 之间传递控制信息的时间";
_caption = "max pool count";
}
else if(itemNum == 10){
statusmenu ="定时到Frp服务器上重新注册服务以便Frp提供持续的服务。<br/><font color='#F46'>注意:</font>填写内容为0时关闭该功能";
_caption = "定时注册服务";
}
else if(itemNum == 11){
statusmenu ="控制台登录用户名";
_caption = "Dashboard User";
}
else if(itemNum == 12){
statusmenu ="控制台登录密码";
_caption = "Dashboard Pas";
}
else if(itemNum == 13){
statusmenu ="从 v0.10.0 版本开始,客户端和服务器端之间的连接支持多路复用,不再需要为每一个用户请求创建一个连接,使连接建立的延迟降低,并且避免了大量文件描述符的占用,使 frp 可以承载更高的并发数。</br>该功能默认启用,如需关闭,可以在 frps.ini 和 frpc.ini 中配置,该配置项在服务端和客户端必须一致.";
_caption = "TCP 多路复用";
}
//return overlib(statusmenu, OFFSETX, -160, LEFT, DELAY, 200);
//return overlib(statusmenu, OFFSETX, -160, LEFT, STICKY, WIDTH, 'width', CAPTION, " ", FGCOLOR, "#4D595D", CAPCOLOR, "#000000", CLOSECOLOR, "#000000", MOUSEOFF, "1",TEXTCOLOR, "#FFF", CLOSETITLE, '');
return overlib(statusmenu, OFFSETX, -160, LEFT, STICKY, WIDTH, 'width', CAPTION, _caption, CLOSETITLE, '');
var tag_name= document.getElementsByTagName('a');
for (var i=0;i<tag_name.length;i++)
tag_name[i].onmouseout=nd;
if(helpcontent == [] || helpcontent == "" || hint_array_id > helpcontent.length)
return overlib('<#defaultHint#>', HAUTO, VAUTO);
else if(hint_array_id == 0 && hint_show_id > 21 && hint_show_id < 24)
return overlib(helpcontent[hint_array_id][hint_show_id], FIXX, 270, FIXY, 30);
else{
if(hint_show_id > helpcontent[hint_array_id].length)
return overlib('<#defaultHint#>', HAUTO, VAUTO);
else
return overlib(helpcontent[hint_array_id][hint_show_id], HAUTO, VAUTO);
}
}

View File

@ -0,0 +1 @@
<% nvram_dump(".frps.log",""); %>

BIN
frps/frps/res/icon-frps.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

View File

@ -0,0 +1,107 @@
#!/bin/sh
eval `dbus export frps_`
source /jffs/softcenter/scripts/base.sh
NAME=frps
BIN=/jffs/softcenter/bin/${NAME}
INI_FILE=/jffs/softcenter/configs/${NAME}.ini
PID_FILE=/var/run/${NAME}.pid
alias echo_date='echo $(date +%Y年%m月%d日\ %X):'
en=${frps_enable}
fun_ntp_sync(){
ntp_server=`nvram get ntp_server0`
start_time="`date +%Y%m%d`"
ntpclient -h ${ntp_server} -i3 -l -s > /dev/null 2>&1
if [ "${start_time}"x = "`date +%Y%m%d`"x ]; then
ntpclient -h ntp1.aliyun.com -i3 -l -s > /dev/null 2>&1
fi
}
fun_nat_start(){
if [ "${frps_enable}"x = "1"x ];then
echo_date 添加nat-start触发事件...
dbus set __event__onnatstart_frps="/jffs/softcenter/scripts/config-frps.sh"
else
echo_date 删除nat-start触发...
dbus remove __event__onnatstart_frps
fi
}
onstart() {
fun_ntp_sync
killall ${NAME} || true >/dev/null 2>&1
dbus set ${NAME}_client_version=`${BIN} --version`
cat > ${INI_FILE}<<-EOF
# [common] is integral section
[common]
# A literal address or host name for IPv6 must be enclosed
# in square brackets, as in "[::1]:80", "[ipv6-host]:http" or "[ipv6-host%zone]:80"
bind_addr = 0.0.0.0
bind_port = ${frps_common_bind_port}
# udp port used for kcp protocol, it can be same with 'bind_port'
# if not set, kcp is disabled in frps
kcp_bind_port = ${frps_common_bind_port}
# if you want to configure or reload frps by dashboard, dashboard_port must be set
dashboard_port = ${frps_common_dashboard_port}
# dashboard user and pwd for basic auth protect, if not set, both default value is admin
dashboard_user = ${frps_common_dashboard_user}
dashboard_pwd = ${frps_common_dashboard_pwd}
vhost_http_port = ${frps_common_vhost_http_port}
vhost_https_port = ${frps_common_vhost_https_port}
# console or real logFile path like ./frps.log
log_file = ${frps_common_log_file}
# debug, info, warn, error
log_level = ${frps_common_log_level}
log_max_days = ${frps_common_log_max_days}
# if you enable privilege mode, frpc can create a proxy without pre-configure in frps when privilege_token is correct
token = ${frps_common_privilege_token}
# only allow frpc to bind ports you list, if you set nothing, there won't be any limit
#allow_ports = 1-65535
# pool_count in each proxy will change to max_pool_count if they exceed the maximum value
max_pool_count = ${frps_common_max_pool_count}
tcp_mux = ${frps_common_tcp_mux}
EOF
echo -n "setting ${NAME} crontab..."
if [ "${frps_common_cron_time}" == "0" ]; then
cru d frps_monitor
else
if [ "${frps_common_cron_hour_min}" == "min" ]; then
cru a frps_monitor "*/"${frps_common_cron_time}" * * * * /bin/sh /jffs/softcenter/scripts/config-frps.sh"
elif [ "${frps_common_cron_hour_min}" == "hour" ]; then
cru a frps_monitor "0 */"${frps_common_cron_time}" * * * /bin/sh /jffs/softcenter/scripts/config-frps.sh"
fi
fi
echo " done"
if [ "$en" == "1" ]; then
echo -n "starting ${NAME}..."
export GOGC=40
start-stop-daemon -S -q -b -m -p ${PID_FILE} -x ${BIN} -- -c ${INI_FILE}
echo " done"
fun_nat_start
else
stop
fi
}
stop() {
echo -n "stop ${NAME}..."
killall frps || true
cru d frps_monitor
fun_nat_start
echo " done"
}
case $ACTION in
start)
if [[ "$en" == "1" ]]; then
logger "[软件中心]: 启动frps"
onstart
fi
;;
stop)
stop
;;
*)
onstart
;;
esac

View File

@ -0,0 +1,12 @@
#! /bin/sh
frps_pid=`ps | grep -w frps | grep -v grep | awk '{print $1}'`
frps_status=`ps | grep -w frps | grep -cv grep`
frps_version=`/jffs/softcenter/bin/frps -v`
if [ "$frps_status" == "1" ];then
echo frps $frps_version 进程运行正常PID$frps_pid > /tmp/.frps.log
else
echo frps $frps_version 【警告】:进程未运行! > /tmp/.frps.log
fi
echo XU6J03M6 >> /tmp/.frps.log
sleep 2
rm -rf /tmp/.frps.log

View File

@ -0,0 +1,25 @@
#!/bin/sh
eval `dbus export frps_`
source /jffs/softcenter/scripts/base.sh
MODULE=frps
cd /
rm -f /jffs/softcenter/bin/${MODULE}
rm -f /jffs/softcenter/init.d/S97${MODULE}.sh
rm -f /jffs/softcenter/res/${MODULE}_check.html
rm -f /jffs/softcenter/res/${MODULE}-menu.js
rm -f /jffs/softcenter/res/icon-${MODULE}.png
rm -f /jffs/softcenter/scripts/config-${MODULE}.sh
rm -f /jffs/softcenter/scripts/${MODULE}_status.sh
rm -f /jffs/softcenter/webs/Module_${MODULE}.asp
rm -f /jffs/softcenter/configs/${MODULE}.ini
rm -fr /tmp/frps*
values=`dbus list ${MODULE} | cut -d "=" -f 1`
for value in $values
do
dbus remove $value
done
dbus remove __event__onwanstart_${MODULE}
dbus remove __event__onnatstart_${MODULE}
cru d ${MODULE}_monitor
rm -f /jffs/softcenter/scripts/uninstall_${MODULE}.sh

View File

@ -0,0 +1,512 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache"/>
<meta HTTP-EQUIV="Expires" CONTENT="-1"/>
<link rel="shortcut icon" href="images/favicon.png"/>
<link rel="icon" href="images/favicon.png"/>
<title>软件中心 - frps</title>
<link rel="stylesheet" type="text/css" href="index_style.css"/>
<link rel="stylesheet" type="text/css" href="form_style.css"/>
<link rel="stylesheet" type="text/css" href="css/element.css">
<style>
.Bar_container {
width:85%;
height:20px;
border:1px inset #999;
margin:0 auto;
margin-top:20px \9;
background-color:#FFFFFF;
z-index:100;
}
#proceeding_img_text {
position:absolute;
z-index:101;
font-size:11px;
color:#000000;
line-height:21px;
width: 83%;
}
#proceeding_img {
height:21px;
background:#C0D1D3 url(/images/ss_proceding.gif);
}
#ClientList_Block_PC{
border:1px outset #999;
background-color:#576D73;
position:absolute;
*margin-top:26px;
margin-left:2px;
*margin-left:-353px;
width:346px;
text-align:left;
height:auto;
overflow-y:auto;
z-index:200;
padding: 1px;
display:none;
}
#ClientList_Block_PC div{
background-color:#576D73;
height:auto;
*height:20px;
line-height:20px;
text-decoration:none;
font-family: Lucida Console;
padding-left:2px;
}
#ClientList_Block_PC a{
background-color:#EFEFEF;
color:#FFF;
font-size:12px;
font-family:Arial, Helvetica, sans-serif;
text-decoration:none;
}
#ClientList_Block_PC div:hover, #ClientList_Block a:hover {
background-color:#3366FF;
color:#FFFFFF;
cursor:default;
}
.close {
background: red;
color: black;
border-radius: 12px;
line-height: 18px;
text-align: center;
height: 18px;
width: 18px;
font-size: 16px;
padding: 1px;
top: -10px;
right: -10px;
position: absolute;
}
/* use cross as close button */
.close::before {
content: "\2716";
}
.contentM_qis {
position: fixed;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius:10px;
z-index: 10;
background-color:#2B373B;
margin-left: -100px;
top: 10px;
width:720px;
return height:auto;
box-shadow: 3px 3px 10px #000;
background: rgba(0,0,0,0.85);
display:none;
}
.user_title{
text-align:center;
font-size:18px;
color:#99FF00;
padding:10px;
font-weight:bold;
}
.frpc_btn {
border: 1px solid #222;
background: linear-gradient(to bottom, #003333 0%, #000000 100%); /* W3C */
font-size:10pt;
color: #fff;
padding: 5px 5px;
border-radius: 5px 5px 5px 5px;
width:16%;
}
.frpc_btn:hover {
border: 1px solid #222;
background: linear-gradient(to bottom, #27c9c9 0%, #279fd9 100%); /* W3C */
font-size:10pt;
color: #fff;
padding: 5px 5px;
border-radius: 5px 5px 5px 5px;
width:16%;
}
input[type=button]:focus {
outline: none;
}
</style>
<link rel="stylesheet" type="text/css" href="usp_style.css"/>
<script type="text/javascript" src="/state.js"></script>
<script type="text/javascript" src="/popup.js"></script>
<script type="text/javascript" src="/help.js"></script>
<script type="text/javascript" src="/validator.js"></script>
<script type="text/javascript" src="/js/jquery.js"></script>
<script type="text/javascript" src="/calendar/jquery-ui.js"></script>
<script type="text/javascript" src="/general.js"></script>
<script type="text/javascript" src="/switcherplugin/jquery.iphone-switch.js"></script>
<script type="text/javascript" src="/dbconf?p=frps&v=<% uptime(); %>"></script>
<script type="text/javascript" src="/res/frps-menu.js"></script>
<script>
var $j = jQuery.noConflict();
var $G = function(id) {
return document.getElementById(id);
};
function initial(){
show_menu(menu_hook);
get_status();
conf2obj();
version_show();
buildswitch();
toggle_switch();
}
function get_status() {
$j.ajax({
url: 'apply.cgi?current_page=Module_frps.asp&next_page=Module_frps.asp&group_id=&modified=0&action_mode=+Refresh+&action_script=frps_status.sh&action_wait=&first_time=&preferred_lang=CN',
dataType: 'html',
error: function(xhr) {
alert("error");
},
success: function(response) {
//alert("success");
setTimeout("check_FRPS_status();", 1000);
}
});
}
var noChange_status=0;
var _responseLen;
function check_FRPS_status(){
$j.ajax({
url: '/res/frps_check.html',
dataType: 'html',
error: function(xhr){
setTimeout("check_FRPS_status();", 1000);
},
success: function(response){
var _cmdBtn = document.getElementById("cmdBtn");
if(response.search("XU6J03M6") != -1){
frps_status = response.replace("XU6J03M6", " ");
//alert(frpc_status);
document.getElementById("status").innerHTML = frps_status;
return true;
}
if(_responseLen == response.length){
noChange_status++;
}else{
noChange_status = 0;
}
if(noChange_status > 100){
noChange_status = 0;
//refreshpage();
}else{
setTimeout("check_FRPS_status();", 400);
}
_responseLen = response.length;
}
});
}
function toggle_switch(){ //根据frps_enable的值打开或者关闭开关
var rrt = document.getElementById("switch");
if (document.form.frps_enable.value != "1") {
rrt.checked = false;
} else {
rrt.checked = true;
}
}
function buildswitch(){ //生成开关的功能checked为开启此时传递frps_enable=1
$j("#switch").click(
function(){
if(document.getElementById('switch').checked){
document.form.frps_enable.value = 1;
}else{
document.form.frps_enable.value = 0;
}
});
}
function conf2obj(){ //表单填写函数将dbus数据填入到对应的表单中
for (var field in db_frps) {
$j('#'+field).val(db_frps[field]);
}
}
function validForm(){
return true;
}
function pass_checked(obj){
switchType(obj, document.form.show_pass.checked, true);
}
function onSubmitCtrl(o, s) { //提交操作提交时运行config-frps.sh显示5秒的载入画面
var _form = document.form;
if(trim(_form.frps_common_dashboard_port.value)=="" || trim(_form.frps_common_dashboard_user.value)=="" || trim(_form.frps_common_dashboard_pwd.value)=="" || trim(_form.frps_common_bind_port.value)=="" || trim(_form.frps_common_privilege_token.value)=="" || trim(_form.frps_common_vhost_http_port.value)=="" || trim(_form.frps_common_vhost_https_port.value)=="" || trim(_form.frps_common_max_pool_count.value)=="" || trim(_form.frps_common_cron_time.value)==""){
alert("提交的表单不能为空!");
return false;
}
document.form.action_mode.value = s;
document.form.action_script.value = "config-frps.sh";
document.form.submit();
showLoading(5);
}
function done_validating(action) { //提交操作5秒后刷洗网页
refreshpage(5);
}
function reload_Soft_Center(){ //返回软件中心按钮
location.href = "/Main_Soft_center.asp";
}
function menu_hook(title, tab) {
var enable_ss = "<% nvram_get("enable_ss"); %>";
var enable_soft = "<% nvram_get("enable_soft"); %>";
if(enable_ss == "1" && enable_soft == "1"){
tabtitle[tabtitle.length -2] = new Array("", "Frps 内网穿透");
tablink[tablink.length -2] = new Array("", "Module_frps.asp");
}else{
tabtitle[tabtitle.length -1] = new Array("", "Frps 内网穿透");
tablink[tablink.length -1] = new Array("", "Module_frps.asp");
}
}
function version_show(){
$j.ajax({
url: 'http://sc.paldier.com/frps/config.json.js',
type: 'GET',
dataType: 'jsonp',
success: function(res) {
if(typeof(res["version"]) != "undefined" && res["version"].length > 0) {
if(res["version"] == db_frps["frps_version"]){
$j("#frps_version_show").html("<i>插件版本:" + res["version"]);
}else if(res["version"] > db_frpc["frps_version"]) {
$j("#frps_version_show").html("<font color=\"#66FF66\">有新版本:</font>" + res.version);
}
}
}
});
}
</script>
</head>
<body onload="initial();">
<div id="TopBanner"></div>
<div id="Loading" class="popup_bg"></div>
<iframe name="hidden_frame" id="hidden_frame" src="" width="0" height="0" frameborder="0"></iframe>
<form method="POST" name="form" action="/applydb.cgi?p=frps" target="hidden_frame">
<input type="hidden" name="current_page" value="Module_frps.asp"/>
<input type="hidden" name="next_page" value="Main_frps.asp"/>
<input type="hidden" name="group_id" value=""/>
<input type="hidden" name="modified" value="0"/>
<input type="hidden" name="action_mode" value=""/>
<input type="hidden" name="action_script" value=""/>
<input type="hidden" name="action_wait" value="5"/>
<input type="hidden" name="first_time" value=""/>
<input type="hidden" name="preferred_lang" id="preferred_lang" value="<% nvram_get("preferred_lang"); %>"/>
<input type="hidden" name="firmver" value="<% nvram_get("firmver"); %>"/>
<input type="hidden" id="frps_enable" name="frps_enable" value='<% dbus_get_def("frps_enable", "0"); %>'/>
<table class="content" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="17">&nbsp;</td>
<td valign="top" width="202">
<div id="mainMenu"></div>
<div id="subMenu"></div>
</td>
<td valign="top">
<div id="tabMenu" class="submenuBlock"></div>
<table width="98%" border="0" align="left" cellpadding="0" cellspacing="0">
<tr>
<td align="left" valign="top">
<table width="760px" border="0" cellpadding="5" cellspacing="0" bordercolor="#6b8fa3" class="FormTitle" id="FormTitle">
<tr>
<td bgcolor="#4D595D" colspan="3" valign="top">
<div>&nbsp;</div>
<div style="float:left;" class="formfonttitle">软件中心 - Frps内网穿透</div>
<div style="float:right; width:15px; height:25px;margin-top:10px"><img id="return_btn" onclick="reload_Soft_Center();" align="right" style="cursor:pointer;position:absolute;margin-left:-30px;margin-top:-25px;" title="返回软件中心" src="/images/backprev.png" onMouseOver="this.src='/images/backprevclick.png'" onMouseOut="this.src='/images/backprev.png'"></img></div>
<div style="margin-left:5px;margin-top:10px;margin-bottom:10px"><img src="/images/New_ui/export/line_export.png"/></div>
<div class="formfontdesc" id="cmdDesc"><i>* 为了Frps稳定运行请开启虚拟内存功能</i>&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://koolshare.cn/thread-65379-1-1.html" target="_blank"><i>服务器搭建教程</i></a></div>
<table width="100%" border="1" align="center" cellpadding="4" cellspacing="0" bordercolor="#6b8fa3" class="FormTable">
<tr id="switch_tr">
<th>
<label><a class="hintstyle" href="javascript:void(0);" onclick="openssHint(0)">开启Frps</a></label>
</th>
<td colspan="2">
<div class="switch_field" style="display:table-cell;float: left;">
<label for="switch">
<input id="switch" class="switch" type="checkbox" style="display: none;">
<div class="switch_container" >
<div class="switch_bar"></div>
<div class="switch_circle transition_style">
<div></div>
</div>
</div>
</label>
</div>
<span style="margin-left: 300px;"><a href="https://raw.githubusercontent.com/koolshare/merlin_frps/master/Changelog.txt" target="_blank"><em><u>[ 更新日志 ]</u></em></a></span>
</td>
</tr>
</table>
<table width="100%" border="1" align="center" cellpadding="4" cellspacing="0" bordercolor="#6b8fa3" class="FormTable" style="margin-top:8px;">
<thead>
<tr>
<td colspan="2">Frps 相关设置</td>
</tr>
</thead>
<th style="width:25%;">版本信息</th>
<td>
<div id="frps_version_show" style="padding-top:5px;margin-left:0px;margin-top:0px;float: left;"><i>插件版本:<% dbus_get_def("frps_version", "未知"); %></i></div>
<div id="frps_status" style="padding-top:5px;margin-left:50px;margin-top:0px;float: left;"><i><span id="status">获取中...</span></i></div>
</td>
<tr>
<th width="20%"><a class="hintstyle" href="javascript:void(0);" onclick="openssHint(1)">Dashboard port</a></th>
<td>
<input type="text" class="input_ss_table" value="" id="frps_common_dashboard_port" name="frps_common_dashboard_port" maxlength="5" value="" placeholder=""/>
</td>
</tr>
<tr>
<th width="20%"><a class="hintstyle" href="javascript:void(0);" onclick="openssHint(11)">Dashboard User</a></th>
<td>
<input type="text" class="input_ss_table" id="frps_common_dashboard_user" name="frps_common_dashboard_user" maxlength="50" value="" />
</td>
</tr>
<tr>
<th width="20%"><a class="hintstyle" href="javascript:void(0);" onclick="openssHint(3)">Dashboard Pass</a></th>
<td>
<input type="password" name="frps_common_dashboard_pwd" id="frps_common_dashboard_pwd" class="input_ss_table" autocomplete="new-password" autocorrect="off" autocapitalize="off" maxlength="256" value="" onBlur="switchType(this, false);" onFocus="switchType(this, true);"/>
</td>
</tr>
<tr>
<th width="20%"><a class="hintstyle" href="javascript:void(0);" onclick="openssHint(2)">Bind port</a></th>
<td>
<input type="text" class="input_ss_table" id="frps_common_bind_port" name="frps_common_bind_port" maxlength="5" value="" />
</td>
</tr>
<tr>
<th width="20%"><a class="hintstyle" href="javascript:void(0);" onclick="openssHint(3)">Privilege Token</a></th>
<td>
<input type="password" name="frps_common_privilege_token" id="frps_common_privilege_token" class="input_ss_table" autocomplete="new-password" autocorrect="off" autocapitalize="off" maxlength="256" value="" onBlur="switchType(this, false);" onFocus="switchType(this, true);"/>
</td>
</tr>
<tr>
<th width="20%"><a class="hintstyle" href="javascript:void(0);" onclick="openssHint(4)">vhost http port</a></th>
<td>
<input type="text" class="input_ss_table" id="frps_common_vhost_http_port" name="frps_common_vhost_http_port" maxlength="6" value="" />
</td>
</tr>
<tr>
<th width="20%"><a class="hintstyle" href="javascript:void(0);" onclick="openssHint(5)">vhost https port</a></th>
<td>
<input type="text" class="input_ss_table" id="frps_common_vhost_https_port" name="frps_common_vhost_https_port" maxlength="6" value="" />
</td>
</tr>
<tr>
<th width="20%"><a class="hintstyle" href="javascript:void(0);" onclick="openssHint(13)">TCP 多路复用</a></th>
<td>
<select id="frps_common_tcp_mux" name="frps_common_tcp_mux" style="width:165px;margin:0px 0px 0px 2px;" class="input_option" >
<option value="true">开启</option>
<option value="false">关闭</option>
</select>
</td>
</tr>
<tr>
<th width="20%"><a class="hintstyle" href="javascript:void(0);" onclick="openssHint(6)">日志记录</a></th>
<td>
<select id="frps_common_log_file" name="frps_common_log_file" style="width:165px;margin:0px 0px 0px 2px;" class="input_option" >
<option value="/tmp/frps.log">开启</option>
<option value="/dev/null">关闭</option>
</select>
</td>
</tr>
<tr>
<th width="20%"><a class="hintstyle" href="javascript:void(0);" onclick="openssHint(7)">日志等级</a></th>
<td>
<select id="frps_common_log_level" name="frps_common_log_level" style="width:165px;margin:0px 0px 0px 2px;" class="input_option" >
<option value="info">info</option>
<option value="warn">warn</option>
<option value="error">error</option>
<option value="debug">debug</option>
</select>
</td>
</tr>
<tr>
<th width="20%"><a class="hintstyle" href="javascript:void(0);" onclick="openssHint(8)">日志记录天数</a></th>
<td>
<select id="frps_common_log_max_days" name="frps_common_log_max_days" style="width:165px;margin:0px 0px 0px 2px;" class="input_option" >
<option value="1">1</option>
<option value="2">2</option>
<option value="3" selected="selected">3</option>
<option value="4">4</option>
<option value="5">6</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="30">30</option>
</select>
</td>
</tr>
<tr>
<th width="20%"><a class="hintstyle" href="javascript:void(0);" onclick="openssHint(9)">max pool count</a></th>
<td>
<select id="frps_common_max_pool_count" name="frps_common_max_pool_count" style="width:60px;margin:3px 2px 0px 2px;" class="input_option">
<option value="10">10</option>
<option value="20">20</option>
<option value="30">30</option>
<option value="40">40</option>
<option value="50" selected="selected">50</option>
<option value="60">60</option>
<option value="70">70</option>
<option value="80">80</option>
<option value="90">90</option>
<option value="100">100</option>
<option value="150">150</option>
<option value="200">200</option>
</select>
</td>
</tr>
<tr>
<th width="20%"><a class="hintstyle" href="javascript:void(0);" onclick="openssHint(10)">定时注册服务</a>(<i>0为关闭</i>)</th>
<td>
每 <input type="text" id="frps_common_cron_time" name="frps_common_cron_time" class="input_3_table" maxlength="2" value="30" placeholder="" />
<select id="frps_common_cron_hour_min" name="frps_common_cron_hour_min" style="width:60px;margin:3px 2px 0px 2px;" class="input_option">
<option value="min" selected="selected">分钟</option>
<option value="hour">小时</option>
</select> 重新注册一次服务
</td>
</tr>
</table>
<div class="formfontdesc" id="cmdDesc">
<i>* 注意事项:</i><br>
<i>1. 请使用虚拟内存!请使用虚拟内存!请使用虚拟内存!重要的事说三遍</i><br>
<i>2. 上面所有内容都为必填项,请认真填写,不然无法穿透。</i><br>
<i>3. 每一个文字都可以点击查看相应的帮助信息。</i><br>
</div>
<div class="apply_gen">
<span><input class="button_gen_long" id="cmdBtn" onclick="onSubmitCtrl(this, ' Refresh ')" type="button" value="提交"/></span>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!--===================================Ending of Main Content===========================================-->
</td>
<td width="10" align="center" valign="top"></td>
</tr>
</table>
</form>
<div id="footer"></div>
</body>
<script type="text/javascript">
<!--[if !IE]>-->
(function($){
var i = 0;
})(jQuery);
<!--<![endif]-->
</script>
</html>

Binary file not shown.

1
frps/history/version Normal file
View File

@ -0,0 +1 @@
1.4.16 f2c5e1d30873e21aca2e28f5a10d52f6

2
frps/version Normal file
View File

@ -0,0 +1,2 @@
1.4.16
7fac5d6a5a6a0b1be355c21ea29f6251

View File

@ -70,6 +70,16 @@
"title": "Aria2",
"version": "2.4"
},
{
"build_date": "2019-01-16_20:01:32",
"description": "内网穿透利器,谁用谁知道。",
"home_url": "Module_frpc.asp",
"md5": "6ad0d26c66249eb415af1f9c72a8e986",
"name": "frpc",
"tar_url": "frpc/frpc.tar.gz",
"title": "frpc穿透",
"version": "2.1.15"
},
{
"build_date": "2019-01-13_19:04:43",
"description": "kms",
@ -80,6 +90,16 @@
"title": "kms",
"version": "1.5"
},
{
"build_date": "2019-01-16_20:13:34",
"description": "内网穿透利器,谁用谁知道。",
"home_url": "Module_frps.asp",
"md5": "7fac5d6a5a6a0b1be355c21ea29f6251",
"name": "frps",
"tar_url": "frps/frps.tar.gz",
"title": "frps穿透",
"version": "1.4.16"
},
{
"build_date": "2019-01-12_22:19:14",
"description": "阿里云解析自动更新IP",