Skip to content

Commit

Permalink
Merge pull request #6 from NimaQu/dev
Browse files Browse the repository at this point in the history
merge upstream
  • Loading branch information
Rico committed Dec 29, 2018
2 parents d9ef21e + 02f8909 commit 60922ee
Show file tree
Hide file tree
Showing 51 changed files with 462 additions and 483 deletions.
9 changes: 5 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@ before_install:
- echo "==========================================================="
- echo "Upgrade linux packages"
- echo "==========================================================="
- sudo sed -i 's|http://us-east-1.ec2.archive.ubuntu.com|https://mirrors.speedtests.ml|g' /etc/apt/sources.list
- sudo sed -i 's|http://security.ubuntu.com|https://mirrors.speedtests.ml|g' /etc/apt/sources.list
- sudo sed -i 's|http://us-central1.gce.archive.ubuntu.com|https://mirrors.speedtests.ml|g' /etc/apt/sources.list
- sudo sed -i 's|http://ppa.launchpad.net|https://launchpad.speedtests.ml|g' /etc/apt/sources.list.d/*.list
- sudo sed -i 's|http://us-east-1.ec2.archive.ubuntu.com|https://ubuntu.mirror.noc.one|g' /etc/apt/sources.list
- sudo sed -i 's|http://security.ubuntu.com|https://ubuntu.mirror.noc.one|g' /etc/apt/sources.list
- sudo sed -i 's|http://us-central1.gce.archive.ubuntu.com|https://ubuntu.mirror.noc.one|g' /etc/apt/sources.list
- sudo sed -i 's|http://ppa.launchpad.net|https://launchpad.proxy.noc.one|g' /etc/apt/sources.list.d/*.list
- curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
- sudo apt upgrade
- sudo apt install -y nodejs
- composer config -g repos.packagist composer https://packagist.noc.one
install:
- sudo chmod -R 755 *
- echo "==========================================================="
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,9 @@ Wiki已经启用,欢迎为此面板维护wiki
- [黛米付-支付接入](https://www.daimiyun.cn/register.php?aff=624)
- [冲上云霄云主机](http://console.soar-clouds.com/aff.php?aff=94)
- [Vultr](https://www.vultr.com/?ref=7205737)



# 免责声明

本程序由 MIT License 授权。**不提供任何担保**。使用本程序即表明,您知情并同意:程序开发者不对此程序导致的任何服务中断、数据损失或任何少见未列出的事故负责。
4 changes: 2 additions & 2 deletions app/Command/XCat.php
Original file line number Diff line number Diff line change
Expand Up @@ -248,10 +248,10 @@ public function setTelegram()
public function initQQWry()
{
echo("downloading....");
$copywrite = file_get_contents("https://qqwry.speedtests.ml/copywrite.rar");
$copywrite = file_get_contents("https://qqwry.mirror.noc.one/copywrite.rar");
$newmd5 = md5($copywrite);
file_put_contents(BASE_PATH."/storage/qqwry.md5", $newmd5);
$qqwry = file_get_contents("https://qqwry.speedtests.ml/qqwry.rar");
$qqwry = file_get_contents("https://qqwry.mirror.noc.one/qqwry.rar");
if ($qqwry != "") {
$key = unpack("V6", $copywrite)[6];
for ($i=0; $i<0x200; $i++) {
Expand Down
1 change: 0 additions & 1 deletion app/Services/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ public static function getPublicConfig()
{
return [
"appName" => self::get("appName"),
"appStartTime" => self::get("appStartTime"),
"version" => VERSION,
"baseUrl" => self::get("baseUrl"),
"min_port" => self::get("min_port"),
Expand Down
14 changes: 11 additions & 3 deletions app/Services/Gateway/TrimePay.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,17 @@ public function purchase($request, $response, $args)
$data['returnUrl'] = Config::get("baseUrl")."/user/payment/return";
$params = self::prepareSign($data);
$data['sign'] = self::sign($params);
$result = json_decode(self::post($data), TRUE);
$result['pid'] = $pl->tradeno;
return json_encode($result);
switch ($type) {
case('WEPAY_JSAPI'):
$result['code'] = 0;
$result['data'] = "http://cashier.hlxpay.com/#/wepay/jsapi?payData=".base64_encode(json_encode($data));
$result['pid'] = $pl->tradeno;
return json_encode($result);
default:
$result = json_decode(self::post($data), TRUE);
$result['pid'] = $pl->tradeno;
return json_encode($result);
}
}

public function notify($request, $response, $args)
Expand Down
10 changes: 9 additions & 1 deletion app/Utils/Hash.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ public static function passwordHash($str)
case 'sha256':
return self::sha256WithSalt($str);
break;
case 'argon2i':
return self::argon2iWithSalt($str);
break;
default:
return self::md5WithSalt($str);
}
Expand All @@ -38,7 +41,12 @@ public static function sha256WithSalt($pwd)
$salt = Config::get('salt');
return hash('sha256', $pwd.$salt);
}

public static function argon2iWithSalt($pwd)
{
$salt = Config::get('salt');
return hash('sha256',password_hash($pwd.$salt, PASSWORD_ARGON2I));
//由于直接Argon2字符超过64位数据库装不下,懒得去改数据库了,所有再套一层sha256在外面缩短下长度
}
// @TODO
public static function checkPassword($hashedPassword, $password)
{
Expand Down
7 changes: 3 additions & 4 deletions config/.config.php.example
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ $System_Config['debug'] = 'false'; //正式环境请确保为 false
$System_Config['appName'] = 'sspanel'; //站点名称
$System_Config['baseUrl'] = 'http://url.com'; //站点地址
$System_Config['subUrl'] = $System_Config['baseUrl'].'/link/'; //订阅地址,如需和站点名称相同,请不要修改
$System_Config['appStartTime'] = '2018'; //站点成立时间,显示在页脚 copyright 部分
$System_Config['muKey'] = 'NimaQu'; //用于校验ss-go mu的请求,可以随意修改,但请保持前后端一致
$System_Config['db_driver'] = 'mysql'; //数据库程序
$System_Config['db_host'] = 'localhost'; //数据库地址
Expand Down Expand Up @@ -143,8 +142,8 @@ $System_Config['crisp_id']='null'; //客服系统ID ID查看路径:crisp.cha
#工单系统设置
$System_Config['enable_ticket']='true'; //是否开启工单系统

#站长联系方式设置
$System_Config['enable_admin_contact']='false'; //是否开启站长联系方式
#管理员联系方式设置
$System_Config['enable_admin_contact']='false'; //是否开启管理员联系方式
$System_Config['admin_contact1'] = 'QQ:1233456'; //QQ、邮箱、微信仅用于举例
$System_Config['admin_contact2'] = '邮箱123456@qq.com'; //也可以写电话、tg等其他联系方式
$System_Config['admin_contact3'] = '微信~123456'; //没有格式要求,想怎么写就怎么写,可留空
Expand Down Expand Up @@ -255,7 +254,7 @@ $System_Config['pacpp_offset']='-20000';
$System_Config['Speedtest_duration']='6'; //显示多长时间的测速记录
$System_Config['login_warn']='false'; //异地登陆提示
$System_Config['timeZone'] = 'PRC'; //PRC 天朝时间 UTC 格林时间
$System_Config['pwdMethod'] = 'sha256'; //密码加密 可选 md5,sha256
$System_Config['pwdMethod'] = 'sha256'; //密码加密 可选 md5,sha256,argon2i(argon2i需要至少php7.2)
$System_Config['db_charset'] = 'utf8';
$System_Config['db_collation'] = 'utf8_general_ci';
$System_Config['db_prefix'] = '';
Expand Down
7 changes: 5 additions & 2 deletions public/theme/material/css/auth.css
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@
max-width: 94%;
}
.auth-tg.cust-modelin {
top: 2em;
transform: translate3d(0,10rem,0);
}
.auth-tg,.tip-fade {
transition-property: all;
transition-duration: .7s;
transition-duration: .5s;
}
.tg-down {
top: 2em;
Expand Down Expand Up @@ -234,6 +234,9 @@ a.boardtop-left:hover {
#login {
margin-top: 5px;
}
.auth-tg.cust-modelin {
transform: translate3d(0,15rem,0);
}
}

@media screen and (min-width:768px) {
Expand Down
15 changes: 1 addition & 14 deletions public/theme/material/css/base.min.css
Original file line number Diff line number Diff line change
Expand Up @@ -2229,20 +2229,7 @@ img {
text-decoration: none
}


.btn:after {
box-shadow: 0 3px 9px rgba(0,0,0,.3);
display: block;
height: 100%;
opacity: 0;
position: absolute;
top: 0;
left: 0;
transition: opacity .3s cubic-bezier(.4,0,.2,1);
width: 100%
}

.fbtn,.fbtn:after {
.fbtn {
border-radius: 50%
}

Expand Down
79 changes: 58 additions & 21 deletions public/theme/material/css/project.min.css
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
.shop-table .card {
width: 100%;
margin: 10px 0 0 0;
padding: 1em 1em;
padding: 14px 1em;
border-radius: 10px 10px 0 0;
cursor: pointer;
grid-area: main;
Expand All @@ -94,10 +94,10 @@
padding: 8px 2em;
grid-area: button;
}

.shop-drop {
grid-area: drop;
background: white;
padding: 1em 1.5em;
box-shadow: 0 0px 0 #e5e5e5, 0 2px 5px rgba(0,0,0,.12), 0 2px 4px rgba(0,0,0,.05);
}

Expand Down Expand Up @@ -136,7 +136,7 @@
position: relative;
transition: .3s all;
grid-template-columns: 100%;
grid-template-rows: auto 0px auto;
grid-template-rows: auto auto auto;
grid-template-areas:
"main"
"drop"
Expand Down Expand Up @@ -626,23 +626,32 @@ ul.dropdown-menu {
min-width: 130px;
}

.btn.btn-flat.waves-attach.waves-effect .waves-wrap,.cardbtn-edit .btn-flat .waves-wrap,.cardbtn-edit .btn-flat:after {
border-radius: 50%;
.waves-attach.waves-circle.waves-light.waves-effect .waves-wrap {
border-radius: 10px;
}
.cardbtn-edit .btn-flat:after {
background-color: rgba(97, 97, 97, 0.36);

.btn:active,.fbtn:active {
transform: translate(3px,3px);
}
.waves-attach.waves-circle.waves-light.waves-effect .waves-wrap,.fbtn:after {
border-radius: 10px;
.shop-table .btn.shop-btn:active {
transform: scale3d(1.05,1.05,1.05);

}

.modal-inner p {
word-break: break-word;
}

.form-control-guide {
margin-left: 1em;
margin-top: .5em;
margin: .3em 0 0 0;
font-size: 12px;
color: #399AF2;
}
.form-control-guide i {
font-size: 18px;
position: relative;
top: .25em;
margin-right: .2em;
}

/* 卡片节点 */
Expand Down Expand Up @@ -672,6 +681,23 @@ ul.dropdown-menu {
transition-property: all;
}

