IoTcat 5 years ago
parent 0afe875477
commit 1eaae4e4ee
  1. 24
      server/cn/etc/nginx/nginx.conf
  2. 23
      server/cn/home/www/functions.php
  3. 22
      server/cn/home/www/ssr/index.php
  4. 19
      server/cn/home/www/ssr/index_.php
  5. 67
      server/cn/home/www/ssr/ssr_key.php
  6. 75108
      server/cn/home/www/ssr/stat/echarts-3.6.js
  7. 112
      server/cn/home/www/ssr/stat/index.php
  8. 4
      server/cn/home/www/ssr/stat/jquery-1.11.2.min.js

@ -571,6 +571,30 @@ http {
}
}
server {
listen 443 ssl;
listen 80;
server_name vpn.yimian.xyz; #1
root /home/www/ssr;
index index.php index.html;
client_max_body_size 1000M;
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
server {
listen 443 ssl;
listen 80;

@ -147,6 +147,29 @@ function yimian__footer($wordColor="#C7C7C7",$backgroundColor="#2B2B2B",$urlColo
}
//set fp cookie
function yimian__setFp(){
echo "<script src=\"https://cdn.yimian.xyz/cookie/cookie.js\"></script>
<script src=\"https://cdn.yimian.xyz/fp/fp.js\"></script>
<script>cookie.set(\"fp\", fp);</script>
<script>location.reload(false);</script>";
die();
}
// user login
function db__getUsrInfo($fp){
$conn = db__connect();
$res = db__getData($conn, "fp", "fp", $fp);
$usr = db__getData($conn, "user", "tel", $res[0]['usr']);
return $usr[0];
}
/**added functions**/
//get millis time stamp
function millis() {

@ -0,0 +1,22 @@
<?php
include '../functions.php';
if(!isset($_COOKIE['fp'])) yimian__setFp();
$fp = $_COOKIE['fp'];
$usr = db__getUsrInfo($fp);
if($usr == null){
echo "<script>window.location.href='https://login.yimian.xyz'</script>";
die();
}
echo "<script>window.location.href='./ssr_key.php'</script>";
die();

@ -0,0 +1,19 @@
<?php
include '../functions.php';
$fp = $_COOKIE['fp'];
$usr = db__getUsrInfo($fp);
if($usr == null){
echo "<script>window.location.href='https://login.yimian.xyz'</script>";
die();
}
echo "<script>window.location.href='./ssr_key.php'</script>";
die();

@ -0,0 +1,67 @@
<?php
include '../functions.php';
$fp = $_COOKIE['fp'];
$usr = db__getUsrInfo($fp);
$port=$usr['ssr'];
$conn=db__connect();
$row=db__getData($conn,'ssr','port',$port);
$passwd=$row[0]['passwd'];
$str=base64_encode("aes-256-cfb:$passwd@usa.ssr.yimian.xyz:$port")."
ss://".base64_encode("aes-256-cfb:$passwd@aus.ssr.yimian.xyz:$port")."
ss://".base64_encode("aes-256-cfb:$passwd@ssr.yimian.xyz:$port");
$str1=base64_encode("aes-256-cfb:$passwd@usa.ssr.yimian.xyz:$port");
$str2=base64_encode("aes-256-cfb:$passwd@aus.ssr.yimian.xyz:$port");
$str3=base64_encode("aes-256-cfb:$passwd@ssr.yimian.xyz:$port");
yimian__header("Yimain VPN");
?>
<script src="https://cdn.bootcss.com/clipboard.js/1.7.1/clipboard.min.js"></script>
<?
yimian__headerEnd();
?>
<p>你好,<?php echo $usr['name']?>~ </p>
<br/>
<p>你的首选密钥是:ss://<?php echo $str3?></p>
<p>美国服务器密钥:ss://<?php echo $str1?></p>
<p>澳大利亚服务器密钥:ss://<?php echo $str2?></p>
<div><span id="btn" data-clipboard-text="ss://<?php echo $str?>"><button>点击复制全部</button></span></div>
<div id="show" style="display: none;">已复制</div>
<br/><br/><br/><br/><br/><br/><br/>
<script>
var btn = document.getElementById('btn');
var clipboard = new Clipboard(btn);
clipboard.on('success', function(e) {
$('#show').slideDown().delay(1500).slideUp(300);
console.log(e);
alert("复制成功!");
});
clipboard.on('error', function(e) {
$('#show').slideDown().delay(1500).slideUp(300);
console.log(e);
});
</script>
<?php
yimian__footer();
die();

File diff suppressed because it is too large Load Diff

@ -0,0 +1,112 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Yimian SSR</title>
<style type="text/css">
*{font-size:14px;border:0;margin:0;padding:0;}
body{font-family:'微软雅黑'; margin:0 auto;min-width:980px;}
ul{display:block;margin:0;padding:0;list-style:none;}
li{display:block;margin:0;padding:0;list-style: none;}
.legendShow { position: absolute; top: 10px; z-index:999; }
.legendShow ul {width: 100%; }
.legendShow ul li { width: 100%; text-align: left; word-wrap: break-word; line-height: 35px; margin-top:10px; margin-left: 10px; list-style:none;}
.legendShow ul li i.zx { display: inline-block; text-align: center; width: 15px; height: 15px; line-height: 35px; background: rgb(134, 151, 34); }
.legendShow ul li i { display: inline-block; text-align: center;width: 15px; height: 15px; line-height: 35px; }
.legendShow ul li i.zx { background: #1d94bc; }
.legendShow ul li i.jx { background:rgb(134, 151, 34); }
.legendShow ul li i.ztz { background:#FFAA25; }
.legendShow ul li span { display: inline-block; line-height: 35px; margin-left:10px;word-wrap: break-word; }
</style>
<script src="jquery-1.11.2.min.js"></script>
<script src="echarts-3.6.js"></script>
<script type="text/javascript">
$(function ()
{
$(".legendShow").css({"top":$(window).height()/5-100,"left":50});
$("#div_pie").height($(window).height());
$("#div_pie").width($(window).width());
var chart = echarts.init(document.getElementById('div_pie'), null, {
renderer: 'canvas'
});
chart.setOption({
angleAxis: {
axisLabel:
{
formatter: function (value, index) { return value * 33500 / 100; }
}
},
radiusAxis: {
type: 'category',
data: ["2.07%", "15.53%", ""],
z: 10
},
textStyle: {
color: "#104490",
fontSize: 16,
fontStyle: 900
},
polar: {
},
series: [
{
type: 'bar',
itemStyle: {
normal: {
color: '#1d94bc'
}
},
data:
[
{
value: 100 * 3 / 993.6
},
{
value: 100 * 82.2 / 993.6,
show: false,
itemStyle: {
normal: {
color: 'rgb(134, 151, 34)'
}
},
},
{
value: 100,
show: false,
itemStyle: {
normal: {
color: '#FFAA25'
}
}
}
],
coordinateSystem: 'polar',
name: '总计划',
stack: 'a'
}],
legend: {
legend: {
show: true,
data: ["总计划"],
}
}
});
});
</script>
</head>
<body>
<div class="legendShow">
<ul>
<li><i class="zx"></i><span>朋友捐赠(3.00) 2.07%</span></li>
<li><i class="jx"></i><span>已使用(82.2) 15.53%</span></li>
<li><i class="ztz"></i><span>年预算费用(993.6)</span></li>
</ul>
</div>
<div id="div_pie"></div>
</body>
</html>

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save