Compare commits

...

13 Commits

Author SHA1 Message Date
mercury fff1c758c9 tun exclude/include lists 2026-05-05 01:03:49 +04:00
mercury 247bc69b4f fix import file 2026-05-04 23:31:24 +04:00
mercury 54908c7d97 fix bugs not admin message 2026-05-03 16:26:03 +04:00
mercury 678fe04d9a fix wg-in xray inbound 2026-05-03 00:25:59 +04:00
mercury 2363a04af3 awg transport for vless-mihomo 2026-05-02 19:10:43 +04:00
mercury bc7bda8a12 fix unitd server start 2026-04-24 00:19:44 +04:00
mercury 4ab805bc21 update naive version 2026-04-23 22:20:36 +04:00
mercury b18b002d55 webhook -> polling 2026-04-23 22:18:22 +04:00
Konstantin 9439984cd2 Merge pull request #46 from legiz-ru:dev
fix: mihomo config
2026-04-13 00:16:22 +04:00
legiz-ru 7e2a908da7 fix: mihomo config
delete localhost socks5
update xhttp config
2026-04-12 22:59:42 +03:00
Konstantin b7500c278d Merge pull request #45 from denied1011/mtproto-adtag
Add MTProto adtag setting in bot UI
2026-03-30 09:44:32 +04:00
denied1011 fb075463ee Add MTProto adtag setting in bot UI 2026-03-28 02:44:41 +03:00
mercury 321b853d42 amnezia reduce button 2026-03-27 01:49:10 +04:00
14 changed files with 678 additions and 169 deletions
+1
View File
@@ -8,4 +8,5 @@ TGPORT=4443
IMAGE=alpine:3.18.2 IMAGE=alpine:3.18.2
IP= IP=
VER= VER=
TELEGRAM_API=api.telegram.org
ENV=/root/.ashrc ENV=/root/.ashrc
+631 -149
View File
File diff suppressed because it is too large Load Diff
+1 -3
View File
@@ -1,8 +1,6 @@
<?php <?php
// ini_set('display_errors', 'On'); error_reporting(E_ALL | E_NOTICE);
// ini_set("log_errors", 1);
// ini_set("error_log", '/logs/php_error');
$debug = [ $debug = [
'raw' => file_get_contents('php://input'), 'raw' => file_get_contents('php://input'),
+4
View File
@@ -261,6 +261,10 @@ $i = [
'en' => 'setSecret', 'en' => 'setSecret',
'ru' => 'установить свой ключ', 'ru' => 'установить свой ключ',
], ],
'setAdTag' => [
'en' => 'set adtag',
'ru' => 'установить adtag',
],
'defaultDNS' => [ 'defaultDNS' => [
'en' => 'defaultDNS', 'en' => 'defaultDNS',
'ru' => 'дефолтный днс', 'ru' => 'дефолтный днс',
+3 -1
View File
@@ -1,5 +1,7 @@
<?php <?php
ini_set('session.use_cookies', 0);
require __DIR__ . '/timezone.php'; require __DIR__ . '/timezone.php';
require __DIR__ . '/bot.php'; require __DIR__ . '/bot.php';
@@ -11,6 +13,6 @@ if ($c['debug']) {
$bot = new Bot($c['key'], $i); $bot = new Bot($c['key'], $i);
$bot->cleanQueue(); $bot->cleanQueue();
$bot->setwebhook();
$bot->syncPortClients(); $bot->syncPortClients();
$bot->setcommands(); $bot->setcommands();
$bot->polling();
+1
View File
@@ -30,3 +30,4 @@ $c = $bot->getPacConf();
$bot->setUpstreamDomain($c['transport'] != 'Reality' ? 't' : $c['reality']['domain']); $bot->setUpstreamDomain($c['transport'] != 'Reality' ? 't' : $c['reality']['domain']);
$bot->setUpstreamDomainNaive($c['domain']); $bot->setUpstreamDomainNaive($c['domain']);
$bot->setUpstreamDomainOcserv($c['domain']); $bot->setUpstreamDomainOcserv($c['domain']);
$bot->restartXray($bot->getXray());
-3
View File
@@ -1,6 +1,4 @@
{ {
"mixed-port": 2080,
"allow-lan": true,
"tcp-concurrent": true, "tcp-concurrent": true,
"enable-process": true, "enable-process": true,
"find-process-mode": "strict", "find-process-mode": "strict",
@@ -50,7 +48,6 @@
}, },
"dns": { "dns": {
"enable": true, "enable": true,
"listen": ":1053",
"prefer-h3": false, "prefer-h3": false,
"ipv6": false, "ipv6": false,
"enhanced-mode": "fake-ip", "enhanced-mode": "fake-ip",
+4 -4
View File
@@ -214,7 +214,7 @@ services:
- dnstt - dnstt
- hy - hy
wg: wg:
image: mercurykd/vpnbot-wg:1.2 image: mercurykd/vpnbot-wg:1.3
build: build:
dockerfile: dockerfile/wireguard.dockerfile dockerfile: dockerfile/wireguard.dockerfile
args: args:
@@ -252,7 +252,7 @@ services:
ipv4_address: 10.10.0.4 ipv4_address: 10.10.0.4
logging: *default-logging logging: *default-logging
wg1: wg1:
image: mercurykd/vpnbot-wg:1.2 image: mercurykd/vpnbot-wg:1.3
build: build:
dockerfile: dockerfile/wireguard.dockerfile dockerfile: dockerfile/wireguard.dockerfile
args: args:
@@ -354,7 +354,7 @@ services:
ipv4_address: 10.10.0.8 ipv4_address: 10.10.0.8
logging: *default-logging logging: *default-logging
xr: xr:
image: mercurykd/vpnbot-xr:1.5 image: mercurykd/vpnbot-xr:1.6
build: build:
dockerfile: dockerfile/xray.dockerfile dockerfile: dockerfile/xray.dockerfile
args: args:
@@ -418,7 +418,7 @@ services:
ipv4_address: 10.10.0.11 ipv4_address: 10.10.0.11
logging: *default-logging logging: *default-logging
np: np:
image: mercurykd/vpnbot-np:1.2 image: mercurykd/vpnbot-np:1.3
build: build:
dockerfile: dockerfile/naive.dockerfile dockerfile: dockerfile/naive.dockerfile
args: args:
+1 -1
View File
@@ -1,7 +1,7 @@
ARG image ARG image
FROM golang:alpine as go FROM golang:alpine as go
RUN go install github.com/caddyserver/xcaddy/cmd/xcaddy@latest \ RUN go install github.com/caddyserver/xcaddy/cmd/xcaddy@latest \
&& /go/bin/xcaddy build --with github.com/caddyserver/forwardproxy@caddy2=github.com/klzgrad/forwardproxy@naive && /go/bin/xcaddy build --with github.com/caddyserver/forwardproxy=github.com/klzgrad/forwardproxy@naive
FROM $image FROM $image
COPY --from=go /go/caddy /usr/local/bin/ COPY --from=go /go/caddy /usr/local/bin/
RUN apk add openssh \ RUN apk add openssh \
+6 -1
View File
@@ -13,4 +13,9 @@ RUN apk add --no-cache --virtual .build-deps alpine-sdk git \
&& apk del .build-deps \ && apk del .build-deps \
&& rm -rf /amneziawg-go \ && rm -rf /amneziawg-go \
&& rm -rf /amneziawg-tools \ && rm -rf /amneziawg-tools \
&& mkdir /root/.ssh && mkdir /root/.ssh \
&& cd /tmp \
&& wget -O tun2socks.zip https://github.com/xjasonlyu/tun2socks/releases/download/v2.6.0/tun2socks-linux-amd64.zip \
&& unzip tun2socks.zip \
&& mv tun2socks-linux-amd64 /usr/bin/tun2socks \
&& chmod +x /usr/bin/tun2socks
+5 -1
View File
@@ -1,7 +1,11 @@
-include .env
export
IP := $(or $(IP),$(shell hostname -I | awk '{print $$1}'))
b: b:
docker compose build docker compose build
u: # запуск контейнеров u: # запуск контейнеров
$(eval IP := $(shell hostname -I | awk '{print $$1}'))
bash ./update/update.sh & bash ./update/update.sh &
touch ./override.env ./docker-compose.override.yml ./config/location.conf ./config/override.conf touch ./override.env ./docker-compose.override.yml ./config/location.conf ./config/override.conf
IP=$(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
+4 -6
View File
@@ -1,12 +1,10 @@
rm /ssh/key* rm /ssh/key*
ssh-keygen -m PEM -t rsa -f /ssh/key -N '' 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" 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 "/ssh/key.pub" && -s "/ssh/key.pub" ]]; then
if [[ -f "/start" && -f "/ssh/key.pub" && -s "/ssh/key.pub" ]]; then unitd --control 0.0.0.0:8080 --log /logs/unit_error
unitd --log /logs/unit_error curl -X PUT --data-binary @/config/unit.json http://127.0.0.1:8080/config
curl -X PUT --data-binary @/config/unit.json --unix-socket /var/run/control.unit.sock http://localhost/config php init.php
pkill unitd
unitd --no-daemon --control 0.0.0.0:8080 --log /logs/unit_error
else else
exit 1; exit 1;
fi fi
+15
View File
@@ -1,3 +1,7 @@
#!/bin/bash
INTERFACE_VPN="tun0"
TABLE_ID=100
cat /ssh/key.pub > /root/.ssh/authorized_keys cat /ssh/key.pub > /root/.ssh/authorized_keys
ssh-keygen -A ssh-keygen -A
exec /usr/sbin/sshd -D -e "$@" & exec /usr/sbin/sshd -D -e "$@" &
@@ -66,4 +70,15 @@ else
sh /block_exchange.sh sh /block_exchange.sh
fi fi
fi fi
ip tuntap add mode tun dev $INTERFACE_VPN || true
ip addr add 10.255.0.1/24 dev $INTERFACE_VPN || true
ip link set up dev $INTERFACE_VPN
ip rule add from $ADDRESS table $TABLE_ID || true
ip route add default dev $INTERFACE_VPN table $TABLE_ID || true
iptables -A FORWARD -i $INTERFACE_VPN -j ACCEPT
iptables -A FORWARD -o $INTERFACE_VPN -j ACCEPT
iptables -t nat -I POSTROUTING 1 -s $ADDRESS -j RETURN
tun2socks -device $INTERFACE_VPN -proxy socks5://xr:10808 &
tail -f /dev/null tail -f /dev/null
+2
View File
@@ -1,3 +1,5 @@
27.03.2026 v2.30
- возможность понижать амнезию до 1
10.03.2026 v2.29 10.03.2026 v2.29
- amnezia 2.0 - amnezia 2.0
16.12.2025 v2.28.1 16.12.2025 v2.28.1