Compare commits

...

44 Commits

Author SHA1 Message Date
mercury 855f516936 update version 2024-12-06 23:39:12 +04:00
mercury e1c13480d1 mihomo: fix empty rules 2024-12-06 23:36:43 +04:00
mercury bd5e10fa23 naming: clash -> mihomo 2024-12-06 23:12:22 +04:00
mercury 3627b389b4 mihomo: added yaml support 2024-12-06 22:26:00 +04:00
mercury f3f9cb5348 fix ruleset for mihomo 2024-12-06 22:11:12 +04:00
mercury 1527b9f856 added rule-set for clash 2024-12-04 00:08:32 +04:00
mercury f896b307ea removed check when adding a subnet to openconnect 2024-11-28 20:11:05 +04:00
mercury 8ba7ddedee update version 2024-11-28 20:04:53 +04:00
mercury 19ef567873 fix createruleset 2024-11-28 19:51:21 +04:00
mercury 4f4e36e1cb doh ip exclude for analyze ip 2024-11-28 15:17:42 +04:00
mercury 6267931475 fix bug createruleset for singbox 2024-11-28 12:59:06 +04:00
mercury 7e2d90e7da update prioritet clash rules 2024-11-28 10:36:10 +04:00
mercury 28906176f5 update clash links 2024-11-28 00:21:22 +04:00
mercury 968d72ce81 autoscan call fix 2024-11-28 00:12:12 +04:00
mercury 66e204e5ba import url for clash 2024-11-27 23:37:39 +04:00
mercury 36e8acd2aa xray: template for clash 2024-11-27 22:00:30 +04:00
mercury cdc20adccd consistent template logic 2024-11-27 16:52:30 +04:00
mercury 8ad00bc47a update version 2024-11-21 18:09:25 +04:00
mercury 4902eb53ce fix addruleset for direct 2024-11-21 16:04:09 +04:00
mercury 253cceb44c fix analyze ip autoban 2024-11-21 12:13:02 +04:00
mercury 9d53f2896c fix analyze memory 2024-11-21 11:49:29 +04:00
mercury 550a8ad3b7 fix ip/32 analyze 2024-11-21 01:37:22 +04:00
mercury e2f84b0ee7 update version 2024-11-21 00:39:07 +04:00
mercury b394e769c6 роутинг для openconnect 2024-11-21 00:24:50 +04:00
mercury 7d8dc1dd2d duplicating the list of subnets for openconnect 2024-11-20 20:59:25 +04:00
mercury 34b1de5132 import telegram, gcore, cloudflare ip 2024-11-20 20:58:17 +04:00
mercury 12b5d84afc IP analyzer takes into account subnets 2024-11-20 17:12:08 +04:00
mercury c3d90ada83 addruleset and additional tags 2024-11-20 15:55:10 +04:00
mercury dbe3f290ea commands reset and backup 2024-11-20 15:46:03 +04:00
mercury b56b48e080 override ignore 2024-11-20 15:45:02 +04:00
mercury 21b7a4816f fix bot dump when telegram logs are empty 2024-11-18 00:31:53 +04:00
mercury 51ecb815ba fix domain installation on first launch 2024-11-17 19:32:54 +04:00
mercury 66cee61d41 allow telegram ip 2024-11-17 15:08:01 +04:00
mercury 66225917fe fix ip menu 2024-11-16 16:45:36 +04:00
mercury be227f6a33 update version 2024-11-16 01:13:53 +04:00
mercury 37d392a240 update backup 2024-11-16 01:10:47 +04:00
mercury 565573cfc2 fix notify update 2024-11-16 00:51:09 +04:00
mercury 3813f43b92 update bot from notify 2024-11-16 00:45:30 +04:00
mercury f34427c13c fix notification about new version 2024-11-16 00:42:22 +04:00
mercury c2219e3657 ability to add your IPs to blocklist/whitelist 2024-11-16 00:34:22 +04:00
mercury 0d7426e785 improve analyze ip 2024-11-16 00:11:19 +04:00
mercury c56fe4ff78 blocklist improve
add https://github.com/legiz-ru/sb-rule-sets/raw/main/ru-bundle.lst button
2024-11-15 11:49:20 +04:00
mercury b0e6835ac9 improve scanner 2024-11-15 01:04:06 +04:00
mercury f29d366aef scaner: fix regex 2024-11-14 16:47:55 +04:00
15 changed files with 977 additions and 361 deletions
+4 -1
View File
@@ -22,4 +22,7 @@ update/*
override.env
override.html
override.php
docker-compose.override.yml
docker-compose.override.yml
backup.json
app/webapp/override/
.rest
+13
View File
@@ -0,0 +1,13 @@
<?php
require __DIR__ . '/timezone.php';
require __DIR__ . '/bot.php';
require __DIR__ . '/config.php';
require __DIR__ . '/i18n.php';
if ($c['debug']) {
require __DIR__ . '/debug.php';
}
$bot = new Bot($c['key'], $i);
echo $bot->export();
+753 -324
View File
File diff suppressed because it is too large Load Diff
+6 -2
View File
@@ -262,8 +262,12 @@ $i = [
'ru' => 'очистить',
],
'xray' => [
'en' => 'Xray',
'ru' => 'Xray',
'en' => 'Vless',
'ru' => 'Vless',
],
'clash' => [
'en' => 'mihomo',
'ru' => 'mihomo',
],
'geodb' => [
'en' => 'GeoIp/GeoSite',
+1
View File
@@ -37,6 +37,7 @@ if ($hash == substr(md5($c['key']), 0, 8)) {
break;
case 's':
case 'si':
case 'cl':
$bot->subscription();
exit;
+1 -1
View File
@@ -18,7 +18,7 @@ if (!empty($bot->selfupdate)) {
$bot->offWarp();
}
$bot->dontshowcron = 1;
$bot->adguardSync();
$bot->sslip();
$bot->adguardSync();
$bot->syncDeny();
$bot->cleanDocker();
+126
View File
@@ -0,0 +1,126 @@
{
"mixed-port": 2080,
"allow-lan": true,
"tcp-concurrent": true,
"enable-process": true,
"find-process-mode": "strict",
"global-client-fingerprint": "chrome",
"mode": "rule",
"log-level": "debug",
"ipv6": false,
"keep-alive-interval": 30,
"unified-delay": false,
"profile": {
"store-selected": true,
"store-fake-ip": true
},
"sniffer": {
"enable": true,
"sniff": {
"HTTP": {
"ports": [
80,
"8080-8880"
],
"override-destination": true
},
"TLS": {
"ports": [
443,
8443
]
},
"QUIC": {
"ports": [
443,
8443
]
}
}
},
"tun": {
"enable": true,
"stack": "mixed",
"dns-hijack": [
"any:53"
],
"auto-route": true,
"auto-detect-interface": true,
"strict-route": true
},
"dns": {
"enable": true,
"listen": ":1053",
"prefer-h3": false,
"ipv6": false,
"enhanced-mode": "fake-ip",
"fake-ip-filter": [
"~domain~",
"+.lan",
"+.local"
],
"nameserver": [
"~dns~"
]
},
"proxies": [
{
"name": "~outbound~",
"type": "vless",
"server": "~domain~",
"port": 443,
"uuid": "~uid~",
"network": "tcp",
"flow": "xtls-rprx-vision",
"tls": true,
"reality-opts": {
"public-key": "~public_key~",
"short-id": "~short_id~"
},
"servername": "~server_name~",
"client-fingerprint": "chrome"
}
],
"proxy-groups": [
{
"name": "PROXY",
"type": "select",
"proxies": [
"~outbound~"
]
}
],
"add-rule-providers": true,
"rule-providers": {},
"rules": [
{
"type": "DOMAIN-SUFFIX",
"list": "~block~",
"action": "REJECT"
},
{
"type": "PROCESS-NAME",
"list": "~process~",
"action": "PROXY"
},
{
"type": "PROCESS-NAME",
"list": "~package~",
"action": "PROXY"
},
{
"type": "DOMAIN-SUFFIX",
"list": "~warp~",
"action": "PROXY"
},
{
"type": "DOMAIN-SUFFIX",
"list": "~pac~",
"action": "PROXY"
},
{
"type": "MATCH",
"action": "DIRECT"
}
]
}
+1 -1
View File
@@ -505,7 +505,7 @@ ipv4-netmask = 255.255.255.0
# Whether to tunnel all DNS queries via the VPN. This is the default
# when a default route is set.
#tunnel-all-dns = true
tunnel-all-dns = true
# The advertised DNS server. Use multiple lines for
# multiple servers.
+14 -12
View File
@@ -111,10 +111,11 @@
"outbound": "dns-out"
},
{
"addruleset": true,
"createruleset": [
{
"name": "pac",
"interval": "15s",
"interval": "30s",
"rules": [
{
"domain_suffix": "~pac~"
@@ -122,13 +123,14 @@
]
}
],
"outbound": "~domains_outbound~"
"outbound": "~outbound~"
},
{
"addruleset": true,
"createruleset": [
{
"name": "package",
"interval": "15s",
"interval": "30s",
"rules": [
{
"package_name": "~package~"
@@ -136,13 +138,14 @@
]
}
],
"outbound": "~app_outbound~"
"outbound": "~outbound~"
},
{
"addruleset": true,
"createruleset": [
{
"name": "process",
"interval": "15s",
"interval": "30s",
"rules": [
{
"process_name": "~process~"
@@ -150,13 +153,14 @@
]
}
],
"outbound": "~process_outbound~"
"outbound": "~outbound~"
},
{
"addruleset": true,
"createruleset": [
{
"name": "block",
"interval": "15s",
"interval": "30s",
"rules": [
{
"domain_suffix": "~block~"
@@ -167,10 +171,11 @@
"outbound": "block"
},
{
"addruleset": true,
"createruleset": [
{
"name": "warp",
"interval": "15s",
"interval": "30s",
"rules": [
{
"domain_suffix": "~warp~"
@@ -179,11 +184,8 @@
}
],
"outbound": "~outbound~"
},
{
"outbound": "direct"
}
],
"final": "~final_outbound~"
"final": "direct"
}
}
+2
View File
@@ -160,7 +160,9 @@ services:
- ./ssh:/ssh
- ./app:/app
- ./logs/:/logs/
- ./version:/version
- ./update:/update
- ./.git:/.git
- ./scripts/start_service.sh:/start_service.sh
- /var/run/docker.sock:/var/run/docker.sock:ro
environment:
+9 -1
View File
@@ -59,4 +59,12 @@ c:
git checkout .
git reset
webhook:
docker compose exec php php checkwebhook.php
docker compose exec php php checkwebhook.php
reset:
make d
git reset --hard
git clean -fd
docker volume rm vpnbot_adguard vpnbot_warp
make u
backup:
docker compose exec php php backup.php > backup.json
-5
View File
@@ -1,5 +0,0 @@
make d
rm /etc/systemd/resolved.conf.d/adguardhome.conf
mv /etc/resolv.conf.backup /etc/resolv.conf
systemctl reload-or-restart systemd-resolved
make u
-8
View File
@@ -1,8 +0,0 @@
mkdir /etc/systemd/resolved.conf.d
echo "[Resolve]
DNS=127.0.0.1
DNSStubListener=no" > /etc/systemd/resolved.conf.d/adguardhome.conf
mv /etc/resolv.conf /etc/resolv.conf.backup
ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf
systemctl reload-or-restart systemd-resolved
make d u
+6 -6
View File
@@ -10,23 +10,23 @@ do
if [[ -n "$cmd" ]]
then
key=$(cat $pwd/update/key)
curl -H "Content-Type: application/json" -X POST https://api.telegram.org/bot$key/editMessageText -d "$(cat $pwd/update/curl | sed 's/"text":"~t~"/"text": "останавливаю бота"/')"
curl -H "Content-Type: application/json" -X POST https://api.telegram.org/bot$key/editMessageText -d "$(cat $pwd/update/curl | sed 's/"text":"~t~"/"text": "stopping the bot"/')"
docker compose down --remove-orphans
if [[ "$cmd" == "1" ]]
then
curl -H "Content-Type: application/json" -X POST https://api.telegram.org/bot$key/editMessageText -d "$(cat $pwd/update/curl | sed 's/"text":"~t~"/"text": "очищаю директорию"/')"
curl -H "Content-Type: application/json" -X POST https://api.telegram.org/bot$key/editMessageText -d "$(cat $pwd/update/curl | sed 's/"text":"~t~"/"text": "clearing the directory"/')"
git reset --hard && git clean -fd
curl -H "Content-Type: application/json" -X POST https://api.telegram.org/bot$key/editMessageText -d "$(cat $pwd/update/curl | sed 's/"text":"~t~"/"text": "скачиваю обновление"/')"
curl -H "Content-Type: application/json" -X POST https://api.telegram.org/bot$key/editMessageText -d "$(cat $pwd/update/curl | sed 's/"text":"~t~"/"text": "downloading the update"/')"
git fetch
if [[ -n "$branch" ]]
then
curl -H "Content-Type: application/json" -X POST https://api.telegram.org/bot$key/editMessageText -d "$(cat $pwd/update/curl | sed 's/"text":"~t~"/"text": "меняю ветку"/')"
curl -H "Content-Type: application/json" -X POST https://api.telegram.org/bot$key/editMessageText -d "$(cat $pwd/update/curl | sed 's/"text":"~t~"/"text": "changing branch"/')"
git checkout -t origin/$branch || git checkout $branch
fi
curl -H "Content-Type: application/json" -X POST https://api.telegram.org/bot$key/editMessageText -d "$(cat $pwd/update/curl | sed 's/"text":"~t~"/"text": "применяю обновления"/')"
curl -H "Content-Type: application/json" -X POST https://api.telegram.org/bot$key/editMessageText -d "$(cat $pwd/update/curl | sed 's/"text":"~t~"/"text": "applying updates"/')"
git pull > ./update/message
fi
curl -H "Content-Type: application/json" -X POST https://api.telegram.org/bot$key/editMessageText -d "$(cat $pwd/update/curl | sed 's/"text":"~t~"/"text": "запускаю бота"/')"
curl -H "Content-Type: application/json" -X POST https://api.telegram.org/bot$key/editMessageText -d "$(cat $pwd/update/curl | sed 's/"text":"~t~"/"text": "launching the bot"/')"
IP=$(curl ipinfo.io/ip) VER=$(git describe --tags) docker compose --env-file ./.env --env-file ./override.env up -d --force-recreate
bash $pwd/update/update.sh &
> $pwd/update/key
+41
View File
@@ -1,3 +1,44 @@
06.12.2024 v1.110
- ruleset для mihomo
28.11.2024 v1.109
- фикс автоскана
- добавление clash-шаблонов
21.11.2024 v1.108
- xray: addruleset для direct
- openconnect:ограничение формата при добавлении подсети
- новый механизм сверки ip для анализатора айпи
- мелкие фиксы меню и текста
21.11.2024 v1.107
- xray: добавлены теги ~cdndomain~, ~directdomain~
- xray: возможность менять имя главного аутбаунда(тот аутбаунд который заполняет бот, в шаблонах идет как ~outbound~) для клиентских конфигов
- xray: в шаблонах теперь надо явно указывать ключ addruleset в route -> rules, чтобы бот заполнил их правилами из списка ruleset (см origin шаблон)
- openconnect: добавлена маршрутизация (список подсетей общий с wireguard)
- ip ban: фикс обработки подсетей в белом/черном списках
- ip ban: в белый список можно импортировать адреса от telegram, gcore, cloudflare
- добавлена в игнор папка app/webapp/override. она не будет перезатираться после обновления, туда можно положить ваши ресурсы к override.html
- <code>make backup</code> - сохранит в корень backup.json
- <code>make reset</code> - обнуляет все настройки
18.11.2024 v1.106
- фикс отвала бота при пустых логах телеги
17.11.2024 v1.105
- фикс установки домена при первом запуске
16.11.2024 v1.104
- единая механика закрепления бэкапа
- фикс текста уведомления о новой версии
16.11.2024 v1.103
- фикс уведомления о новой версии
16.11.2024 v1.102
- переделан раздел списка ip под управление кнопками
- возможность добавить свои айпи в blocklist/whitelist
15.11.2024 v1.101
- кнопка добавления https://github.com/legiz-ru/sb-rule-sets/raw/main/ru-bundle.lst
- переделан раздел списка ip для читаемости
15.11.2024 v1.100
- несколько режимов silence для сканера
- анализ сканера скидывает файл всех найденных айпи
- команда /searchLogs (пока только для айпи)
- логи переехали в меню сканера
- обновление текстов и подсказок
14.11.2024 v1.99.1
- анализ логов и бан айпишников, фиксы
14.11.2024 v1.99