thảo luận Share các bác VPN em mới dựng

Cám ơn bác đã chia sẻ, mình đã kết nối thành công nhé. Nhiều ông vô đây hỏi mấy cái bảo mật làm gì, ai ép mấy ông dùng đâu. Còn hỏi thì xàm hơn, người ta đã có ý đồ thì mấy ông hỏi có tác dụng gì?
Có mình tôi hỏi, tôi không biết tôi hỏi. Sao có người phải tỏ ra thượng đẳng vậy nhỉ.
 
Ít hôm úp lên đây giờ :beat_brick::beat_brick:

via theNEXTvoz for iPhone
Đùa bác cho vui chứ em cũng có con tự setup trên con VPS Việt Nam cùi cùi nên không cần, cơ mà thanks tinh thần của bác :LOL:)

1630753909641.png
 
Thanks bác nhiều. Mình bên Úc, muốn xem tv kênh VN phải xài VPN . Mà hôm trước dk dùng ExpressVPN Thì xem dc, nhưng 2 hôm nay thì ko xem dc nữa, chọn server VN mà nó trỏ địa chỉ qua bên Pakistan nên ko xem dc. Nhưng sử dụng cái file VPN của bác thì xem dc mặc dù speed hơi chậm nhưng ko sao. Thanks bác chủ thớt nhìu. Tiện thể cho mình hỏi các bác trong Group có ai bít sư dụng VPN để xem mà tốc độ ổn định hơn thì chỉ giáo giúp mình nhé. Thanks all..
 
Cái này route bị reboot là nó quay lại ko save data à bác? Cả xin bác share lại file index thêm char với :byebye:
Đây nha bác. Dân tay ngang nên code hơi luộm thuộm hihi.
PHP:
<?php
date_default_timezone_set('Asia/Ho_Chi_Minh');
$db = new SQLite3('mikstats.db', SQLITE3_OPEN_CREATE | SQLITE3_OPEN_READWRITE);
// Tinh traffic de cho vao table
$yearly = $db->query("SELECT strftime('%Y', timestamp), sum(tx), sum(rx), sum(tx)+sum(rx) FROM traffic GROUP BY strftime('%Y', timestamp) ORDER BY timestamp DESC;");
$monthly = $db->query("SELECT strftime('%m-%Y', timestamp), sum(tx), sum(rx), sum(tx)+sum(rx) FROM traffic GROUP BY strftime('%m-%Y', timestamp) ORDER BY timestamp DESC LIMIT 12;");
$daily = $db->query("SELECT strftime('%d-%m-%Y', timestamp), sum(tx), sum(rx), sum(tx)+sum(rx) FROM traffic GROUP BY strftime('%d-%m-%Y', timestamp) ORDER BY timestamp DESC LIMIT 60;");

// Tinh traffic de ve bieu do
$yearlygraph = $db->query("SELECT strftime('%Y', timestamp), sum(tx), sum(rx), sum(tx)+sum(rx) FROM traffic GROUP BY strftime('%Y', timestamp) ORDER BY timestamp DESC;");
$monthlygraph = $db->query("SELECT strftime('%m-%Y', timestamp), sum(tx), sum(rx), sum(tx)+sum(rx) FROM traffic GROUP BY strftime('%m-%Y', timestamp) ORDER BY timestamp ASC LIMIT 12;");
$dailygraph = $db->query("SELECT strftime('%d-%m-%Y', timestamp), sum(tx), sum(rx), sum(tx)+sum(rx) FROM traffic GROUP BY strftime('%d-%m-%Y', timestamp) ORDER BY timestamp ASC LIMIT 30;");

// Tao data bieu do
$dataPoints1 = array();
$dataPoints2 = array();
$dataPoints3 = array();
$dataPoints4 = array();

while ($row1 = $monthlygraph->fetchArray(SQLITE3_NUM)) {
       array_push($dataPoints1, array("label"=> $row1[0], "y"=> $row1[2]/1073741824));
   };
while ($row2 = $monthlygraph->fetchArray(SQLITE3_NUM)) {
       array_push($dataPoints2, array("label"=> $row2[0], "y"=> $row2[1]/1073741824));
   };
while ($row3 = $dailygraph->fetchArray(SQLITE3_NUM)) {
       array_push($dataPoints3, array("label"=> substr($row3[0],0,5), "y"=> $row3[2]/1073741824));
   };
while ($row4 = $dailygraph->fetchArray(SQLITE3_NUM)) {
       array_push($dataPoints4, array("label"=> substr($row4[0],0,5), "y"=> $row4[1]/1073741824));
   };
