Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3b9b930b48 | |||
| bd17e5cd14 | |||
| c3975549db | |||
| 3087bee82d | |||
| 96fbf5a3c3 | |||
| b32bd960fa | |||
| ba0895ea4c | |||
| 68e6e5919d |
+122
-102
@@ -271,6 +271,9 @@ class Bot
|
||||
case preg_match('~^/addOcUser$~', $this->input['callback'], $m):
|
||||
$this->addOcUser();
|
||||
break;
|
||||
case preg_match('~^/changeOcExpose$~', $this->input['callback'], $m):
|
||||
$this->changeOcExpose();
|
||||
break;
|
||||
case preg_match('~^/addXrUser$~', $this->input['callback'], $m):
|
||||
$this->addXrUser();
|
||||
break;
|
||||
@@ -1078,11 +1081,13 @@ class Bot
|
||||
[$start, $period] = explode('/', $c['backup']);
|
||||
$start = strtotime($start);
|
||||
$period = strtotime($period, 0);
|
||||
if ($now - $start >= $period && ($now - $start) % $period == 0) {
|
||||
if (!empty($c['pinbackup'])) {
|
||||
$this->pinAdmin($c['pinbackup'], 1);
|
||||
if (!empty($start) && !empty($period)) {
|
||||
if ($now - $start >= $period && ($now - $start) % $period == 0) {
|
||||
if (!empty($c['pinbackup'])) {
|
||||
$this->pinAdmin($c['pinbackup'], 1);
|
||||
}
|
||||
$this->pinBackup();
|
||||
}
|
||||
$this->pinBackup();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1293,7 +1298,7 @@ class Bot
|
||||
if (!empty($file)) {
|
||||
file_put_contents($file, $json);
|
||||
}
|
||||
$bot = $this->request('getMyName', [])['result']['name'];
|
||||
$bot = preg_replace('~[\W]~iu', '_', $this->request('getMyName', [])['result']['name']);
|
||||
return $this->upload("{$bot}_export_" . date('d_m_Y_H_i') . '.json', $json);
|
||||
}
|
||||
|
||||
@@ -1446,9 +1451,7 @@ class Bot
|
||||
$this->language = $this->getPacConf()['language'] ?: 'en';
|
||||
$this->limit = $this->getPacConf()['limitpage'] ?: 5;
|
||||
sleep(3);
|
||||
if (empty($file)) {
|
||||
$this->menu();
|
||||
}
|
||||
$this->menu();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1760,10 +1763,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);
|
||||
@@ -1784,8 +1791,6 @@ class Bot
|
||||
if (empty($c['domain'])) {
|
||||
$this->addDomain(str_replace('.', '-', $this->ip) . '.nip.io', 1);
|
||||
$this->setSSL('letsencrypt');
|
||||
} else {
|
||||
$this->menu();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3840,9 +3845,10 @@ DNS-over-HTTPS with IP:
|
||||
public function menu($type = false, $arg = false, $return = false)
|
||||
{
|
||||
$domain = $this->getPacConf()['domain'] ?: $this->ip;
|
||||
$cron = exec('pgrep -f cron.php');
|
||||
$menu = [
|
||||
'main' => [
|
||||
'text' => 'v' . getenv('VER'),
|
||||
'text' => 'v' . getenv('VER') . "\ncron: " . $this->i18n($cron ? 'on' : 'off') . ($cron ? '' : ' show <code>logs/php_error</code>'),
|
||||
'data' => [
|
||||
[
|
||||
[
|
||||
@@ -4129,7 +4135,9 @@ DNS-over-HTTPS with IP:
|
||||
preg_match('~^camouflage_secret[^\n]+?"([^"]+)*"~sm', $ocserv, $m);
|
||||
$cs = $m[1];
|
||||
preg_match('~^dns = ([^\n]+)~sm', $ocserv, $m);
|
||||
$dns = $m[1];
|
||||
$dns = $m[1];
|
||||
preg_match('~^expose-iroutes = (true)~sm', $ocserv, $m);
|
||||
$expose = $m[1];
|
||||
$pass = htmlspecialchars($pac['ocserv']);
|
||||
$text[] = "Menu -> OpenConnect";
|
||||
if (!empty($m[1])) {
|
||||
@@ -4150,6 +4158,12 @@ DNS-over-HTTPS with IP:
|
||||
'callback_data' => "/changeOcDns",
|
||||
],
|
||||
];
|
||||
$data[] = [
|
||||
[
|
||||
'text' => $this->i18n('expose-iroutes') . ' ' . $this->i18n($expose ? 'on' : 'off'),
|
||||
'callback_data' => "/changeOcExpose",
|
||||
],
|
||||
];
|
||||
$data[] = [
|
||||
[
|
||||
'text' => $this->i18n('add peer'),
|
||||
@@ -4177,6 +4191,15 @@ DNS-over-HTTPS with IP:
|
||||
];
|
||||
}
|
||||
|
||||
public function changeOcExpose()
|
||||
{
|
||||
$c = file_get_contents('/config/ocserv.conf');
|
||||
preg_match('~^expose-iroutes = ([^\n]+)~sm', $c, $m);
|
||||
$t = preg_replace('~^expose-iroutes[^\n]+~sm', "expose-iroutes = " . ($m[1] == 'true' ? 'false' : 'true'), $c);
|
||||
$this->restartOcserv($t);
|
||||
$this->menu('oc');
|
||||
}
|
||||
|
||||
public function deloc($i)
|
||||
{
|
||||
$clients = $this->getClientsOc();
|
||||
@@ -4829,45 +4852,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';
|
||||
@@ -4952,9 +4936,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') {
|
||||
@@ -4966,7 +4950,7 @@ DNS-over-HTTPS with IP:
|
||||
],
|
||||
"tlsSettings" => [
|
||||
"allowInsecure" => false,
|
||||
"serverName" => $domain,
|
||||
"serverName" => '~domain~',
|
||||
"fingerprint" => "chrome"
|
||||
]
|
||||
];
|
||||
@@ -4977,10 +4961,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'] = [
|
||||
@@ -4988,24 +4972,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']);
|
||||
@@ -5013,43 +4983,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->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]);
|
||||
return str_replace(array_keys($tags), array_values($tags), $subject);
|
||||
}
|
||||
|
||||
public function clearEmptyRules($json)
|
||||
{
|
||||
$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']);
|
||||
}
|
||||
$route['rules'] = array_values($route['rules']);
|
||||
return $route;
|
||||
return json_encode($json);
|
||||
}
|
||||
|
||||
public function addRuleSet($route)
|
||||
@@ -5589,7 +5568,11 @@ DNS-over-HTTPS with IP:
|
||||
];
|
||||
$backup = array_filter(explode('/', $conf['backup']));
|
||||
if (!empty($backup)) {
|
||||
$backup = "{$backup[0]} start / {$backup[1]} period";
|
||||
if (!empty(strtotime($backup[0])) && !empty(strtotime($backup[1]))) {
|
||||
$backup = "{$backup[0]} start / {$backup[1]} period";
|
||||
} else {
|
||||
$backup = $this->i18n('off') . " {$conf['backup']} - wrong format";
|
||||
}
|
||||
}
|
||||
$data[] = [
|
||||
[
|
||||
@@ -5734,13 +5717,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'],
|
||||
@@ -5866,7 +5882,11 @@ DNS-over-HTTPS with IP:
|
||||
$c['backup'] = '';
|
||||
} else {
|
||||
[$start, $period] = explode('/', $text);
|
||||
$c['backup'] = implode(' / ', [date('Y-m-d H:i', strtotime($start)), trim($period)]);
|
||||
if (!empty(strtotime($start)) && !empty(strtotime($period))) {
|
||||
$c['backup'] = implode(' / ', [date('Y-m-d H:i', strtotime($start)), trim($period)]);
|
||||
} else {
|
||||
$this->send($this->input['from'], $this->input['message'] . ' - wrong format');
|
||||
}
|
||||
}
|
||||
if ($c['pinbackup']) {
|
||||
$this->pinAdmin($c['pinbackup'], 1);
|
||||
|
||||
+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();
|
||||
|
||||
@@ -341,4 +341,8 @@ $i = [
|
||||
'en' => 'fake html',
|
||||
'ru' => 'фейк заглушка',
|
||||
],
|
||||
'expose-iroutes' => [
|
||||
'en' => 'expose-iroutes',
|
||||
'ru' => 'изоляция клиентов',
|
||||
],
|
||||
];
|
||||
|
||||
+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();
|
||||
|
||||
+2
-2
@@ -180,7 +180,7 @@ server-key = /certs/cert_private
|
||||
# the isolation was tested at. If you get random failures on worker processes, try
|
||||
# disabling that option and report the failures you, along with system and debugging
|
||||
# information at: https://gitlab.com/openconnect/ocserv/issues
|
||||
isolate-workers = true
|
||||
isolate-workers = false
|
||||
|
||||
# A banner to be displayed on clients after connection
|
||||
#banner = "Welcome"
|
||||
@@ -584,7 +584,7 @@ route = default
|
||||
# When set to true, all client's iroutes are made visible to all
|
||||
# connecting clients except for the ones offering them. This option
|
||||
# only makes sense if config-per-user is set.
|
||||
#expose-iroutes = true
|
||||
expose-iroutes = false
|
||||
|
||||
# Groups that a client is allowed to select from.
|
||||
# A client may belong in multiple groups, and in certain use-cases
|
||||
|
||||
+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
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
b:
|
||||
docker compose build
|
||||
u: # запуск контейнеров
|
||||
$(eval IP := $(shell curl -s -t 1 2ip.io || curl -s -t 1 ipinfo.io/ip || curl -s -t 1 ifconfig.me))
|
||||
bash ./update/update.sh &
|
||||
touch ./override.env
|
||||
IP=$(shell curl ipinfo.io/ip) VER=$(shell git describe --tags) docker compose --env-file ./.env --env-file ./override.env up -d --force-recreate
|
||||
IP=$(IP) VER=$(shell git describe --tags) docker compose --env-file ./.env --env-file ./override.env up -d --force-recreate
|
||||
d: # остановка контейнеров
|
||||
-kill -9 $(shell cat ./update/update_pid) > /dev/null
|
||||
docker compose down --remove-orphans
|
||||
|
||||
@@ -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,20 @@
|
||||
23.10.2024 v1.77
|
||||
- вывод статуса cron
|
||||
- фикс с отправкой бэкапа при спецсимволах в названии бота
|
||||
- проверка формата времени в автобэкапе
|
||||
22.10.2024 v1.76
|
||||
- улучшение определения ip бота при старте
|
||||
22.10.2024 v1.75
|
||||
- openconnect: isolate-workers = false
|
||||
21.10.2024 v1.74
|
||||
- openconnect: expose-iroutes on/off
|
||||
21.10.2024 v1.73
|
||||
- openconnect: ограничение контейнера по цпу и памяти
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user