Compare commits

...

23 Commits

Author SHA1 Message Date
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
mercury 9eb15b9b45 update version 2024-11-14 15:37:06 +04:00
mercury 954cfe0346 improve ip ban 2024-11-14 14:32:49 +04:00
mercury 0d21eadcaa fix input timer autoscan 2024-11-14 02:35:51 +04:00
mercury f0b43e791d update version 2024-11-14 01:13:59 +04:00
mercury 0297417a63 xray log file 2024-11-14 00:40:54 +04:00
mercury 7449e8bba3 scanner: sort ips 2024-11-14 00:35:15 +04:00
mercury ad7351dc9a improve logs 2024-11-14 00:24:15 +04:00
mercury 5c5c537d62 scanner: allow/deny lists 2024-11-14 00:01:23 +04:00
mercury edc877f149 limit message for scanner 2024-11-13 01:08:25 +04:00
mercury ea07b0da42 scanner init 2024-11-13 00:59:34 +04:00
12 changed files with 794 additions and 76 deletions
+749 -51
View File
File diff suppressed because it is too large Load Diff
+2 -1
View File
@@ -18,6 +18,7 @@ if (!empty($bot->selfupdate)) {
$bot->offWarp();
}
$bot->dontshowcron = 1;
$bot->adguardSync();
$bot->sslip();
$bot->adguardSync();
$bot->syncDeny();
$bot->cleanDocker();
View File
+1
View File
@@ -11,6 +11,7 @@ events {
}
stream {
include /etc/nginx/deny;
log_format basic '$remote_addr [$time_local] '
'$protocol $status $bytes_sent $bytes_received';
access_log /logs/upstream_access basic;
+5 -2
View File
@@ -29,6 +29,7 @@ services:
volumes:
- ./config/.profile:/root/.ashrc:ro
- ./config/upstream.conf:/etc/nginx/nginx.conf
- ./config/deny:/etc/nginx/deny
- ./scripts/start_upstream.sh:/start_upstream.sh
- ./ssh:/ssh
- ./config/sshd_config:/etc/ssh/sshd_config
@@ -95,7 +96,7 @@ services:
ipv4_address: 10.10.1.2
logging: *default-logging
php:
image: mercurykd/vpnbot-php:1.5
image: mercurykd/vpnbot-php:1.6
build:
dockerfile: dockerfile/php.dockerfile
args:
@@ -146,7 +147,7 @@ services:
timeout: 5s
retries: 5
service:
image: mercurykd/vpnbot-php:1.5
image: mercurykd/vpnbot-php:1.6
build:
dockerfile: dockerfile/php.dockerfile
args:
@@ -159,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:
+3 -1
View File
@@ -32,4 +32,6 @@ RUN apk add --no-cache --update php81 \
&& mv sing-box-1.8.11-linux-amd64/sing-box /usr/bin \
&& rm sing-box-1.8.11-linux-amd64.tar.gz \
&& rm -rf /sing-box-1.8.11-linux-amd64
ENV ENV="/root/.ashrc"
RUN apk add openssh \
&& mkdir /root/.ssh
ENV ENV="/root/.ashrc"
-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
-1
View File
@@ -3,7 +3,6 @@ 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
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
+5 -1
View File
@@ -1 +1,5 @@
php service.php
cat /ssh/key.pub > /root/.ssh/authorized_keys
ssh-keygen -A
exec /usr/sbin/sshd -D -e "$@" &
php service.php
php cron.php
+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
+23
View File
@@ -1,3 +1,26 @@
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
- анализ логов и бан айпишников
11.11.2024 v1.98
- фикс заполнения clientId при наполнении белого списка клиентов adg
09.11.2024 v1.97