?>
<!DOCTYPE html>
<html lang="en">
<head>
  <title>Traffic Stats - Thống kê lưu lượng</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
  <script>
    window.onload = function () {
 
    var chart = new CanvasJS.Chart("chartContainer", {
    title: {
        text: "Lưu lượng theo Tháng - 12 Tháng trở lại"
    },
    theme: "light2",
    animationEnabled: true,
    toolTip:{
        shared: true,
        reversed: true
    },
    axisY: {
        minimum: 0,
        title: "Lưu lượng",
        suffix: " GB",
        valueFormatString: "# ##0.##"
    },
    legend: {
        cursor: "pointer",
        itemclick: toggleDataSeries
    },
    data: [
        {
            type: "stackedBar",
            name: "Download",
            showInLegend: true,
            yValueFormatString: "# ##0.## GB",
            dataPoints: <?php echo json_encode($dataPoints1, JSON_NUMERIC_CHECK); ?>
        },{
            type: "stackedBar",
            name: "Upload",
            showInLegend: true,
            yValueFormatString: "# ##0.## GB",
            dataPoints: <?php echo json_encode($dataPoints2, JSON_NUMERIC_CHECK); ?>
        }
            
        
    ]
});

var chart2 = new CanvasJS.Chart("chartContainer2", {
    title: {
        text: "Lưu lượng theo Ngày - 30 Ngày trở lại"
    },
    theme: "light2",
    animationEnabled: true,
    toolTip:{
        shared: true,
        reversed: true
    },
    axisY: {
        minimum: 0,
        title: "Lưu lượng",
        suffix: " GB",
        valueFormatString: "# ##0.##"
    },
    legend: {
        cursor: "pointer",
        itemclick: toggleDataSeries
    },
    data: [
        {
            type: "stackedBar",
            name: "Download",
            showInLegend: true,
            yValueFormatString: "# ##0.## GB",
            dataPoints: <?php echo json_encode($dataPoints3, JSON_NUMERIC_CHECK); ?>
        },{
            type: "stackedBar",
            name: "Upload",
            showInLegend: true,
            yValueFormatString: "# ##0.## GB",
            dataPoints: <?php echo json_encode($dataPoints4, JSON_NUMERIC_CHECK); ?>
        }
            
        
    ]
});
 
chart.render();
chart2.render();
 
function toggleDataSeries(e) {
    if (typeof (e.dataSeries.visible) === "undefined" || e.dataSeries.visible) {
        e.dataSeries.visible = false;
    } else {
        e.dataSeries.visible = true;
    }
    e.chart.render();
    
}
 
}
</script>
  <style>
      .title {
          font-size: 30px;
          font-weight: 600;
          text-align:center;
          color:blue;
          margin: 50px 0 50px 0;
      }
      .table-title {
          font-size: 20px;
          font-weight: 600;
          text-align:center;
          color:red;
      }
      .table{
          margin-bottom: 50px;
      }
      .footer{
        font-size:12px;
        font-weight:500;
        text-align:center;
      }
  </style>
