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

  • Người tạo chủ đề Người tạo chủ đề tuantu_51
  • Ngày bắt đầu Ngày bắt đầu
anh hướng dẫn em cụ thể được khg
https://www.anphat.vn/lan-to-lan-site-to-site/drayos-huong-dan-vpn-pptp-lan-to-lan
Làm giống vầy.
1630934483839.png
 
Mùa dịch mạng quay vòng nên mình thử dựng một em VPS share các bác dùng thử nhé!
Thông số các giao thức hỗ trợ

1. PPTP

(Dễ sử dụng nhất, dùng tốt trên Windows, Android và các loại router chỉ hỗ trợ PPTP như là Xiaomi…)

Server Address103.133.104.219
Usernametruonganhtuan
Passwordtuan123456


2. L2TP with IPSec

Hơi khó cài một tí, dùng tốt trên Android và iOS (nhớ là phải bật IPSec/PSK gì đó lên nha).

Server Address103.133.104.219
Usernameanhtuanenglish
Passwordtuan123456
IPSec PSK/
Secret…
(phải có cái này)
Anhtuanenglish
(A đầu in hoa)


3. OpenVPN

Mì ăn liền, down App OpenVPN Connect rồi add file config vào rồi dùng (phù hợp tất cả máy tính + ĐT).
File config: https://drive.google.com/file/d/1h8yDbTiOy14WqdZ81v-jeCuUfD9v4mp_/view?usp=sharing

4. Outline
Mì ăn liền, down Outline về rồi add key vào sử dụng (phù hợp tất cả máy tính + ĐT).
Key:


------------------------------------
Speedtest from server:
Xem tệp đính kèm 719094
Xem tệp đính kèm 719097
Thanks thím nhiều, cứu cánh mùa dịch thật ấy chứ.
 
Đâ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>
Code này cài trên mik thế nào bác hướng dẫn e với ạ
 
Mùa dịch mạng quay vòng nên mình thử dựng một em VPS share các bác dùng thử nhé!
Thông số các giao thức hỗ trợ

1. PPTP

(Dễ sử dụng nhất, dùng tốt trên Windows, Android và các loại router chỉ hỗ trợ PPTP như là Xiaomi…)

Server Address103.133.104.219
Usernametruonganhtuan
Passwordtuan123456


2. L2TP with IPSec

Hơi khó cài một tí, dùng tốt trên Android và iOS (nhớ là phải bật IPSec/PSK gì đó lên nha).

Server Address103.133.104.219
Usernameanhtuanenglish
Passwordtuan123456
IPSec PSK/
Secret…
(phải có cái này)
Anhtuanenglish
(A đầu in hoa)


3. OpenVPN

Mì ăn liền, down App OpenVPN Connect rồi add file config vào rồi dùng (phù hợp tất cả máy tính + ĐT).
File config: https://drive.google.com/file/d/1h8yDbTiOy14WqdZ81v-jeCuUfD9v4mp_/view?usp=sharing

4. Outline
Mì ăn liền, down Outline về rồi add key vào sử dụng (phù hợp tất cả máy tính + ĐT).
Key:


------------------------------------
Speedtest from server:
Xem tệp đính kèm 719094
Xem tệp đính kèm 719097
Sao bác ko dựng wireguard nhỉ
 
Mùa dịch mạng quay vòng nên mình thử dựng một em VPS share các bác dùng thử nhé!
Thông số các giao thức hỗ trợ

1. PPTP

(Dễ sử dụng nhất, dùng tốt trên Windows, Android và các loại router chỉ hỗ trợ PPTP như là Xiaomi…)

Server Address103.133.104.219
Usernametruonganhtuan
Passwordtuan123456


2. L2TP with IPSec

Hơi khó cài một tí, dùng tốt trên Android và iOS (nhớ là phải bật IPSec/PSK gì đó lên nha).

Server Address103.133.104.219
Usernameanhtuanenglish
Passwordtuan123456
IPSec PSK/
Secret…
(phải có cái này)
Anhtuanenglish
(A đầu in hoa)


3. OpenVPN

Mì ăn liền, down App OpenVPN Connect rồi add file config vào rồi dùng (phù hợp tất cả máy tính + ĐT).
File config: https://drive.google.com/file/d/1h8yDbTiOy14WqdZ81v-jeCuUfD9v4mp_/view?usp=sharing

4. Outline
Mì ăn liền, down Outline về rồi add key vào sử dụng (phù hợp tất cả máy tính + ĐT).
Key:


------------------------------------
Speedtest from server:
Xem tệp đính kèm 719094
Xem tệp đính kèm 719097
Bạn mua vps setup hay tự làm ở nhà mà nhanh thế? Gói cước nào vậy bạn
 
Nhét cái vpn vào router đang dùng padavan rồi, báo connected rồi mà sao test thử trên android không nhận bác nhỉ? Khi add thẳng cấu hình vpn lên android thì vẫn nhận ra con vpn sever vnpt
P/s: đã chỉnh được. Tks bác, chạy ngon lắm, hy vọng bác duy trì hết mùa dịch
chỉnh như nào vậy bác,
e cũng bị tình trạng như vậy
 
thank bác thớt , đã cài ngon lành
mà có 1 cái chưa rõ nếu cài pptp, l2tp thì test chỉ dc 10Mbps
còn outline thì lên dc max tốc độ mạng nhà m nên định cài trên router mà ko ổn
 
Em cảm ơn thầy nhé. Mà thầy có settings proxy không ạ. Em định dùng chung với Adguard trên Android
 
Thanks bác thớt đã chia sẻ với anh em mùa đứt cáp này, dùng openwrt connect PPTP phát giờ load nhanh cực :D
 

Thống kê chủ đề

Ngày tạo
tuantu_51,
Người trả lời cuối
minhdan2502,
Trả lời
516
Lượt xem
65.243
Quay lại
Lên đầu trang