This commit is contained in:
paldier 2019-03-13 22:12:46 +08:00
parent db1782b147
commit 7df1a587fa
37 changed files with 502 additions and 138 deletions

Binary file not shown.

View File

@ -8,17 +8,109 @@
<link rel="shortcut icon" href="images/favicon.png"/>
<link rel="icon" href="images/favicon.png"/>
<title>Aliddns</title>
<link rel="stylesheet" type="text/css" href="ParentalControl.css">
<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="usp_style.css"/>
<link rel="stylesheet" type="text/css" href="css/element.css">
<script type="text/javascript" src="/js/jquery.js"></script>
<script src="/state.js"></script>
<script src="/help.js"></script>
<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="/general.js"></script>
<script type="text/javascript" src="/client_function.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="/dbconf?p=aliddns&v=<% uptime(); %>"></script>
<style>
</style>
<script>
function initial() {
show_menu(menu_hook);
var enable ="<% dbus_get_def("aliddns_enable", "0"); %>";
$('#switch').prop('checked', enable === "1");
buildswitch();
update_visibility();
}
function applyRule() {
var posting = false;
var inputs = ['ak', 'sk', 'name', 'domain', 'interval', 'dns', 'curl', 'ttl'];
if(posting) return;
posting = true; // save
var data = {
aliddns_enable: $('#switch').prop('checked') | 0,
action_mode: ' Refresh ',
current_page: 'Module_aliddns.asp',
next_page: 'Module_aliddns.asp',
action_script: 'aliddns_config.sh'
};
for(var i = 0; i< inputs.length; i++) {
var key = 'aliddns_' + inputs[i];
data['aliddns_' + inputs[i]] = $('#aliddns_' + inputs[i]).val()
}
$.ajax({
type: 'POST',
url: 'applydb.cgi?p=aliddns_',
data: $.param(data)
}).then(function () {
posting = false;
alert('saved');
}, function () {
posting = false;
alert('failed');
})
}
function menu_hook(title, tab) {
tabtitle[tabtitle.length -1] = new Array("", "软件中心", "离线安装", "Aliddns");
tablink[tablink.length -1] = new Array("", "Main_Soft_center.asp", "Main_Soft_setting.asp", "Module_aliddns.asp");
}
function reload_Soft_Center(){
location.href = "/Main_Soft_center.asp";
}
function buildswitch(){
$("#switch").click(
function(){
update_visibility();
});
}
function update_visibility(){
if(document.getElementById('switch').checked){
document.getElementById("last_act_tr").style.display = "";
document.getElementById("ak_tr").style.display = "";
document.getElementById("sk_tr").style.display = "";
document.getElementById("interval_tr").style.display = "";
document.getElementById("name_tr").style.display = "";
document.getElementById("dns_tr").style.display = "";
document.getElementById("curl_tr").style.display = "";
document.getElementById("ttl_tr").style.display = "";
}else{
document.getElementById("last_act_tr").style.display = "none";
document.getElementById("ak_tr").style.display = "none";
document.getElementById("sk_tr").style.display = "none";
document.getElementById("interval_tr").style.display = "none";
document.getElementById("name_tr").style.display = "none";
document.getElementById("dns_tr").style.display = "none";
document.getElementById("curl_tr").style.display = "none";
document.getElementById("ttl_tr").style.display = "none";
}
}
</script>
</head>
<body>
<body onload="initial();" onunload="unload_body();" onselectstart="return false;">
<div id="TopBanner"></div>
<div id="Loading" class="popup_bg"></div>
<iframe name="hidden_frame" id="hidden_frame" width="0" height="0" frameborder="0"></iframe>
<form method="post" name="form" action="/applydb.cgi?p=aliddns" target="hidden_frame">
<input type="hidden" name="productid" value="<% nvram_get("productid"); %>">
<input type="hidden" name="preferred_lang" id="preferred_lang" value="<% nvram_get("preferred_lang"); %>" disabled>
<input type="hidden" name="firmver" value="<% nvram_get("firmver"); %>">
<input type="hidden" name="aliddns_enable" value="<% dbus_get_def("aliddns_enable", "0"); %>">
<table class="content" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="17">&nbsp;</td>
@ -107,7 +199,7 @@
</tr>
</table>
<div class="apply_gen">
<input class="button_gen" type="button" value="提交">
<input class="button_gen" onclick="applyRule()" type="button" value="应用设置"/>
</div>
<div style="margin-left:5px;margin-top:10px;margin-bottom:10px"><img src="/images/New_ui/export/line_export.png"/></div>
<div class="KoolshareBottom" style="margin-top:540px;">
@ -127,83 +219,5 @@
</tr>
</table>
<div id="footer"></div>
<script>
$(function () {
show_menu(menu_hook);
var enable = "<% dbus_get_def("aliddns_enable", "0"); %>";
$('#switch').prop('checked', enable === "1");
buildswitch();
update_visibility();
var posting = false;
var inputs = ['ak', 'sk', 'name', 'domain', 'interval', 'dns', 'curl', 'ttl'];
$('.button_gen').click(function () {
if(posting) return;
posting = true; // save
var data = {
aliddns_enable: $('#switch').prop('checked') | 0,
action_mode: ' Refresh ',
current_page: 'Module_aliddns.asp',
next_page: 'Module_aliddns.asp',
SystemCmd: 'aliddns_config.sh'
};
for(var i = 0; i< inputs.length; i++) {
var key = 'aliddns_' + inputs[i];
data['aliddns_' + inputs[i]] = $('#aliddns_' + inputs[i]).val()
}
$.ajax({
type: 'POST',
url: 'applydb.cgi?p=aliddns_',
data: $.param(data)
}).then(function () {
posting = false;
alert('saved');
}, function () {
posting = false;
alert('failed');
})
})
})
function menu_hook(title, tab) {
tabtitle[tabtitle.length -1] = new Array("", "软件中心", "离线安装", "Aliddns");
tablink[tablink.length -1] = new Array("", "Main_Soft_center.asp", "Main_Soft_setting.asp", "Module_aliddns.asp");
}
function reload_Soft_Center(){
location.href = "/Main_Soft_center.asp";
}
function buildswitch(){
$("#switch").click(
function(){
update_visibility();
});
}
function update_visibility(){
if(document.getElementById('switch').checked){
document.getElementById("last_act_tr").style.display = "";
document.getElementById("ak_tr").style.display = "";
document.getElementById("sk_tr").style.display = "";
document.getElementById("interval_tr").style.display = "";
document.getElementById("name_tr").style.display = "";
document.getElementById("dns_tr").style.display = "";
document.getElementById("curl_tr").style.display = "";
document.getElementById("ttl_tr").style.display = "";
}else{
document.getElementById("last_act_tr").style.display = "none";
document.getElementById("ak_tr").style.display = "none";
document.getElementById("sk_tr").style.display = "none";
document.getElementById("interval_tr").style.display = "none";
document.getElementById("name_tr").style.display = "none";
document.getElementById("dns_tr").style.display = "none";
document.getElementById("curl_tr").style.display = "none";
document.getElementById("ttl_tr").style.display = "none";
}
}
</script>
</body>
</html>