</head>
<body>
        <div class="container">
            <div class="title">
                <div>Hệ thống thống kê lưu lượng WAN Mikrotik</div>
                <div>Router: Trương Anh Tuấn</div>
            </div>
            <div class="table-title">Lưu lượng theo Ngày (60 ngày)</div>
            <table class="table table-striped">
                    <thead>
                        <th>Ngày</th>
                        <th>Tải lên (Upload)</th>
                        <th>Tải xuống (Download)</th>
                        <th>Tổng lưu lượng</th>
                    </thead>
                    <tbody>
                <?php

                     while ($row = $daily->fetchArray(SQLITE3_ASSOC)) {

                           echo "<tr>";
                               echo "<td>".$row["strftime('%d-%m-%Y', timestamp)"]."</td>";
                               echo "<td>".number_format($row["sum(tx)"]/1024/1024/1024,2,'.',' ')." GB </td>";
                               echo "<td>".number_format($row["sum(rx)"]/1024/1024/1024,2,'.',' ')." GB </td>";
                               echo "<td>".number_format($row["sum(tx)+sum(rx)"]/1024/1024/1024,2,'.',' ')." GB </td>";
                           echo "</tr>";

                     }
                ?>
                </tbody>
            </table>
      
           <div class="table-title">Lưu lượng theo Tháng (12 tháng)</div>
            <table class="table table-striped">
                    <thead>
                        <th>Tháng</th>
                        <th>Tải lên (Upload)</th>
                        <th>Tải xuống (Download)</th>
                        <th>Tổng lưu lượng</th>
                    </thead>
                    <tbody>
                    <?php
                    
                     while ($row = $monthly->fetchArray(SQLITE3_ASSOC)) {

                           echo "<tr>";
                               echo "<td>".$row["strftime('%m-%Y', timestamp)"]."</td>";
                               echo "<td>".number_format($row["sum(tx)"]/1024/1024/1024,2,'.',' ')." GB </td>";
                               echo "<td>".number_format($row["sum(rx)"]/1024/1024/1024,2,'.',' ')." GB </td>";
                               echo "<td>".number_format($row["sum(tx)+sum(rx)"]/1024/1024/1024,2,'.',' ')." GB </td>";
                           echo "</tr>";

                     }
                    ?>
                    </tbody>
                </table>
                
            <div class="table-title">Lưu lượng theo Năm</div>
            <table class="table table-striped">
                <thead>
                    <th>Năm</th>
                    <th>Tải lên (Upload)</th>
                    <th>Tải xuống (Download)</th>
                    <th>Tổng lưu lượng</th>
                </thead>
                <tbody>
                <?php
                    
                     while ($row = $yearly->fetchArray(SQLITE3_ASSOC)) {

                           echo "<tr>";
                               echo "<td>".$row["strftime('%Y', timestamp)"]."</td>";
                               echo "<td>".number_format($row["sum(tx)"]/1024/1024/1024,2,'.',' ')." GB </td>";
                               echo "<td>".number_format($row["sum(rx)"]/1024/1024/1024,2,'.',' ')." GB </td>";
                               echo "<td>".number_format($row["sum(tx)+sum(rx)"]/1024/1024/1024,2,'.',' ')." GB </td>";
                           echo "</tr>";

                     }
                ?>
                </tbody>
           </table>
        </div>
    <div id="chartContainer2" style="height: 370px; width: 90%; margin:0 auto;"></div>
    <div id="chartContainer" style="height: 370px; width: 90%; margin:0 auto;"></div>
    <script src="https://canvasjs.com/assets/script/canvasjs.min.js"></script>
</body>
<footer>
    <div class="footer">Thiết kế và vận hành bởi DigiEra Networks</div>
</footer>
</html>
 
Thanks bác nhiều. Mình bên Úc, muốn xem tv kênh VN phải xài VPN . Mà hôm trước dk dùng ExpressVPN Thì xem dc, nhưng 2 hôm nay thì ko xem dc nữa, chọn server VN mà nó trỏ địa chỉ qua bên Pakistan nên ko xem dc. Nhưng sử dụng cái file VPN của bác thì xem dc mặc dù speed hơi chậm nhưng ko sao. Thanks bác chủ thớt nhìu. Tiện thể cho mình hỏi các bác trong Group có ai bít sư dụng VPN để xem mà tốc độ ổn định hơn thì chỉ giáo giúp mình nhé. Thanks all..
Cũng aussie đây bác, Mình test thấy có HotspotShield, WeVPN, AdguardVPN, PrivateVPN là ổn nhất ko bị giật lag. VietPN cũng có thể dùng được nhưng tùy thời điểm, với chỉ stream 720p thôi. FullHD trở lên là lag tung.
 
Đây nha bác. Dân tay ngang nên code hơi luộm thuộm hihi.
PHP:
<?php
date_default_timezone_set('Asia/Ho_Chi_Minh');
$db = new SQLite3('mikstats.db', SQLITE3_OPEN_CREATE | SQLITE3_OPEN_READWRITE);
// Tinh traffic de cho vao table
$yearly = $db->query("SELECT strftime('%Y', timestamp), sum(tx), sum(rx), sum(tx)+sum(rx) FROM traffic GROUP BY strftime('%Y', timestamp) ORDER BY timestamp DESC;");
$monthly = $db->query("SELECT strftime('%m-%Y', timestamp), sum(tx), sum(rx), sum(tx)+sum(rx) FROM traffic GROUP BY strftime('%m-%Y', timestamp) ORDER BY timestamp DESC LIMIT 12;");
$daily = $db->query("SELECT strftime('%d-%m-%Y', timestamp), sum(tx), sum(rx), sum(tx)+sum(rx) FROM traffic GROUP BY strftime('%d-%m-%Y', timestamp) ORDER BY timestamp DESC LIMIT 60;");

