Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b32bd960fa | |||
| ba0895ea4c | |||
| 68e6e5919d | |||
| 28c5b9d506 | |||
| 9cc42fd34a |
+131
-129
@@ -145,6 +145,9 @@ class Bot
|
||||
case preg_match('~^/appOutbound$~', $this->input['callback'], $m):
|
||||
$this->appOutbound();
|
||||
break;
|
||||
case preg_match('~^/processOutbound$~', $this->input['callback'], $m):
|
||||
$this->processOutbound();
|
||||
break;
|
||||
case preg_match('~^/offWarp$~', $this->input['callback'], $m):
|
||||
$this->offWarp();
|
||||
break;
|
||||
@@ -431,6 +434,9 @@ class Bot
|
||||
case preg_match('~^/xtlsapp(?: (\d+))?$~', $this->input['callback'], $m):
|
||||
$this->xtlsapp($m[1] ?: 0);
|
||||
break;
|
||||
case preg_match('~^/xtlsprocess(?: (\d+))?$~', $this->input['callback'], $m):
|
||||
$this->xtlsprocess($m[1] ?: 0);
|
||||
break;
|
||||
case preg_match('~^/xtlsrulesset(?: (\d+))?$~', $this->input['callback'], $m):
|
||||
$this->xtlsrulesset($m[1] ?: 0);
|
||||
break;
|
||||
@@ -1440,9 +1446,7 @@ class Bot
|
||||
$this->language = $this->getPacConf()['language'] ?: 'en';
|
||||
$this->limit = $this->getPacConf()['limitpage'] ?: 5;
|
||||
sleep(3);
|
||||
if (empty($file)) {
|
||||
$this->menu();
|
||||
}
|
||||
$this->menu();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1754,10 +1758,14 @@ class Bot
|
||||
$this->adguardProtect();
|
||||
$u = $this->ssh("nginx -t 2>&1", 'ng');
|
||||
$out[] = $u;
|
||||
$this->update($this->input['chat'], $this->input['message_id'], implode("\n", $out));
|
||||
if (empty($nomenu)) {
|
||||
$this->update($this->input['chat'], $this->input['message_id'], implode("\n", $out));
|
||||
}
|
||||
if (preg_match('~test is successful~', $u)) {
|
||||
$out[] = $this->ssh("nginx -s reload 2>&1", 'ng');
|
||||
$this->update($this->input['chat'], $this->input['message_id'], implode("\n", $out));
|
||||
if (empty($nomenu)) {
|
||||
$this->update($this->input['chat'], $this->input['message_id'], implode("\n", $out));
|
||||
}
|
||||
$this->setPacConf($conf);
|
||||
$this->chocdomain($domain);
|
||||
$this->setUpstreamDomainOcserv($domain);
|
||||
@@ -1778,8 +1786,6 @@ class Bot
|
||||
if (empty($c['domain'])) {
|
||||
$this->addDomain(str_replace('.', '-', $this->ip) . '.nip.io', 1);
|
||||
$this->setSSL('letsencrypt');
|
||||
} else {
|
||||
$this->menu();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2422,7 +2428,7 @@ DNS-over-HTTPS with IP:
|
||||
if (!empty($domains)) {
|
||||
$conf = $this->getPacConf();
|
||||
foreach ($domains as $k => $v) {
|
||||
$conf[$type][$type == 'rulessetlist' ? trim($v) : idn_to_ascii(trim($v))] = true;
|
||||
$conf[$type][in_array($type, ['rulessetlist', 'packagelist', 'processlist']) ? trim($v) : idn_to_ascii(trim($v))] = true;
|
||||
}
|
||||
ksort($conf[$type]);
|
||||
$this->setPacConf($conf);
|
||||
@@ -2446,6 +2452,10 @@ DNS-over-HTTPS with IP:
|
||||
$this->xrayUpdateRules();
|
||||
$this->xtlswarp();
|
||||
break;
|
||||
case 'processlist':
|
||||
$this->xrayUpdateRules();
|
||||
$this->xtlsprocess();
|
||||
break;
|
||||
case 'packagelist':
|
||||
$this->xrayUpdateRules();
|
||||
$this->xtlsapp();
|
||||
@@ -3425,6 +3435,9 @@ DNS-over-HTTPS with IP:
|
||||
case 'packagelist':
|
||||
$this->xtlsapp();
|
||||
break;
|
||||
case 'processlist':
|
||||
$this->xtlsprocess();
|
||||
break;
|
||||
case 'rulessetlist':
|
||||
$this->xtlsrulesset();
|
||||
break;
|
||||
@@ -3570,6 +3583,14 @@ DNS-over-HTTPS with IP:
|
||||
$this->xtlsapp();
|
||||
}
|
||||
|
||||
public function processOutbound()
|
||||
{
|
||||
$p = $this->getPacConf();
|
||||
$p['process_outbound'] = !$p['process_outbound'];
|
||||
$p = $this->setPacConf($p);
|
||||
$this->xtlsprocess();
|
||||
}
|
||||
|
||||
public function xtlsapp($page = 0)
|
||||
{
|
||||
$text[] = "Menu -> " . $this->i18n('xray') . ' -> ' . $this->i18n('routes') . ' -> package list';
|
||||
@@ -3596,6 +3617,32 @@ DNS-over-HTTPS with IP:
|
||||
);
|
||||
}
|
||||
|
||||
public function xtlsprocess($page = 0)
|
||||
{
|
||||
$text[] = "Menu -> " . $this->i18n('xray') . ' -> ' . $this->i18n('routes') . ' -> process list';
|
||||
|
||||
$data = $this->listPac('processlist', $page, 'xtlsprocess');
|
||||
$p = $this->getPacConf();
|
||||
$data[] = [
|
||||
[
|
||||
'text' => 'set to ' . ($p['process_outbound'] ? 'proxy' : 'direct'),
|
||||
'callback_data' => "/processOutbound",
|
||||
],
|
||||
];
|
||||
$data[] = [
|
||||
[
|
||||
'text' => $this->i18n('back'),
|
||||
'callback_data' => "/routes",
|
||||
],
|
||||
];
|
||||
$this->update(
|
||||
$this->input['chat'],
|
||||
$this->input['message_id'],
|
||||
implode("\n", $text ?: ['...']),
|
||||
$data ?: false,
|
||||
);
|
||||
}
|
||||
|
||||
public function xtlsrulesset($page = 0)
|
||||
{
|
||||
$text[] = "Menu -> " . $this->i18n('xray') . ' -> ' . $this->i18n('routes') . ' -> rulesset list';
|
||||
@@ -3633,7 +3680,7 @@ DNS-over-HTTPS with IP:
|
||||
foreach ($domains as $k => $v) {
|
||||
$data[] = [
|
||||
[
|
||||
'text' => $this->i18n($v ? 'on' : 'off') . ' ' . ($basename ? basename($k) . ' ' : '') . idn_to_utf8($k),
|
||||
'text' => $this->i18n($v ? 'on' : 'off') . ' ' . ($basename ? basename($k) . ' ' : '') . (in_array($type, ['rulessetlist', 'packagelist', 'processlist']) ? $k : idn_to_utf8($k)),
|
||||
'callback_data' => "/change$type " . ($i + $page * $this->limit),
|
||||
],
|
||||
[
|
||||
@@ -4496,6 +4543,10 @@ DNS-over-HTTPS with IP:
|
||||
'text' => $this->i18n('warp'),
|
||||
'callback_data' => "/xtlswarp",
|
||||
]],
|
||||
[[
|
||||
'text' => $this->i18n('process'),
|
||||
'callback_data' => "/xtlsprocess",
|
||||
]],
|
||||
[[
|
||||
'text' => $this->i18n('package'),
|
||||
'callback_data' => "/xtlsapp",
|
||||
@@ -4778,45 +4829,6 @@ DNS-over-HTTPS with IP:
|
||||
return $c['domain'] ?: $this->ip;
|
||||
}
|
||||
|
||||
public function v2raySubscription($key, $fs = 0)
|
||||
{
|
||||
$pac = $this->getPacConf();
|
||||
$domain = $this->getDomain();
|
||||
$xr = $this->getXray();
|
||||
|
||||
$flag = true;
|
||||
foreach ($xr['inbounds'][0]['settings']['clients'] as $k => $v) {
|
||||
if ($v['id'] == $key) {
|
||||
if (!empty($fs)) {
|
||||
return $this->userXr($k);
|
||||
}
|
||||
if (empty($v['off'])) {
|
||||
$flag = false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ($flag) {
|
||||
return;
|
||||
}
|
||||
|
||||
$c = json_decode(file_get_contents('/config/v2ray.json'), true);
|
||||
|
||||
$c['outbounds'][0]['settings']['vnext'][0]['address'] = $domain;
|
||||
$c['outbounds'][0]['settings']['vnext'][0]['users'][0]['id'] = $key;
|
||||
$c['outbounds'][0]['streamSettings']['realitySettings']['serverName'] = $xr['inbounds'][0]['streamSettings']['realitySettings']['serverNames'][0];
|
||||
$c['outbounds'][0]['streamSettings']['realitySettings']['publicKey'] = $pac['xray'];
|
||||
$c['outbounds'][0]['streamSettings']['realitySettings']['shortId'] = $xr['inbounds'][0]['streamSettings']['realitySettings']['shortIds'][0];
|
||||
$c['routing']['rules'][0]['domain'] = array_keys(array_filter($pac['includelist']));
|
||||
|
||||
if (empty($c['routing']['rules'][0]['domain'])) {
|
||||
unset($c['routing']['rules'][0]);
|
||||
$c['routing']['rules'] = array_values($c['routing']['rules']);
|
||||
|
||||
}
|
||||
echo json_encode($c);
|
||||
}
|
||||
|
||||
public function subscription()
|
||||
{
|
||||
$type = $_GET['t'] == 's' ? 'v2ray' : 'sing';
|
||||
@@ -4901,9 +4913,9 @@ DNS-over-HTTPS with IP:
|
||||
|
||||
switch ($_GET['t']) {
|
||||
case 's':
|
||||
$c['outbounds'][0]['settings']['vnext'][0]['address'] = $domain;
|
||||
$c['outbounds'][0]['settings']['vnext'][0]['address'] = '~domain~';
|
||||
$c['outbounds'][0]['settings']['vnext'][0]['users'][0] = [
|
||||
'id' => $uid,
|
||||
'id' => '~uid~',
|
||||
'encryption' => 'none',
|
||||
];
|
||||
if ($pac['transport'] == 'Websocket') {
|
||||
@@ -4915,7 +4927,7 @@ DNS-over-HTTPS with IP:
|
||||
],
|
||||
"tlsSettings" => [
|
||||
"allowInsecure" => false,
|
||||
"serverName" => $domain,
|
||||
"serverName" => '~domain~',
|
||||
"fingerprint" => "chrome"
|
||||
]
|
||||
];
|
||||
@@ -4926,10 +4938,10 @@ DNS-over-HTTPS with IP:
|
||||
"network" => "tcp",
|
||||
"security" => "reality",
|
||||
"realitySettings" => [
|
||||
"serverName" => $xr['inbounds'][0]['streamSettings']['realitySettings']['serverNames'][0],
|
||||
"serverName" => '~server_name~',
|
||||
"fingerprint" => "chrome",
|
||||
"publicKey" => $pac['xray'],
|
||||
"shortId" => $xr['inbounds'][0]['streamSettings']['realitySettings']['shortIds'][0],
|
||||
"publicKey" => '~public_key~',
|
||||
"shortId" => '~short_id~',
|
||||
]
|
||||
];
|
||||
$c['outbounds'][0]['mux'] = [
|
||||
@@ -4937,24 +4949,10 @@ DNS-over-HTTPS with IP:
|
||||
"concurrency" => -1
|
||||
];
|
||||
}
|
||||
|
||||
foreach ($c['routing']['rules'] as $k => $v) {
|
||||
if (array_key_exists('domain', $v) && $v['domain'] == '~pac~') {
|
||||
$c['routing']['rules'][$k]['domain'] = array_keys(array_filter($pac['includelist'] ?: []));
|
||||
if (empty($c['routing']['rules'][$k]['domain'])) {
|
||||
unset($c['routing']['rules'][$k]);
|
||||
}
|
||||
}
|
||||
}
|
||||
$c['routing']['rules'] = array_values($c['routing']['rules']);
|
||||
break;
|
||||
case 'si':
|
||||
if ($c['dns']['servers'][0]['address'] == '~dns~') {
|
||||
$c['dns']['servers'][0]['address'] = "https://$domain/dns-query/$uid";
|
||||
}
|
||||
|
||||
$c['outbounds'][0]['server'] = $domain;
|
||||
$c['outbounds'][0]['uuid'] = $uid;
|
||||
$c['outbounds'][0]['server'] = '~domain~';
|
||||
$c['outbounds'][0]['uuid'] = '~uid~';
|
||||
if ($pac['transport'] == 'Websocket') {
|
||||
unset($c['outbounds'][0]['tls']['reality']);
|
||||
unset($c['outbounds'][0]['flow']);
|
||||
@@ -4962,81 +4960,52 @@ DNS-over-HTTPS with IP:
|
||||
"type" => "ws",
|
||||
"path" => "/ws"
|
||||
];
|
||||
$c['outbounds'][0]['tls']['server_name'] = $domain;
|
||||
$c['outbounds'][0]['tls']['server_name'] = '~domain~';
|
||||
} else {
|
||||
unset($c['outbounds'][0]["transport"]);
|
||||
$c['outbounds'][0]['flow'] = 'xtls-rprx-vision';
|
||||
$c['outbounds'][0]['tls']['reality']['public_key'] = $pac['xray'];
|
||||
$c['outbounds'][0]['tls']['server_name'] = $xr['inbounds'][0]['streamSettings']['realitySettings']['serverNames'][0];
|
||||
$c['outbounds'][0]['tls']['reality']['short_id'] = $xr['inbounds'][0]['streamSettings']['realitySettings']['shortIds'][0];
|
||||
$c['outbounds'][0]['tls']['reality']['public_key'] = '~public_key~';
|
||||
$c['outbounds'][0]['tls']['server_name'] = '~server_name~';
|
||||
$c['outbounds'][0]['tls']['reality']['short_id'] = '~short_id~';
|
||||
}
|
||||
|
||||
foreach ($c['route']['rules'] as $k => $v) {
|
||||
if (array_key_exists('domain_suffix', $v) && $v['domain_suffix'] == '~pac~') {
|
||||
$c['route']['rules'][$k]['domain_suffix'] = array_keys(array_filter($pac['includelist'] ?: []));
|
||||
if (empty($c['route']['rules'][$k]['domain_suffix'])) {
|
||||
unset($c['route']['rules'][$k]);
|
||||
}
|
||||
}
|
||||
}
|
||||
$c['route']['rules'] = array_values($c['route']['rules']);
|
||||
$c['route'] = $this->addRuleSet($c['route']);
|
||||
$c['route'] = $this->addPackageRule($c['route']);
|
||||
$c['route'] = $this->addProcessRule($c['route']);
|
||||
$c['route'] = $this->createRuleSet($c['route'], $uid, $domain);
|
||||
$c['route'] = $this->clearEmptyRules($c['route']);
|
||||
$c['route'] = $this->addRuleSet($c['route']);
|
||||
$c['route'] = $this->createRuleSet($c['route'], $uid, $domain);
|
||||
break;
|
||||
}
|
||||
|
||||
$json = $this->replaceTags(json_encode($c), [
|
||||
'"~pac~"' => json_encode(array_keys(array_filter($pac['includelist'] ?: []))),
|
||||
'~dns~' => "https://$domain/dns-query/$uid",
|
||||
'~uid~' => $uid,
|
||||
'~domain~' => $domain,
|
||||
'~short_id~' => $xr['inbounds'][0]['streamSettings']['realitySettings']['shortIds'][0],
|
||||
'~public_key~' => $pac['xray'],
|
||||
'~server_name~' => $xr['inbounds'][0]['streamSettings']['realitySettings']['serverNames'][0],
|
||||
]);
|
||||
$json = $this->clearEmptyRules($json);
|
||||
|
||||
header('Content-type: application/json');
|
||||
echo json_encode($c);
|
||||
echo $json;
|
||||
}
|
||||
|
||||
public function clearEmptyRules($route)
|
||||
public function replaceTags($subject, $tags)
|
||||
{
|
||||
foreach ($route['rules'] as $k => $v) {
|
||||
if (count($v) == 1) {
|
||||
unset($route['rules'][$k]);
|
||||
}
|
||||
}
|
||||
$route['rules'] = array_values($route['rules']);
|
||||
return $route;
|
||||
return str_replace(array_keys($tags), array_values($tags), $subject);
|
||||
}
|
||||
|
||||
public function addPackageRule($route)
|
||||
public function clearEmptyRules($json)
|
||||
{
|
||||
foreach ($route['rules'] as $k => $v) {
|
||||
if (array_key_exists('package_name', $v)) {
|
||||
$p = $this->getPacConf();
|
||||
if (!empty($t = array_filter($p['packagelist'] ?: []))) {
|
||||
$route['rules'][$k] = [
|
||||
'package_name' => array_keys($t),
|
||||
'outbound' => $p['app_outbound'] ? 'direct' : 'proxy',
|
||||
];
|
||||
} else {
|
||||
unset($route['rules'][$k]);
|
||||
$json = json_decode($json, 1);
|
||||
if (!empty($json['routing']['rules'])) {
|
||||
foreach ($json['routing']['rules'] as $k => $v) {
|
||||
if (array_key_exists('domain', $v) && empty($v['domain'])) {
|
||||
unset($json['routing']['rules'][$k]);
|
||||
}
|
||||
}
|
||||
$json['routing']['rules'] = array_values($json['routing']['rules']);
|
||||
}
|
||||
return $route;
|
||||
}
|
||||
|
||||
public function addProcessRule($route)
|
||||
{
|
||||
foreach ($route['rules'] as $k => $v) {
|
||||
if (array_key_exists('process_name', $v)) {
|
||||
$p = $this->getPacConf();
|
||||
if (!empty($t = array_filter($p['processlist'] ?: []))) {
|
||||
$route['rules'][$k] = [
|
||||
'process_name' => array_keys($t),
|
||||
'outbound' => $p['process_outbound'] ? 'direct' : 'proxy',
|
||||
];
|
||||
} else {
|
||||
unset($route['rules'][$k]);
|
||||
}
|
||||
}
|
||||
}
|
||||
return $route;
|
||||
return json_encode($json);
|
||||
}
|
||||
|
||||
public function addRuleSet($route)
|
||||
@@ -5721,13 +5690,46 @@ DNS-over-HTTPS with IP:
|
||||
$this->logs();
|
||||
}
|
||||
|
||||
public function selfUpdate()
|
||||
{
|
||||
require __DIR__ . '/config.php';
|
||||
if (!empty($c['admin'])) {
|
||||
$ip = getenv('IP');
|
||||
$rm = explode(':', trim(file_get_contents('/update/reload_message')));
|
||||
$m = file_get_contents('/update/message');
|
||||
foreach ($c['admin'] as $k => $v) {
|
||||
$r = $this->send($v, "start $ip");
|
||||
$this->input['chat'] = $v;
|
||||
$this->input['message_id'] = $r['result']['message_id'];
|
||||
if (file_exists($this->update)) {
|
||||
if (!empty($m)) {
|
||||
$this->send($v, "<pre>$m</pre>", $v == $rm[0] ? $rm[1] : 0);
|
||||
}
|
||||
$r = $this->send($v, "import settings");
|
||||
$this->input['chat'] = $v;
|
||||
$this->input['message_id'] = $r['result']['message_id'];
|
||||
$this->input['callback_id'] = $r['result']['message_id'];
|
||||
if (empty($flag)) {
|
||||
$this->importFile($this->update);
|
||||
unlink($this->update);
|
||||
$flag = true;
|
||||
}
|
||||
} else {
|
||||
$this->menu();
|
||||
}
|
||||
}
|
||||
}
|
||||
file_put_contents('/update/message', '');
|
||||
file_put_contents('/update/reload_message', '');
|
||||
}
|
||||
|
||||
public function backup()
|
||||
{
|
||||
$r = $this->send(
|
||||
$this->input['chat'],
|
||||
"@{$this->input['username']} enter like start / period",
|
||||
"@{$this->input['username']} enter like: start / period",
|
||||
$this->input['message_id'],
|
||||
reply: 'enter like now / 12:00',
|
||||
reply: 'enter like: now / 12 hours',
|
||||
);
|
||||
$_SESSION['reply'][$r['result']['message_id']] = [
|
||||
'start_message' => $this->input['message_id'],
|
||||
|
||||
+1
-2
@@ -7,5 +7,4 @@ require __DIR__ . '/bot.php';
|
||||
require __DIR__ . '/config.php';
|
||||
require __DIR__ . '/i18n.php';
|
||||
|
||||
$bot = new Bot($c['key'], $i);
|
||||
$bot->cron();
|
||||
(new Bot($c['key'], $i))->cron();
|
||||
|
||||
+5
-4
@@ -10,8 +10,9 @@ if ($c['debug']) {
|
||||
}
|
||||
|
||||
$bot = new Bot($c['key'], $i);
|
||||
$bot->adguardProtect();
|
||||
$bot->adguardCheckPswd();
|
||||
$bot->setcommands();
|
||||
$bot->syncPortClients();
|
||||
$bot->setwebhook();
|
||||
$bot->selfUpdate();
|
||||
$bot->adguardCheckPswd();
|
||||
$bot->adguardProtect();
|
||||
$bot->syncPortClients();
|
||||
$bot->setcommands();
|
||||
|
||||
@@ -12,32 +12,6 @@ if ($c['debug']) {
|
||||
|
||||
$bot = new Bot($c['key'], $i);
|
||||
|
||||
if (!empty($c['admin'])) {
|
||||
$ip = getenv('IP');
|
||||
$rm = explode(':', trim(file_get_contents('/update/reload_message')));
|
||||
$m = file_get_contents('/update/message');
|
||||
foreach ($c['admin'] as $k => $v) {
|
||||
$r = $bot->send($v, "start $ip");
|
||||
$bot->input['chat'] = $v;
|
||||
$bot->input['message_id'] = $r['result']['message_id'];
|
||||
if (file_exists($bot->update)) {
|
||||
if (!empty($m)) {
|
||||
$bot->send($v, "<pre>$m</pre>", $v == $rm[0] ? $rm[1] : 0);
|
||||
}
|
||||
$r = $bot->send($v, "import settings");
|
||||
$bot->input['chat'] = $v;
|
||||
$bot->input['message_id'] = $r['result']['message_id'];
|
||||
$bot->input['callback_id'] = $r['result']['message_id'];
|
||||
if (empty($flag)) {
|
||||
$bot->importFile($bot->update);
|
||||
unlink($bot->update);
|
||||
$flag = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
file_put_contents('/update/message', '');
|
||||
file_put_contents('/update/reload_message', '');
|
||||
$bot->restartTG();
|
||||
$bot->sslip();
|
||||
$bot->cleanDocker();
|
||||
|
||||
+1
-99
@@ -1,99 +1 @@
|
||||
{
|
||||
"zapret": false,
|
||||
"excludelist": {
|
||||
"(?:v|w)ul(?:c|k)an": true,
|
||||
"^\\d": true,
|
||||
"^a\\w-": true,
|
||||
"^admiral": true,
|
||||
"^avtomaty": true,
|
||||
"^azart": true,
|
||||
"^azimob": true,
|
||||
"^baltplay": true,
|
||||
"a(?:s|z)ino": true,
|
||||
"adrenalin": true,
|
||||
"alco": true,
|
||||
"bet": true,
|
||||
"prostitut": true,
|
||||
"zenit": true,
|
||||
"zerkalo": true,
|
||||
"777": true
|
||||
},
|
||||
"includelist": {},
|
||||
"reverselist": {},
|
||||
"subzoneslist": {
|
||||
"3dn": false,
|
||||
"3nx": true,
|
||||
"akadns": true,
|
||||
"appspot": true,
|
||||
"azurewebsites": true,
|
||||
"beget": true,
|
||||
"berlogovo": true,
|
||||
"biz": true,
|
||||
"brightcove": true,
|
||||
"cc": true,
|
||||
"cloudfront": true,
|
||||
"co": true,
|
||||
"com": true,
|
||||
"cu": true,
|
||||
"ddns": true,
|
||||
"deviantart": true,
|
||||
"dn": true,
|
||||
"dp": true,
|
||||
"dyndns": true,
|
||||
"edgecastcdn": true,
|
||||
"edu": true,
|
||||
"eu": true,
|
||||
"fastly": true,
|
||||
"force": true,
|
||||
"github": true,
|
||||
"google": true,
|
||||
"googleusercontent": true,
|
||||
"gov": true,
|
||||
"herokuapp": true,
|
||||
"hldns": true,
|
||||
"ho": true,
|
||||
"hopto": true,
|
||||
"hwcdn": true,
|
||||
"i": true,
|
||||
"iboards": true,
|
||||
"in": true,
|
||||
"info": true,
|
||||
"int": true,
|
||||
"itch": true,
|
||||
"keenetic": true,
|
||||
"kiev": true,
|
||||
"kirov": true,
|
||||
"linode": true,
|
||||
"livejournal": true,
|
||||
"maryno": true,
|
||||
"mil": true,
|
||||
"msk": true,
|
||||
"my1": true,
|
||||
"mybb2": true,
|
||||
"ne": true,
|
||||
"net": true,
|
||||
"netdna-ssl": true,
|
||||
"nnov": true,
|
||||
"notion": true,
|
||||
"nov": true,
|
||||
"od": true,
|
||||
"org": true,
|
||||
"pp": true,
|
||||
"pximg": true,
|
||||
"pythonanywhere": true,
|
||||
"ru": true,
|
||||
"scaleway": true,
|
||||
"sl": true,
|
||||
"sl-reverse": true,
|
||||
"spb": true,
|
||||
"tilda": true,
|
||||
"trafficmanager": true,
|
||||
"tut": true,
|
||||
"u-stream": true,
|
||||
"ucoz": true,
|
||||
"v": true,
|
||||
"vercel": true,
|
||||
"wix": true,
|
||||
"wixmp": true
|
||||
}
|
||||
}
|
||||
{}
|
||||
|
||||
+3
-2
@@ -33,7 +33,8 @@ services:
|
||||
- ./config/sshd_config:/etc/ssh/sshd_config
|
||||
- ./logs/:/logs/
|
||||
ports:
|
||||
- 443:443
|
||||
- 443:443/tcp
|
||||
- 443:443/udp
|
||||
hostname: upstream
|
||||
container_name: upstream-${VER}
|
||||
depends_on:
|
||||
@@ -127,7 +128,7 @@ services:
|
||||
required: false
|
||||
hostname: php
|
||||
container_name: php-${VER}
|
||||
restart: unless-stopped
|
||||
# restart: unless-stopped
|
||||
stop_grace_period: 1s
|
||||
command: ["/bin/sh", "/start_php.sh"]
|
||||
working_dir: /app
|
||||
|
||||
@@ -2,8 +2,12 @@ rm /ssh/key*
|
||||
ssh-keygen -m PEM -t rsa -f /ssh/key -N ''
|
||||
openssl req -newkey rsa:2048 -sha256 -nodes -x509 -days 365 -keyout /certs/self_private -out /certs/self_public -subj "/C=NN/ST=N/L=N/O=N/CN=$IP"
|
||||
php init.php
|
||||
php cron.php &
|
||||
unitd --log /logs/unit_error
|
||||
curl -X PUT --data-binary @/config/unit.json --unix-socket /var/run/control.unit.sock http://localhost/config
|
||||
pkill unitd
|
||||
unitd --no-daemon --control 0.0.0.0:8080 --log /logs/unit_error
|
||||
if [[ -f "/start" && -f "/ssh/key.pub" && -s "/ssh/key.pub" ]]; then
|
||||
php cron.php &
|
||||
unitd --log /logs/unit_error
|
||||
curl -X PUT --data-binary @/config/unit.json --unix-socket /var/run/control.unit.sock http://localhost/config
|
||||
pkill unitd
|
||||
unitd --no-daemon --control 0.0.0.0:8080 --log /logs/unit_error
|
||||
else
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
@@ -1,3 +1,12 @@
|
||||
21.10.2024 v1.72
|
||||
- xray: теги в кастомных шаблонах
|
||||
21.10.2024 v1.71
|
||||
- фикс установки nip.io при первом запуске
|
||||
- фикс инициализации вебпанели adguardHome при первом запуске
|
||||
14.10.2024 v1.70
|
||||
- xray route: учет регистра в process_name, package_name
|
||||
14.10.2024 v1.69
|
||||
- xray route: добавлен список process_name
|
||||
14.10.2024 v1.68
|
||||
- singbox template: package_name -> ruleset
|
||||
13.10.2024 v1.67
|
||||
|
||||
Reference in New Issue
Block a user