View File

@ -1,8 +1,8 @@
{
"version":"1.2",
"md5":"b775cde3f6f8f552f28c59e8d2d95bc1",
"md5":"15afe00f95c31fdee8ae7a0ada6518ea",
"home_url":"Module_aliddns.asp",
"title":"aliddns",
"description":"阿里云解析自动更新IP",
"build_date":"2019-01-12_22:19:14"
"build_date":"2019-03-12_21:19:57"
}

View File

@ -1,2 +1,2 @@
1.2
b775cde3f6f8f552f28c59e8d2d95bc1
15afe00f95c31fdee8ae7a0ada6518ea

View File

@ -16,7 +16,7 @@ cp -rf /tmp/dc1svr/res/* /jffs/softcenter/res/
# delete install tar
rm -rf /tmp/dc1svr* >/dev/null 2>&1
chmod a+x /jffs/softcenter/scripts/dc1.sh
chmod a+x /jffs/softcenter/scripts/dc1svr.sh
chmod 0755 /jffs/softcenter/bin/dc1svr
dbus set dc1svr_version="1.1"
dbus set softcenter_module_dc1svr_version="1.0"

View File

@ -66,12 +66,11 @@
url: 'https://raw.githubusercontent.com/paldier/softcenter/master/dc1svr/config.json.js',
type: 'GET',
success: function(res) {
var txt = $j(res.responseText).text();
if(typeof(txt) != "undefined" && txt.length > 0) {
//console.log(txt);
var obj = $j.parseJSON(txt.replace("'", "\""));
$j("#dc1svr_version_status").html("<i>当前版本:" + obj.version);
if(obj.version != db_dc1svr_["dc1svr_version"]) {
if(obj.version != db_dc1svr_['dc1svr_version']) {
$j("#dc1svr_version_status").html("<i>有新版本:" + obj.version);
}
}
@ -148,8 +147,7 @@
</div>
<div id="dc1svr_version_show" style="padding-top:5px;margin-left:230px;margin-top:0px;"><i>当前版本:<% dbus_get_def("dc1svr_version", "未知"); %></i>
</div>
<div id="dc1svr_install_show" style="padding-top:5px;margin-left:330px;margin-top:-25px;"></div>
<a style="margin-left: 318px;" href="https://raw.githubusercontent.com/paldier/softcenter/master/dc1svr/Changelog.txt" target="_blank"><em>[<u> 更新日志 </u>]</em></a>
<div id="dc1svr_version_status" style="padding-top:5px;margin-left:330px;margin-top:-25px;"></div>
</td>
</tr>
<tr id="key_tr">

View File

@ -2,7 +2,7 @@
MODULE=kms
VERSION=1.5
VERSION=1.6.1
TITLE=kms
DESCRIPTION=kms
HOME_URL=Module_kms.asp

View File

@ -1,8 +1,8 @@
{
"version":"1.5",
"md5":"963a0702e0e37aa67a64c674544f30a6",
"version":"1.6.1",
"md5":"350c920ca9d060b2bd86885fb4c37b16",
"home_url":"Module_kms.asp",
"title":"kms",
"description":"kms",
"build_date":"2019-01-13_19:04:43"
"build_date":"2019-03-12_22:24:36"
}

Binary file not shown.

View File

@ -52,8 +52,7 @@
});
}
function onSubmitCtrl(o, s) {
document.form.action_mode.value = s;
function onSubmitCtrl() {
showLoading(3);
document.form.submit();
}
@ -68,7 +67,6 @@
url: 'https://raw.githubusercontent.com/paldier/softcenter/master/kms/config.json.js',
type: 'GET',
success: function(res) {
var txt = $j(res.responseText).text();
if(typeof(txt) != "undefined" && txt.length > 0) {
//console.log(txt);
var obj = $j.parseJSON(txt.replace("'", "\""));
@ -81,8 +79,6 @@
});
}
var enable_ss = "<% nvram_get("enable_ss"); %>";
var enable_soft = "<% nvram_get("enable_soft"); %>";
function menu_hook(title, tab) {
tabtitle[tabtitle.length -1] = new Array("", "软件中心", "离线安装", "KMS");
tablink[tablink.length -1] = new Array("", "Main_Soft_center.asp", "Main_Soft_setting.asp", "Module_kms.asp");
@ -98,7 +94,7 @@
<input type="hidden" name="next_page" value="Module_kms.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_mode" value=" Refresh " />
<input type="hidden" name="action_script" value="kms.sh" />
<input type="hidden" name="action_wait" value="5" />
<input type="hidden" name="first_time" value="" />
@ -152,7 +148,7 @@
</div>
<div id="kms_version_show" style="padding-top:5px;margin-left:230px;margin-top:0px;"><i>当前版本:<% dbus_get_def("kms_version", "未知"); %></i>
</div>
<div id="kms_install_show" style="padding-top:5px;margin-left:330px;margin-top:-25px;"></div>
<div id="kms_version_status" style="padding-top:5px;margin-left:330px;margin-top:-25px;"></div>
<a style="margin-left: 318px;" href="https://raw.githubusercontent.com/paldier/softcenter/master/kms/Changelog.txt" target="_blank"><em>[<u> 更新日志 </u>]</em></a>
</td>
</tr>

View File

@ -1,2 +1,2 @@
1.5
963a0702e0e37aa67a64c674544f30a6
1.6.1
350c920ca9d060b2bd86885fb4c37b16

View File

@ -1,8 +1,8 @@
{
"version":"4.1.7",
"md5":"e385009a9ab5998e14ba6dc8b58a1a20",
"md5":"788b5477ee258af4e7303d8e3b40b912",
"home_url":"Main_Ss_Content.asp",
"title":"科学上网",
"description":"科学上网",
"build_date":"2019-01-27_22:50:42"
"build_date":"2019-03-11_23:33:28"
}

Binary file not shown.

View File

@ -1,2 +1,2 @@
4.1.7
e385009a9ab5998e14ba6dc8b58a1a20
788b5477ee258af4e7303d8e3b40b912

11
shellinabox/Changelog.txt Normal file
View File

@ -0,0 +1,11 @@
Koolshare Asuswrt-Merlin adm Changelog
===========================================
1.1
- fix fix wan access
1.1
- change change redirection
1.0
- add add shellinabox

24
shellinabox/backup.sh Executable file
View File

@ -0,0 +1,24 @@
#! /bin/sh
# you can do something here
# this shell scripts will run at the end of build.py scripts
tar_name="$1.tar.gz"
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`
md5_new=` md5sum $tar_name | awk '{print $1}'`
if [ -f ./$tar_name ];then
if [ "$version_old" != "$version_new" ];then
mkdir ./history/$version_new/
cp ./$tar_name ./history/$version_new/
echo $version_new $md5_new >> ./history/version
fi
fi

23
shellinabox/build.sh Executable file
View File

@ -0,0 +1,23 @@
#!/bin/sh
MODULE=shellinabox
VERSION="2.0"
TITLE=shellinabox
DESCRIPTION=超强的SSH网页客户端~
HOME_URL=Module_shellinabox.asp
# Check and include base
DIR="$( cd "$( dirname "$BASH_SOURCE[0]" )" && pwd )"
# now include build_base.sh
. $DIR/../softcenter/build_base.sh
# change to module directory
cd $DIR
# do something here
do_build_result
# now backup
sh backup.sh $MODULE

View File

@ -0,0 +1,8 @@
{
"version":"2.0",
"md5":"e9eea13a1762f8a08795b396fa586736",
"home_url":"Module_shellinabox.asp",
"title":"shellinabox",
"description":"超强的SSH网页客户端~",
"build_date":"2019-03-12_12:30:05"
}

Binary file not shown.

View File

@ -0,0 +1 @@
2.0 c0bcf36273926e7de6705995e57f409a

Binary file not shown.

View File

@ -0,0 +1,12 @@
#! /bin/sh
cp -rf /tmp/shellinabox/shellinabox /jffs/softcenter/
cp -rf /tmp/shellinabox/scripts/* /jffs/softcenter/scripts/
cp -rf /tmp/shellinabox/res/* /jffs/softcenter/res/
cp -rf /tmp/shellinabox/webs/* /jffs/softcenter/webs
chmod 755 /jffs/softcenter/shellinabox/*
chmod 755 /jffs/softcenter/scripts/shellinabox_start.sh
killall shellinaboxd
sleep 1
rm -rf /tmp/shellinabox*

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

View File

@ -0,0 +1,35 @@
#!/bin/sh
eval `dbus export webshell_`
source /jffs/softcenter/scripts/base.sh
stop() {
killall -9 shellinaboxd
iptables -D INPUT -p tcp --dport 4200 -j ACCEPT
echo "webshell已关闭。">> /tmp/webshell.log
[ -e "/jffs/softcenter/init.d/S96webshell.sh" ] && rm -rf /jffs/softcenter/init.d/S96webshell.sh
}
start() {
#不重复启动
icount=`ps -w|grep shellinaboxd|grep -v grep|wc -l`
if [ $icount != 0 ] ;then
stop
sleep 2
fi
/usr/sbin/webshell/shellinaboxd --css=/usr/sbin/webshell/white-on-black.css --service=/:LOGIN -b --disable-ssl
iptables -I INPUT -p tcp --dport 4200 -j ACCEPT
#这里有个bug系统启动时wan还没有上线所以wan的端口是没有打开的
echo "webshell已启动。">> /tmp/webshell.log
[ ! -e "/jffs/softcenter/init.d/S96webshell.sh" ] && cp -rf /jffs/softcenter/scripts/shellinabox_start.sh /jffs/softcenter/init.d/S96webshell.sh
}
restart() {
stop
sleep 1
if [ "$webshell_enable" == "1" ] ;then
start
fi
}
restart

Binary file not shown.

View File

@ -0,0 +1,64 @@
#vt100 #cursor.bright {
background-color: white;
color: black;
}
#vt100 #cursor.dim {
background-color: black;
opacity: 0.2;
-moz-opacity: 0.2;
filter: alpha(opacity=20);
}
#vt100 #scrollable {
font-size: 13px;
color: #ffffff;
background-color: #2B373B;
}
#vt100 #scrollable.inverted {
font-size: 13px;
color: #2B373B;
background-color: #ffffff;
}
#vt100 .ansiDef {
font-size: 13px;
color: #ffffFf;
}
#vt100 .ansiDefR {
font-size: 13px;
color: #2B373B;
}
#vt100 .bgAnsiDef {
font-size: 13px;
background-color: #2B373B;
}
#vt100 .bgAnsiDefR {
font-size: 13px;
background-color: #ffffFf;
}
#vt100 #scrollable.inverted .ansiDef {
font-size: 13px;
color: #2B373B;
}
#vt100 #scrollable.inverted .ansiDefR {
font-size: 13px;
color: #ffffFf;
}
#vt100 #scrollable.inverted .bgAnsiDef {
font-size: 13px;
background-color: #ffffFf;
}
#vt100 #scrollable.inverted .bgAnsiDefR {
font-size: 13px;
background-color: #2B373B;
}

View File

@ -0,0 +1,166 @@
<!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">
<html xmlns:v>
<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">
<title id="web_title"><#587#> - webshell</title>
<link rel="shortcut icon" href="images/favicon.png">
<link rel="icon" href="images/favicon.png">
<link rel="stylesheet" type="text/css" href="ParentalControl.css">
<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="usp_style.css">
<link rel="stylesheet" type="text/css" href="/calendar/fullcalendar.css">
<link rel="stylesheet" type="text/css" href="/device-map/device-map.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="/general.js"></script>
<script type="text/javascript" src="/client_function.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="/switcherplugin/jquery.iphone-switch.js"></script>
<style>
</style>
<script>
function initial(){
show_menu();
show_footer();
}
function reactive(){
window.open("http://"+window.location.hostname+":4200");
}
function applyRule(_on){
showLoading();
document.form.submit();
}
function reload_Soft_Center() {
location.href = "/Main_Soft_center.asp";
}
</script></head>
<body onload="initial();" onunload="unload_body();" onselectstart="return false;">
<div id="TopBanner"></div>
<div id="Loading" class="popup_bg"></div>
<iframe name="hidden_frame" id="hidden_frame" width="0" height="0" frameborder="0"></iframe>
<form method="post" name="form" action="/applydb?p=webshell" target="hidden_frame">
<input type="hidden" name="productid" value="<% nvram_get("productid"); %>">
<input type="hidden" name="current_page" value="Module_shellinabox.asp">
<input type="hidden" name="next_page" value="Module_shellinabox.asp">
<input type="hidden" name="modified" value="0">
<input type="hidden" name="action_wait" value="">
<input type="hidden" name="action_mode" value="toolscript">
<input type="hidden" name="action_script" value="shellinabox_start.sh">
<input type="hidden" name="preferred_lang" id="preferred_lang" value="<% nvram_get("preferred_lang"); %>" disabled>
<input type="hidden" name="firmver" value="<% nvram_get("firmver"); %>">
<input type="hidden" name="webshell_enable" value="<% dbus_get("webshell_enable"); %>">
<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 valign="top" >
<table width="730px" border="0" cellpadding="4" cellspacing="0" class="FormTitle" id="FormTitle">
<tbody>
<tr>
<td bgcolor="#4D595D" valign="top">
<div>&nbsp;</div>
<div style="margin-top:-5px;">
<table width="730px">
<tr>
<td align="left" >
<div id="content_title" class="formfonttitle" style="width:400px">WebShell</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>
</td>
</tr>
</table>
<div style="margin:0px 0px 10px 5px;"><img src="/images/New_ui/export/line_export.png"></div>
</div>
<div id="PC_desc">
<table width="700px" style="margin-left:25px;">
<tr>
<td>
<div id="guest_image" style="background: url(images/New_ui/webshell.png);width: 100px;height: 87px;"></div>
</td>
<td>&nbsp;&nbsp;</td>
<td style="font-style: italic;font-size: 14px;">
<span id="desc_title">使用简介:</span>
<ol>
<li>webshell可以使你在web页面进行命令行管理</li>
<li>登录名和密码与web一致</li>
<li>你可以在此开启webshell后点击“打开窗口”按钮来使用</li>
</ol>
<span id="desc_note" style="color:#FC0;">提示:</span>
<ol style="color:#FC0;margin:-5px 0px 3px -18px;*margin-left:18px;">
<li>webshell使用的端口号为4200</li> </ol>
</td>
</tr>
</table>
</div>
<div id="edit_time_anchor"></div>
<table width="100%" border="1" align="center" cellpadding="4" cellspacing="0" bordercolor="#6b8fa3" class="FormTable">
<thead><tr>
<td colspan="2" >服务信息</td>
</tr></thead>
<tr>
<th id="PC_enable">启用WebShell</th>
<td>
<div align="center" class="left" style="width:94px; float:left; cursor:pointer;" id="radio_xunlei_enable"></div>
<div class="iphone_switch_container" style="height:32px; width:74px; position: relative; overflow: hidden">
<script type="text/javascript">
$('#radio_xunlei_enable').iphoneSwitch('<% dbus_get("webshell_enable"); %>',
function(){
document.form.webshell_enable.value = 1;
},
function(){
document.form.webshell_enable.value = 0;
}
);
</script>
</div>
</td>
</tr>
<tr>
<th>管理窗口</th>
<td id="webshell_status">
<input class="button_gen" onclick="reactive();" type="button" value="打开窗口"/>
</td>
</tr>
<td colspan="2">日志信息</td>
</tr>
</thead>
<tr><td colspan="2">
<textarea cols="63" rows="20" wrap="off" readonly="readonly" id="textarea" style="width:99%;font-family:Courier New, Courier, mono; font-size:11px;background:#475A5F;color:#FFFFFF;">
<% nvram_dump("webshell.log",""); %>
</textarea>
</td></tr>
</table>
<div class="apply_gen">
<input class="button_gen" onclick="applyRule()" type="button" value="应用设置"/>
</div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</table>
</td>
<td width="10" align="center" valign="top">&nbsp;</td>
</tr>
</table>
<div id="footer"></div>
</form>
</body>
</html>

2
shellinabox/version Normal file
View File

@ -0,0 +1,2 @@
2.0
e9eea13a1762f8a08795b396fa586736

View File

@ -11,15 +11,25 @@
"version": "0.2.3"
},
{
"build_date": "2019-01-27_22:50:42",
"build_date": "2019-03-11_23:33:28",
"description": "科学上网",
"home_url": "Main_Ss_Content.asp",
"md5": "e385009a9ab5998e14ba6dc8b58a1a20",
"md5": "788b5477ee258af4e7303d8e3b40b912",
"name": "shadowsocks",
"tar_url": "shadowsocks/shadowsocks.tar.gz",
"title": "科学上网",
"version": "4.1.7"
},
{
"build_date": "2019-03-12_12:30:05",
"description": "超强的SSH网页客户端~",
"home_url": "Module_shellinabox.asp",
"md5": "e9eea13a1762f8a08795b396fa586736",
"name": "shellinabox",
"tar_url": "shellinabox/shellinabox.tar.gz",
"title": "shellinabox",
"version": "2.0"
},
{
"build_date": "2019-01-13_23:00:27",
"description": "Cloudflare解析自动更新IP",
@ -91,14 +101,14 @@
"version": "2.1"
},
{
"build_date": "2019-01-13_19:04:43",
"build_date": "2019-03-12_22:24:36",
"description": "kms",
"home_url": "Module_kms.asp",
"md5": "963a0702e0e37aa67a64c674544f30a6",
"md5": "350c920ca9d060b2bd86885fb4c37b16",
"name": "kms",
"tar_url": "kms/kms.tar.gz",
"title": "kms",
"version": "1.5"
"version": "1.6.1"
},
{
"build_date": "2019-02-20_23:06:16",
@ -121,10 +131,10 @@
"version": "1.4.16"
},
{
"build_date": "2019-01-12_22:19:14",
"build_date": "2019-03-12_21:19:57",
"description": "阿里云解析自动更新IP",
"home_url": "Module_aliddns.asp",
"md5": "b775cde3f6f8f552f28c59e8d2d95bc1",
"md5": "15afe00f95c31fdee8ae7a0ada6518ea",
"name": "aliddns",
"tar_url": "aliddns/aliddns.tar.gz",
"title": "aliddns",
@ -151,10 +161,10 @@
"version": "0.1.6"
},
{
"build_date": "2019-02-04_20:27:44",
"build_date": "2019-03-13_21:53:27",
"description": "v2ray",
"home_url": "Module_v2ray.asp",
"md5": "72a421802e093e7cc52d89c8e05a5bbf",
"md5": "700544f47fff165b2b6644ec6bd6a84c",
"name": "v2ray",
"tar_url": "v2ray/v2ray.tar.gz",
"title": "v2ray",

View File

@ -1,8 +1,8 @@
{
"version":"4.13.0",
"md5":"72a421802e093e7cc52d89c8e05a5bbf",
"md5":"700544f47fff165b2b6644ec6bd6a84c",
"home_url":"Module_v2ray.asp",
"title":"v2ray",
"description":"v2ray",
"build_date":"2019-02-04_20:27:44"
"build_date":"2019-03-13_21:53:27"
}

Binary file not shown.

View File

@ -1,9 +1,9 @@
#! /bin/sh
cd /tmp
cp -rf /tmp/v2ray/v2ray /jffs/softcenter/bin/
cp -rf /tmp/v2ray/v2ctl /jffs/softcenter/bin/
cp -rf /tmp/v2ray/geosite.dat /jffs/softcenter/bin/
cp -rf /tmp/v2ray/geoip.dat /jffs/softcenter/bin/
cp -rf /tmp/v2ray/bin/v2ray /jffs/softcenter/bin/
cp -rf /tmp/v2ray/bin/v2ctl /jffs/softcenter/bin/
cp -rf /tmp/v2ray/bin/geosite.dat /jffs/softcenter/bin/
cp -rf /tmp/v2ray/bin/geoip.dat /jffs/softcenter/bin/
cp -rf /tmp/v2ray/webs/Module_v2ray.asp /jffs/softcenter/webs/
cp -rf /tmp/v2ray/res/* /jffs/softcenter/res/
cp -rf /tmp/v2ray/scripts/*.sh /jffs/softcenter/scripts/

View File

@ -268,7 +268,7 @@ creat_v2ray_json(){
fi
echo "$(date "+%F %T")测试V2Ray配置文件..... " >> /tmp/v2ray.log
cd /koolshare/bin
cd /jffs/softcenter/bin
result=$(v2ray -test -config="$V2RAY_CONFIG_FILE" | grep "Configuration OK.")
if [ -n "$result" ];then
echo "$(date "+%F %T") $result" >> /tmp/v2ray.log

View File

@ -119,7 +119,7 @@ function update_v2ray_ui(obj) {
el.value = obj[field];
}
}
E("v2ray_json").value = do_js_beautify(Base64.decode(E("v2ray_json").value));
//E("v2ray_json").value = do_js_beautify(Base64.decode(E("v2ray_json").value));
}
function isJSON(str) {
if (typeof str == 'string' && str) {
@ -140,7 +140,7 @@ function isJSON(str) {
function applyRule() {
if (E("v2ray_use_json").checked == true){
if(E('v2ray_json').value.indexOf("vmess://") != -1){
var vmess_node = JSON.parse(Base64.decode(E('v2ray_json').value.split("//")));
var vmess_node = JSON.parse(Base64.decode(E('v2ray_json').value.split("//")[1]));
console.log("use v2ray vmess://");
console.log(vmess_node);
document.form.v2ray_server.value = vmess_node.add;
@ -314,13 +314,13 @@ function verifyFields(r) {
<input type="hidden" name="action_script" value="v2ray_config.sh">
<input type="hidden" name="preferred_lang" id="preferred_lang" value="<% nvram_get("preferred_lang"); %>" disabled>
<input type="hidden" name="firmver" value="<% nvram_get("firmver"); %>">
<input type="hidden" name="v2ray_enable" value="<% dbus_get_def("v2ray_enable", "0"); %>">
<input type="hidden" name="v2ray_udp_enable" value="<% dbus_get_def("v2ray_udp_enable", "0"); %>">
<input type="hidden" name="ss_china_state" value="<% nvram_get("ss_china_state"); %>">
<input type="hidden" name="ss_foreign_state" value="<% nvram_get("ss_foreign_state"); %>">
<input type="hidden" name="v2ray_dns" value="<% dbus_get_def("v2ray_dns", "0"); %>">
<input type="hidden" name="v2ray_use_json" value="<% dbus_get_def("v2ray_use_json", "0"); %>">
<input type="hidden" name="v2ray_json" value="<% dbus_get_def("v2ray_json", ""); %>">
<input type="hidden" name="v2ray_enable" value="<% dbus_get_def('v2ray_enable', '0'); %>">
<input type="hidden" name="v2ray_udp_enable" value="<% dbus_get_def('v2ray_udp_enable', '0'); %>">
<input type="hidden" name="ss_china_state" value="<% nvram_get('ss_china_state'); %>">
<input type="hidden" name="ss_foreign_state" value="<% nvram_get('ss_foreign_state'); %>">
<input type="hidden" name="v2ray_dns" value="<% dbus_get_def('v2ray_dns', '0'); %>">
<input type="hidden" name="v2ray_use_json" value="<% dbus_get_def('v2ray_use_json', '0'); %>">
<input type="hidden" name="v2ray_json" value="<% dbus_get_def('v2ray_json', ''); %>">
<table class="content" align="center" cellpadding="0" cellspacing="0" >
<tr>
<td width="17">&nbsp;</td>
@ -453,31 +453,31 @@ document.form.v2ray_udp_enable.value = 0;
<tr id="v2ray_use_json_basic_tr">
<th width="35%">使用json配置</th>
<td>
<input type="checkbox" id="v2ray_use_json" name="v2ray_use_json" onclick="verifyFields(this, 1);" value="0">
<input type="checkbox" id="v2ray_use_json" name="v2ray_use_json" onclick="verifyFields(this, 1);" value="<% dbus_get_def('v2ray_use_json', '0'); %>">
</td>
</tr>
<tr id="v2ray_server_support_tr" style="display: none;">
<th width="20%">地址address</th>
<td align="left">
<input type="text" maxlength="64" id="v2ray_server" name="v2ray_server" value="<% dbus_get_def("v2ray_server", "abc.abc.abc"); %>" class="input_ss_table" style="width:342px;float:left;background-color: #475A5F;color:#FFFFFF;" autocorrect="off" autocapitalize="off"/>
<input type="text" maxlength="64" id="v2ray_server" name="v2ray_server" value="<% dbus_get_def('v2ray_server', 'abc.abc.abc'); %>" class="input_ss_table" style="width:342px;float:left;background-color: #475A5F;color:#FFFFFF;" autocorrect="off" autocapitalize="off"/>
</td>
</tr>
<tr id="v2ray_port_support_tr" style="display: none;">
<th width="20%">端口port</th>
<td align="left">
<input type="text" maxlength="64" id="v2ray_port" name="v2ray_port" value="<% dbus_get_def("v2ray_port", "12345"); %>" class="input_ss_table" style="width:342px;float:left;background-color: #475A5F;color:#FFFFFF;" autocomplete="off" autocorrect="off" autocapitalize="off"/>
<input type="text" maxlength="64" id="v2ray_port" name="v2ray_port" value="<% dbus_get_def('v2ray_port', '12345'); %>" class="input_ss_table" style="width:342px;float:left;background-color: #475A5F;color:#FFFFFF;" autocomplete="off" autocorrect="off" autocapitalize="off"/>
</td>
</tr>
<tr id="v2ray_uuid_basic_tr" style="display: none;">
<th width="20%">用户idid</th>
<td align="left">
<input name=v2ray_uuid style="background-color: #475A5F;color:#FFFFFF;" value='<% dbus_get_def("v2ray_uuid", "12345-1123-123-123abc"); %>'>
<input name="v2ray_uuid" style="background-color: #475A5F;color:#FFFFFF;" value="<% dbus_get_def('v2ray_uuid', '12345-1123-123-123abc'); %>">
</td>
</tr>
<tr id="v2ray_alterid_basic_tr" style="display: none;">
<th width="20%">额外ID (Alterld)</th>
<td align="left">
<input name=v2ray_alterid style="background-color: #475A5F;color:#FFFFFF;" value='<% dbus_get_def("v2ray_alterid", "100"); %>'>
<input name="v2ray_alterid" style="background-color: #475A5F;color:#FFFFFF;" value="<% dbus_get_def('v2ray_alterid', '100'); %>">
</td>
</tr>
<tr id="v2ray_security_basic_tr" style="display: none;">
@ -547,7 +547,7 @@ document.form.v2ray_udp_enable.value = 0;
<tr id="v2ray_mux_enable_basic_tr" style="display: none;">
<th width="35%">多路复用 (Mux)</th>
<td>
<input type="checkbox" id="v2ray_mux_enable" name="v2ray_mux_enable" onclick="verifyFields(this, 1);" value="0">
<input type="checkbox" id="v2ray_mux_enable" name="v2ray_mux_enable" onclick="verifyFields(this, 1);" value="<% dbus_get_def("v2ray_mux_enable", "0"); %>">
</td>
</tr>
<tr id="v2ray_json_basic_tr" style="display: none;">

View File

@ -1,2 +1,2 @@
4.13.0
72a421802e093e7cc52d89c8e05a5bbf
700544f47fff165b2b6644ec6bd6a84c