// Tinh traffic de ve bieu do
$yearlygraph = $db->query("SELECT strftime('%Y', timestamp), sum(tx), sum(rx), sum(tx)+sum(rx) FROM traffic GROUP BY strftime('%Y', timestamp) ORDER BY timestamp DESC;");
$monthlygraph = $db->query("SELECT strftime('%m-%Y', timestamp), sum(tx), sum(rx), sum(tx)+sum(rx) FROM traffic GROUP BY strftime('%m-%Y', timestamp) ORDER BY timestamp ASC LIMIT 12;");
$dailygraph = $db->query("SELECT strftime('%d-%m-%Y', timestamp), sum(tx), sum(rx), sum(tx)+sum(rx) FROM traffic GROUP BY strftime('%d-%m-%Y', timestamp) ORDER BY timestamp ASC LIMIT 30;");

// Tao data bieu do
$dataPoints1 = array();
$dataPoints2 = array();
$dataPoints3 = array();
$dataPoints4 = array();

while ($row1 = $monthlygraph->fetchArray(SQLITE3_NUM)) {
       array_push($dataPoints1, array("label"=> $row1[0], "y"=> $row1[2]/1073741824));
   };
while ($row2 = $monthlygraph->fetchArray(SQLITE3_NUM)) {
       array_push($dataPoints2, array("label"=> $row2[0], "y"=> $row2[1]/1073741824));
   };
while ($row3 = $dailygraph->fetchArray(SQLITE3_NUM)) {
       array_push($dataPoints3, array("label"=> substr($row3[0],0,5), "y"=> $row3[2]/1073741824));
   };
while ($row4 = $dailygraph->fetchArray(SQLITE3_NUM)) {
       array_push($dataPoints4, array("label"=> substr($row4[0],0,5), "y"=> $row4[1]/1073741824));
   };
?>
<!DOCTYPE html>
<html lang="en">
<head>
  <title>Traffic Stats - Thống kê lưu lượng</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
  <script>
    window.onload = function () {
 
    var chart = new CanvasJS.Chart("chartContainer", {
    title: {
        text: "Lưu lượng theo Tháng - 12 Tháng trở lại"
    },
    theme: "light2",
    animationEnabled: true,
    toolTip:{
        shared: true,
        reversed: true
    },
    axisY: {
        minimum: 0,
        title: "Lưu lượng",
        suffix: " GB",
        valueFormatString: "# ##0.##"
    },
    legend: {
        cursor: "pointer",
        itemclick: toggleDataSeries
    },
    data: [
        {
            type: "stackedBar",
            name: "Download",
            showInLegend: true,
            yValueFormatString: "# ##0.## GB",
            dataPoints: <?php echo json_encode($dataPoints1, JSON_NUMERIC_CHECK); ?>
        },{
            type: "stackedBar",
            name: "Upload",
            showInLegend: true,
            yValueFormatString: "# ##0.## GB",
            dataPoints: <?php echo json_encode($dataPoints2, JSON_NUMERIC_CHECK); ?>
        }
           
       
    ]
});

var chart2 = new CanvasJS.Chart("chartContainer2", {
    title: {
        text: "Lưu lượng theo Ngày - 30 Ngày trở lại"
    },
    theme: "light2",
    animationEnabled: true,
    toolTip:{
        shared: true,
        reversed: true
    },
    axisY: {
        minimum: 0,
        title: "Lưu lượng",
        suffix: " GB",
        valueFormatString: "# ##0.##"
    },
    legend: {
        cursor: "pointer",
        itemclick: toggleDataSeries
    },
    data: [
        {
            type: "stackedBar",
            name: "Download",
            showInLegend: true,
            yValueFormatString: "# ##0.## GB",
            dataPoints: <?php echo json_encode($dataPoints3, JSON_NUMERIC_CHECK); ?>
        },{
            type: "stackedBar",
            name: "Upload",
            showInLegend: true,
            yValueFormatString: "# ##0.## GB",
            dataPoints: <?php echo json_encode($dataPoints4, JSON_NUMERIC_CHECK); ?>
        }
           
       
    ]
});
 
chart.render();
chart2.render();
 
function toggleDataSeries(e) {
    if (typeof (e.dataSeries.visible) === "undefined" || e.dataSeries.visible) {
        e.dataSeries.visible = false;
    } else {
        e.dataSeries.visible = true;
    }
    e.chart.render();
   
}
 
}
</script>
  <style>
      .title {
          font-size: 30px;
          font-weight: 600;
          text-align:center;
          color:blue;
          margin: 50px 0 50px 0;
      }
      .table-title {
          font-size: 20px;
          font-weight: 600;
          text-align:center;
          color:red;
      }
      .table{
          margin-bottom: 50px;
      }
      .footer{
        font-size:12px;
        font-weight:500;
        text-align:center;
      }
  </style>
