Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 795c357897 | |||
| e172868f39 | |||
| 4ef38775b0 | |||
| abdb4d791a | |||
| 6948239144 | |||
| ff0fd177c7 | |||
| 28e66d46fd |
+9
-9
@@ -1101,7 +1101,7 @@ class Bot
|
||||
{
|
||||
try {
|
||||
require __DIR__ . '/config.php';
|
||||
if (!empty($c['admin']) && (empty($this->time2) || ((time() - $this->time2) > 3600))) {
|
||||
if (!empty($c['admin']) && date('H') == 12 && (empty($this->time2) || ((time() - $this->time2) > 4600))) {
|
||||
$this->time2 = time();
|
||||
$cert = $this->expireCert();
|
||||
if (!empty($cert) && $cert - 60 * 60 * 24 * 14 < time()) {
|
||||
@@ -1356,7 +1356,7 @@ class Bot
|
||||
$out[] = 'update xray';
|
||||
$this->update($this->input['chat'], $this->input['message_id'], implode("\n", $out));
|
||||
$this->restartXray($json['xray']);
|
||||
$this->setUpstreamDomain($json['xray']['inbounds'][0]['streamSettings']['realitySettings']['serverNames'][0]);
|
||||
$this->setUpstreamDomain($json['pac']['transport'] == 'Websocket' ? 't' : ($json['pac']['reality']['domain'] ?: $json['xray']['inbounds'][0]['streamSettings']['realitySettings']['serverNames'][0]));
|
||||
}
|
||||
// ocserv
|
||||
if (!empty($json['oc'])) {
|
||||
@@ -4692,7 +4692,7 @@ 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'] = $_GET['cdn'] ?: $domain;
|
||||
$c['outbounds'][0]['settings']['vnext'][0]['users'][0] = [
|
||||
'id' => $uid,
|
||||
'encryption' => 'none',
|
||||
@@ -4706,14 +4706,14 @@ DNS-over-HTTPS with IP:
|
||||
],
|
||||
"tlsSettings" => [
|
||||
"allowInsecure" => false,
|
||||
"serverName" => $domain,
|
||||
"serverName" => $_GET['cdn'] ?: $domain,
|
||||
"fingerprint" => "chrome"
|
||||
]
|
||||
];
|
||||
unset($c['outbounds'][0]['mux']);
|
||||
} else {
|
||||
$c['outbounds'][0]['settings']['vnext'][0]['users'][0]["flow"] = "xtls-rprx-vision";
|
||||
$c['outbounds'][0]['streamSettings'] = [
|
||||
$c['outbounds'][0]['settings']['vnext'][0]['users'][0]["flow"] = "xtls-rprx-vision";
|
||||
$c['outbounds'][0]['streamSettings'] = [
|
||||
"network" => "tcp",
|
||||
"security" => "reality",
|
||||
"realitySettings" => [
|
||||
@@ -4744,7 +4744,7 @@ DNS-over-HTTPS with IP:
|
||||
$c['dns']['servers'][0]['address'] = "tls://" . ($pac['adguardkey'] ? "{$pac['adguardkey']}." : '') . "$domain";
|
||||
}
|
||||
|
||||
$c['outbounds'][0]['server'] = $domain;
|
||||
$c['outbounds'][0]['server'] = $_GET['cdn'] ?: $domain;
|
||||
$c['outbounds'][0]['uuid'] = $uid;
|
||||
if ($pac['transport'] == 'Websocket') {
|
||||
unset($c['outbounds'][0]['tls']['reality']);
|
||||
@@ -4753,7 +4753,7 @@ DNS-over-HTTPS with IP:
|
||||
"type" => "ws",
|
||||
"path" => "/ws"
|
||||
];
|
||||
$c['outbounds'][0]['tls']['server_name'] = $domain;
|
||||
$c['outbounds'][0]['tls']['server_name'] = $_GET['cdn'] ?: $domain;
|
||||
} else {
|
||||
unset($c['outbounds'][0]["transport"]);
|
||||
$c['outbounds'][0]['flow'] = 'xtls-rprx-vision';
|
||||
@@ -5723,7 +5723,7 @@ DNS-over-HTTPS with IP:
|
||||
$conf[] = '';
|
||||
$conf[] = $peer['# PublicKey'] ? '# [Peer]' : '[Peer]';
|
||||
if (!empty($peer['Endpoint'])) {
|
||||
$peer['Endpoint'] = ($pac['domain'] && !$pac[$this->getInstanceWG(1) . 'amnezia'] ? $pac['domain'] : $this->ip) . ":" . getenv($this->getInstanceWG(1) ? 'WG1PORT' : 'WGPORT');
|
||||
$peer['Endpoint'] = ($pac['domain'] ? $pac['domain'] : $this->ip) . ":" . getenv($this->getInstanceWG(1) ? 'WG1PORT' : 'WGPORT');
|
||||
}
|
||||
foreach ($peer as $k => $v) {
|
||||
$conf[] = "$k = $v";
|
||||
|
||||
@@ -3,7 +3,7 @@ b:
|
||||
u: # запуск контейнеров
|
||||
bash ./update/update.sh &
|
||||
touch ./override.env
|
||||
IP=$(shell curl https://ipinfo.io/ip) VER=$(shell git describe --tags) docker compose --env-file ./.env --env-file ./override.env up -d --force-recreate
|
||||
IP=$(shell curl ipinfo.io/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
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
10.09.2024 v1.53
|
||||
- домен в endpoint для амнезии
|
||||
10.09.2024 v1.52
|
||||
- фикс спамящего уведомления о просрочке сертификата
|
||||
10.09.2024 v1.51
|
||||
- фикс ipinfo
|
||||
08.09.2024 v1.50
|
||||
- fix import with transport
|
||||
08.09.2024 v1.49
|
||||
- fix add user xray with transport
|
||||
08.09.2024 v1.48
|
||||
|
||||
Reference in New Issue
Block a user