Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d7ed7042ec | |||
| 4496a30552 | |||
| ca1a596f85 | |||
| b3edf1bdcc | |||
| c6306aa918 | |||
| d5bbc9a564 | |||
| d2aab8ee4b | |||
| 304217d36e |
+31
-20
@@ -4323,47 +4323,47 @@ DNS-over-HTTPS with IP:
|
|||||||
'data' => [
|
'data' => [
|
||||||
[
|
[
|
||||||
[
|
[
|
||||||
'text' => $this->i18n($this->getPacConf()['amnezia'] ? 'amnezia' : 'wg_title'),
|
'text' => $this->i18n($this->getPacConf()['amnezia'] ? 'amnezia' : 'wg_title') . ' ' . $this->i18n($this->ssh($this->getPacConf()['amnezia'] ? 'awg' : 'wg', 'wg') ? 'on' : 'off'),
|
||||||
'callback_data' => "/changeWG 0",
|
'callback_data' => "/changeWG 0",
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'text' => $this->i18n($this->getPacConf()['wg1_amnezia'] ? 'amnezia' : 'wg_title'),
|
'text' => $this->i18n($this->getPacConf()['wg1_amnezia'] ? 'amnezia' : 'wg_title') . ' ' . $this->i18n($this->ssh($this->getPacConf()['wg1_amnezia'] ? 'awg' : 'wg', 'wg1') ? 'on' : 'off'),
|
||||||
'callback_data' => "/changeWG 1",
|
'callback_data' => "/changeWG 1",
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
[
|
[
|
||||||
'text' => $this->i18n('xray'),
|
'text' => $this->i18n('xray') . ' ' . $this->i18n($this->ssh('pgrep xray', 'xr') ? 'on' : 'off'),
|
||||||
'callback_data' => "/xray",
|
'callback_data' => "/xray",
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'text' => $this->i18n('naive'),
|
'text' => $this->i18n('naive') . ' ' . $this->i18n($this->ssh('pgrep caddy', 'np') ? 'on' : 'off'),
|
||||||
'callback_data' => "/menu naive",
|
'callback_data' => "/menu naive",
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
[
|
[
|
||||||
'text' => $this->i18n('ocserv'),
|
'text' => $this->i18n('ocserv') . ' ' . $this->i18n($this->ssh('pgrep ocserv', 'oc') ? 'on' : 'off'),
|
||||||
'callback_data' => "/menu oc",
|
'callback_data' => "/menu oc",
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'text' => $this->i18n('mtproto'),
|
'text' => $this->i18n('mtproto') . ' ' . $this->i18n($this->ssh('pgrep mtproto-proxy', 'tg') ? 'on' : 'off'),
|
||||||
'callback_data' => "/mtproto",
|
'callback_data' => "/mtproto",
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
[
|
[
|
||||||
'text' => $this->i18n('ad_title'),
|
'text' => $this->i18n('ad_title') . ' ' . $this->i18n(exec("JSON=1 timeout 2 dnslookup google.com ad") ? 'on' : 'off'),
|
||||||
'callback_data' => "/menu adguard",
|
'callback_data' => "/menu adguard",
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'text' => $this->i18n('warp') . ': ' . $this->warpStatus(),
|
'text' => $this->i18n('warp') . ' ' . $this->i18n($this->warpStatus()),
|
||||||
'callback_data' => "/warp",
|
'callback_data' => "/warp",
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
[
|
[
|
||||||
'text' => $this->i18n('sh_title'),
|
'text' => $this->i18n('sh_title') . ' ' . $this->i18n($this->ssh('pgrep ssserver', 'ss') ? 'on' : 'off'),
|
||||||
'callback_data' => "/menu ss",
|
'callback_data' => "/menu ss",
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
@@ -5345,8 +5345,16 @@ DNS-over-HTTPS with IP:
|
|||||||
$p = $this->getPacConf();
|
$p = $this->getPacConf();
|
||||||
$users = array_map(fn ($e) => trim($e), explode(',', $users));
|
$users = array_map(fn ($e) => trim($e), explode(',', $users));
|
||||||
$users = array_map(fn ($e) => explode(':', $e), $users);
|
$users = array_map(fn ($e) => explode(':', $e), $users);
|
||||||
|
foreach ($c['inbounds'][0]['settings']['clients'] as $k => $v) {
|
||||||
|
$uuids[] = $v['id'];
|
||||||
|
$emails[] = $v['email'];
|
||||||
|
}
|
||||||
foreach ($users as $user) {
|
foreach ($users as $user) {
|
||||||
$uuid = $user[1] ?: trim($this->ssh('xray uuid', 'xr'));
|
$uuid = $user[1] ?: trim($this->ssh('xray uuid', 'xr'));
|
||||||
|
if (in_array($uuid, $uuids ?: []) || in_array($user[0], $emails ?: [])) {
|
||||||
|
$this->send($this->input['chat'], "user {$user[0]} already exists");
|
||||||
|
return $this->xray();
|
||||||
|
}
|
||||||
$c['inbounds'][0]['settings']['clients'][] = $p['transport'] != 'Reality' ? [
|
$c['inbounds'][0]['settings']['clients'][] = $p['transport'] != 'Reality' ? [
|
||||||
'id' => $uuid,
|
'id' => $uuid,
|
||||||
'email' => $user[0],
|
'email' => $user[0],
|
||||||
@@ -5376,20 +5384,22 @@ DNS-over-HTTPS with IP:
|
|||||||
$this->send($this->input['chat'], 'wrong format');
|
$this->send($this->input['chat'], 'wrong format');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!empty($c['inbounds'][0]['settings']['clients'][$i]['off'])) {
|
|
||||||
$this->switchXr($i, 1);
|
|
||||||
$c = $this->getXray();
|
|
||||||
}
|
|
||||||
$c['inbounds'][0]['settings']['clients'][$i]['time'] = $time;
|
$c['inbounds'][0]['settings']['clients'][$i]['time'] = $time;
|
||||||
}
|
}
|
||||||
file_put_contents('/config/xray.json', json_encode($c, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES));
|
$this->restartXray($c, 1);
|
||||||
$this->userXr($i);
|
if (!empty($c['inbounds'][0]['settings']['clients'][$i]['off'])) {
|
||||||
|
$this->switchXr($i, 0, 1);
|
||||||
|
} else {
|
||||||
|
$this->userXr($i);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function switchXr($i, $nm = 0)
|
public function switchXr($i, $nm = 0, $time = false)
|
||||||
{
|
{
|
||||||
$c = $this->getXray();
|
$c = $this->getXray();
|
||||||
unset($c['inbounds'][0]['settings']['clients'][$i]['time']);
|
if (empty($time)) {
|
||||||
|
unset($c['inbounds'][0]['settings']['clients'][$i]['time']);
|
||||||
|
}
|
||||||
if (empty($c['inbounds'][0]['settings']['clients'][$i]['off'])) {
|
if (empty($c['inbounds'][0]['settings']['clients'][$i]['off'])) {
|
||||||
$c['inbounds'][0]['settings']['clients'][$i]['off'] = $c['inbounds'][0]['settings']['clients'][$i]['id'];
|
$c['inbounds'][0]['settings']['clients'][$i]['off'] = $c['inbounds'][0]['settings']['clients'][$i]['id'];
|
||||||
$c['inbounds'][0]['settings']['clients'][$i]['id'] = trim($this->ssh('xray uuid', 'xr'));
|
$c['inbounds'][0]['settings']['clients'][$i]['id'] = trim($this->ssh('xray uuid', 'xr'));
|
||||||
@@ -6360,7 +6370,7 @@ DNS-over-HTTPS with IP:
|
|||||||
header("Location: hiddify://install-config/?url=$si");
|
header("Location: hiddify://install-config/?url=$si");
|
||||||
exit;
|
exit;
|
||||||
case 'c':
|
case 'c':
|
||||||
header("Location: clash://install-config/?url=$cl&name=$email");
|
header("Location: clash://install-config/?url=$cl&overwrite=no&name=$email");
|
||||||
exit;
|
exit;
|
||||||
case 'w':
|
case 'w':
|
||||||
$link = htmlspecialchars($si, ENT_XML1, 'UTF-8');
|
$link = htmlspecialchars($si, ENT_XML1, 'UTF-8');
|
||||||
@@ -8087,8 +8097,9 @@ DNS-over-HTTPS with IP:
|
|||||||
}
|
}
|
||||||
echo "$ip\n";
|
echo "$ip\n";
|
||||||
var_dump($r = $this->request('setWebhook', [
|
var_dump($r = $this->request('setWebhook', [
|
||||||
'url' => "https://$ip/tlgrm?k={$this->key}",
|
'url' => "https://$ip/tlgrm?k={$this->key}",
|
||||||
'certificate' => curl_file_create('/certs/self_public'),
|
'certificate' => curl_file_create('/certs/self_public'),
|
||||||
|
'allowed_updates' => json_encode(['*']),
|
||||||
]));
|
]));
|
||||||
if (!empty($r['result']) && $r['result'] == true) {
|
if (!empty($r['result']) && $r['result'] == true) {
|
||||||
file_put_contents('/start', 1);
|
file_put_contents('/start', 1);
|
||||||
|
|||||||
+11
-3
@@ -42,10 +42,18 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
php:
|
php:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
|
ng:
|
||||||
|
condition: service_started
|
||||||
ad:
|
ad:
|
||||||
condition: service_started
|
condition: service_started
|
||||||
ss:
|
ss:
|
||||||
condition: service_started
|
condition: service_started
|
||||||
|
xr:
|
||||||
|
condition: service_started
|
||||||
|
oc:
|
||||||
|
condition: service_started
|
||||||
|
np:
|
||||||
|
condition: service_started
|
||||||
env_file:
|
env_file:
|
||||||
- path: ./.env
|
- path: ./.env
|
||||||
required: true # default
|
required: true # default
|
||||||
@@ -79,9 +87,6 @@ services:
|
|||||||
- 80:80
|
- 80:80
|
||||||
hostname: nginx
|
hostname: nginx
|
||||||
container_name: nginx-${VER}
|
container_name: nginx-${VER}
|
||||||
depends_on:
|
|
||||||
up:
|
|
||||||
condition: service_started
|
|
||||||
env_file:
|
env_file:
|
||||||
- path: ./.env
|
- path: ./.env
|
||||||
required: true # default
|
required: true # default
|
||||||
@@ -95,6 +100,9 @@ services:
|
|||||||
xray:
|
xray:
|
||||||
ipv4_address: 10.10.1.2
|
ipv4_address: 10.10.1.2
|
||||||
logging: *default-logging
|
logging: *default-logging
|
||||||
|
depends_on:
|
||||||
|
php:
|
||||||
|
condition: service_healthy
|
||||||
php:
|
php:
|
||||||
image: mercurykd/vpnbot-php:1.7
|
image: mercurykd/vpnbot-php:1.7
|
||||||
build:
|
build:
|
||||||
|
|||||||
@@ -1,3 +1,8 @@
|
|||||||
|
17.05.2025 v2.19
|
||||||
|
- фикс падения vless при одинаковом имени пользователей
|
||||||
|
- фикс падения vless при установке таймера для выключенного пользователя
|
||||||
|
- подсветка в меню работы процесса контейнера
|
||||||
|
- overwrite=no для импорта клеш подписки (legiz)
|
||||||
18.04.2025 v2.18
|
18.04.2025 v2.18
|
||||||
- фикс отсутствия ssl при первом старте
|
- фикс отсутствия ssl при первом старте
|
||||||
- iplimit уведомляет без отключения пользователя
|
- iplimit уведомляет без отключения пользователя
|
||||||
|
|||||||
Reference in New Issue
Block a user