fix pac section

This commit is contained in:
mercury
2023-02-11 00:22:50 +04:00
parent f3cf7ec58e
commit 4eedc99dd3
3 changed files with 9 additions and 9 deletions
+7 -7
View File
@@ -1237,11 +1237,11 @@ DNS-over-HTTPS with IP:
<b>PAC ({$pac['time']} / {$pac['sz']}):</b>
<code>$scheme://$ip/pac?h=$hash&a=127.0.0.1&p=1080</code>
text;
$urls[] = [
$urls[0][] = [
'text' => "PAC",
'url' => "$scheme://$ip/pac?h=$hash&a=127.0.0.1&p=1080",
];
$urls[] = [
$urls[1][] = [
'text' => "PAC Wireguard proxy",
'url' => "$scheme://$ip/pac?h=$hash&a=10.10.0.3&p=1080",
];
@@ -1255,7 +1255,7 @@ DNS-over-HTTPS with IP:
<b>Shadowsocks-android PAC ({$mpac['time']} / {$mpac['sz']}):</b>
<code>$scheme://$ip/pac?h=$hash&t=mpac</code>
text;
$urls[] = [
$urls[2][] = [
'text' => "PAC ShadowSocks(Android)",
'url' => "$scheme://$ip/pac?h=$hash&t=mpac",
];
@@ -1269,11 +1269,11 @@ DNS-over-HTTPS with IP:
<b>Reverse PAC ({$rpac['time']} / {$rpac['sz']}):</b>
<code>$scheme://$ip/pac?h=$hash&t=rpac&a=127.0.0.1&p=1080</code>
text;
$urls[] = [
$urls[0][] = [
'text' => "Reverse PAC",
'url' => "$scheme://$ip/pac?h=$hash&t=rpac",
];
$urls[] = [
$urls[1][] = [
'text' => "Reverse PAC Wireguard proxy",
'url' => "$scheme://$ip/pac?h=$hash&t=rpac&a=10.10.0.3",
];
@@ -1287,13 +1287,13 @@ DNS-over-HTTPS with IP:
<b>Reverse shadowsocks-android PAC ({$rmpac['time']} / {$rmpac['sz']}):</b>
<code>$scheme://$ip/pac?h=$hash&t=rmpac</code>
text;
$urls[] = [
$urls[2][] = [
'text' => "Reverse PAC SS(Android)",
'url' => "$scheme://$ip/pac?h=$hash&t=rmpac",
];
}
if ($urls) {
$data = array_chunk($urls, 2);
$data = $urls;
}
if ($conf['zapret']) {
$data[] = [
+1 -1
View File
@@ -17,7 +17,7 @@ $type = $_GET['t'] ?? 'pac';
$address = $_GET['a'] ?: '127.0.0.1';
$port = $_GET['p'] ?: '1080';
$hash = $_GET['h'];
if ($hash == substr(md5($key), 0, 8)) {
if ($hash == substr(md5($c['key']), 0, 8)) {
if (file_exists($file = __DIR__ . "/zapretlists/$type")) {
$pac = file_get_contents($file);
header('Content-Type: text/plain');
+1 -1
View File
@@ -308,7 +308,7 @@ $load = [
switch ($_SERVER['argv'][1]) {
case 'start':
$bot = new Bot($key);
$bot = new Bot($c['key']);
$bot->input['chat'] = $_SERVER['argv'][2];
$bot->input['message_id'] = $_SERVER['argv'][3];
$bot->input['callback_id'] = $_SERVER['argv'][4];