.card.node-table {
min-height: 75px;
}

.node-table .avatar.avatar-sm span {
top: .4rem;
position: relative;
font-size: 20px;
color: white;
}
.node-table .avatar.avatar-sm.nodeonline span {
top: .25rem;
}
.node-table .avatar.avatar-sm.nodeoffline span {
left: .05rem
}

.node-card {
position: relative;
left: 0;
Expand Down Expand Up @@ -862,7 +888,7 @@ div.nodetitle:first-of-type>a {
box-shadow: 0 0 7px 0 gray;
}
.node-tip.cust-modelin {
top:70px;
transform: translate3d(0,14rem,0);
}
.nodetip-table {
flex-wrap: wrap;
Expand Down Expand Up @@ -1068,25 +1094,29 @@ a.tag-magenta,.tag-magenta {
}
.cust-modelin {
opacity: 1;
top: 2em;
transform: translate3d(0,2em,0);
}
.fade-delay {
transition-delay: .3s
}
/* 下拉菜单插件 */
/* .dropdown-hide {
display: none;
} */

.dropdown-area {
height: 0;
opacity: 0;
transform: scale(1,0);
transform: scale3d(1,0,1);
padding: 0 1.5em;
transition: .3s all;
transform-origin: top;
-webkit-backface-visibility: hidden;
-moz-backface-visibility: hidden;
-ms-backface-visibility: hidden;
backface-visibility: hidden;
}
.dropdown-area.dropdown-active {
transform: scale(1,1);
transform: scale3d(1,1,1);
opacity: 1;
padding: 1.5em 1.5em;
}


Expand Down Expand Up @@ -1146,22 +1176,29 @@ a.tag-magenta,.tag-magenta {
.shop-gridarea {
width: 100%;
grid-template-columns: 80% 20%;
grid-template-rows: auto 0px;
grid-template-rows: auto auto;
grid-template-areas:
"main button"
"drop block"
}
.shop-drop {
border-radius: 10px;
padding: 1em 1.5em;
margin: 5px 0 1em 0;
box-shadow: 0 0px 0 #e5e5e5, 0 0 15px rgba(0,0,0,.12), 0 2px 4px rgba(0,0,0,.05);
}
.shop-drop .card-tag {
font-size: 16px;
height: 26px;
padding: 3px 6px 0;
}
.node-tip.cust-modelin {
transform: translate3d(0,15rem,0);
}
.dropdown-area.dropdown-active {
margin: .5em 0 1.5em 0;
}
.dropdown-area {
transition: .3s all;
}
}

@media only screen and (min-width:768px) {
Expand Down
21 changes: 6 additions & 15 deletions public/theme/material/css/user.css
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@
border: 1px solid white;
}
.pagination>li.active>a {
background: #f50057;
background: #13c2c2;
color: #fff;
}

Expand All @@ -210,23 +210,14 @@
color: #000;
}


.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover {
color: #fff;
background-color: #000;
border-color: #000;
}

.pagination>.active>span {
background-color: #f50057;
color: #fff;
.pagination > .disabled > span {
border-color: #fff;
}



.pagination > .disabled > span {
border-color: #fff;
.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover {
color: #fff;
background-color: #54aff9;
border-color: #54aff9;
}


Expand Down
Loading

0 comments on commit 60922ee

Please sign in to comment.