</head>
<body>
        <div class="container">
            <div class="title">
                <div>Hệ thống thống kê lưu lượng WAN Mikrotik</div>
                <div>Router: Trương Anh Tuấn</div>
            </div>
            <div class="table-title">Lưu lượng theo Ngày (60 ngày)</div>
            <table class="table table-striped">
                    <thead>
                        <th>Ngày</th>
                        <th>Tải lên (Upload)</th>
                        <th>Tải xuống (Download)</th>
                        <th>Tổng lưu lượng</th>
                    </thead>
                    <tbody>
                <?php

                     while ($row = $daily->fetchArray(SQLITE3_ASSOC)) {

                           echo "<tr>";
                               echo "<td>".$row["strftime('%d-%m-%Y', timestamp)"]."</td>";
                               echo "<td>".number_format($row["sum(tx)"]/1024/1024/1024,2,'.',' ')." GB </td>";
                               echo "<td>".number_format($row["sum(rx)"]/1024/1024/1024,2,'.',' ')." GB </td>";
                               echo "<td>".number_format($row["sum(tx)+sum(rx)"]/1024/1024/1024,2,'.',' ')." GB </td>";
                           echo "</tr>";

                     }
                ?>
                </tbody>
            </table>
     
           <div class="table-title">Lưu lượng theo Tháng (12 tháng)</div>
            <table class="table table-striped">
                    <thead>
                        <th>Tháng</th>
                        <th>Tải lên (Upload)</th>
                        <th>Tải xuống (Download)</th>
                        <th>Tổng lưu lượng</th>
                    </thead>
                    <tbody>
                    <?php
                   
                     while ($row = $monthly->fetchArray(SQLITE3_ASSOC)) {

                           echo "<tr>";
                               echo "<td>".$row["strftime('%m-%Y', timestamp)"]."</td>";
                               echo "<td>".number_format($row["sum(tx)"]/1024/1024/1024,2,'.',' ')." GB </td>";
                               echo "<td>".number_format($row["sum(rx)"]/1024/1024/1024,2,'.',' ')." GB </td>";
                               echo "<td>".number_format($row["sum(tx)+sum(rx)"]/1024/1024/1024,2,'.',' ')." GB </td>";
                           echo "</tr>";

                     }
                    ?>
                    </tbody>
                </table>
               
            <div class="table-title">Lưu lượng theo Năm</div>
            <table class="table table-striped">
                <thead>
                    <th>Năm</th>
                    <th>Tải lên (Upload)</th>
                    <th>Tải xuống (Download)</th>
                    <th>Tổng lưu lượng</th>
                </thead>
                <tbody>
                <?php
                   
                     while ($row = $yearly->fetchArray(SQLITE3_ASSOC)) {

                           echo "<tr>";
                               echo "<td>".$row["strftime('%Y', timestamp)"]."</td>";
                               echo "<td>".number_format($row["sum(tx)"]/1024/1024/1024,2,'.',' ')." GB </td>";
                               echo "<td>".number_format($row["sum(rx)"]/1024/1024/1024,2,'.',' ')." GB </td>";
                               echo "<td>".number_format($row["sum(tx)+sum(rx)"]/1024/1024/1024,2,'.',' ')." GB </td>";
                           echo "</tr>";

                     }
                ?>
                </tbody>
           </table>
        </div>
    <div id="chartContainer2" style="height: 370px; width: 90%; margin:0 auto;"></div>
    <div id="chartContainer" style="height: 370px; width: 90%; margin:0 auto;"></div>
    <script src="https://canvasjs.com/assets/script/canvasjs.min.js"></script>
</body>
<footer>
    <div class="footer">Thiết kế và vận hành bởi DigiEra Networks</div>
</footer>
</html>
share.png



Em cũng đang buid theme cho dễ nhìn :D
 
Cũng aussie đây bác, Mình test thấy có HotspotShield, WeVPN, AdguardVPN, PrivateVPN là ổn nhất ko bị giật lag. VietPN cũng có thể dùng được nhưng tùy thời điểm, với chỉ stream 720p thôi. FullHD trở lên là lag tung.
thanks bác đã chia sẻ. mình cũng đang kiếm mấy cái VPN khác để xem truyền hình VN. Mình đang dùng thử 7 ngày trial của thằng WeVPN để xem thằng nào good hơn. Thế bác đang sử dụng thằng nào thế?
 
thanks bác đã chia sẻ. mình cũng đang kiếm mấy cái VPN khác để xem truyền hình VN. Mình đang dùng thử 7 ngày trial của thằng WeVPN để xem thằng nào good hơn. Thế bác đang sử dụng thằng nào thế?
AdguardVPN
 
Back
Top