Compare commits
43 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| fff1c758c9 | |||
| 247bc69b4f | |||
| 54908c7d97 | |||
| 678fe04d9a | |||
| 2363a04af3 | |||
| bc7bda8a12 | |||
| 4ab805bc21 | |||
| b18b002d55 | |||
| 9439984cd2 | |||
| 7e2a908da7 | |||
| b7500c278d | |||
| fb075463ee | |||
| 321b853d42 | |||
| 8effb72cdc | |||
| bec8f5488e | |||
| f97b0f9228 | |||
| 8e8babe1a6 | |||
| 238c380f23 | |||
| abc2e7c587 | |||
| 3f99d9fbf0 | |||
| 3f1e80c641 | |||
| 5afe6a4777 | |||
| c2cf0bff98 | |||
| 60241aaffb | |||
| 96ff868b10 | |||
| f58c29a66b | |||
| ca922f4612 | |||
| 5a5b1b62b1 | |||
| 0ef34f818d | |||
| d1960d6acb | |||
| 95cba4c8d1 | |||
| 18e2dd53ff | |||
| 3e5b131c16 | |||
| e07d1505e4 | |||
| c140f292e8 | |||
| 7cc100ace5 | |||
| 4938ada85d | |||
| c5b9886470 | |||
| 61d8b899e7 | |||
| 7d81eeeddd | |||
| 3bdebd95ab | |||
| eb4641a58d | |||
| 61900daafd |
@@ -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
|
||||||
+1045
-388
File diff suppressed because it is too large
Load Diff
+1
-3
@@ -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'),
|
||||||
|
|||||||
@@ -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
@@ -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();
|
||||||
|
|||||||
+3
-2
@@ -25,8 +25,9 @@ $bot->cloakNginx();
|
|||||||
$bot->syncDeny();
|
$bot->syncDeny();
|
||||||
$bot->cleanDocker();
|
$bot->cleanDocker();
|
||||||
$bot->dnsttStart();
|
$bot->dnsttStart();
|
||||||
|
$bot->restartHysteria();
|
||||||
$c = $bot->getPacConf();
|
$c = $bot->getPacConf();
|
||||||
$bot->setUpstreamDomain($c['pac']['transport'] != 'Reality' ? 't' : ($c['pac']['reality']['domain'] ?: $c['xray']['inbounds'][0]['streamSettings']['realitySettings']['serverNames'][0]));
|
$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->setUpstreamDomainHysteria($c['domain']);
|
$bot->restartXray($bot->getXray());
|
||||||
|
|||||||
+3
-6
@@ -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",
|
||||||
@@ -99,7 +96,7 @@
|
|||||||
"list": "~block~",
|
"list": "~block~",
|
||||||
"action": "REJECT",
|
"action": "REJECT",
|
||||||
"interval": 60,
|
"interval": 60,
|
||||||
"behavior": "domain",
|
"behavior": "classical",
|
||||||
"name": "block"
|
"name": "block"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -131,7 +128,7 @@
|
|||||||
"list": "~pac~",
|
"list": "~pac~",
|
||||||
"action": "PROXY",
|
"action": "PROXY",
|
||||||
"interval": 60,
|
"interval": 60,
|
||||||
"behavior": "domain",
|
"behavior": "classical",
|
||||||
"name": "pac"
|
"name": "pac"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -139,7 +136,7 @@
|
|||||||
"list": "~subnet~",
|
"list": "~subnet~",
|
||||||
"action": "PROXY",
|
"action": "PROXY",
|
||||||
"interval": 60,
|
"interval": 60,
|
||||||
"behavior": "ipcidr",
|
"behavior": "classical",
|
||||||
"name": "subnet"
|
"name": "subnet"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -122,3 +122,4 @@ AllowTcpForwarding yes
|
|||||||
PermitTunnel yes
|
PermitTunnel yes
|
||||||
GatewayPorts yes
|
GatewayPorts yes
|
||||||
X11Forwarding yes
|
X11Forwarding yes
|
||||||
|
LogLevel QUIET
|
||||||
@@ -32,10 +32,6 @@ stream {
|
|||||||
server np:443;
|
server np:443;
|
||||||
}
|
}
|
||||||
|
|
||||||
upstream hysteria {
|
|
||||||
server hy:443;
|
|
||||||
}
|
|
||||||
|
|
||||||
map_hash_bucket_size 128;
|
map_hash_bucket_size 128;
|
||||||
map $ssl_preread_server_name $sni_name {
|
map $ssl_preread_server_name $sni_name {
|
||||||
#domain
|
#domain
|
||||||
@@ -49,10 +45,6 @@ stream {
|
|||||||
#naive
|
#naive
|
||||||
#np.domain naive;
|
#np.domain naive;
|
||||||
#naive
|
#naive
|
||||||
|
|
||||||
#hysteria
|
|
||||||
#hy.domain hysteria;
|
|
||||||
#hysteria
|
|
||||||
default other;
|
default other;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -49,7 +49,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"routing": {
|
"routing": {
|
||||||
"domainStrategy": "AsIs",
|
"domainStrategy": "IPIfNonMatch",
|
||||||
"rules": [
|
"rules": [
|
||||||
{
|
{
|
||||||
"inboundTag": [
|
"inboundTag": [
|
||||||
|
|||||||
+16
-15
@@ -40,22 +40,14 @@ services:
|
|||||||
hostname: upstream
|
hostname: upstream
|
||||||
container_name: upstream-${VER}
|
container_name: upstream-${VER}
|
||||||
depends_on:
|
depends_on:
|
||||||
php:
|
|
||||||
condition: service_healthy
|
|
||||||
ng:
|
ng:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
ad:
|
|
||||||
condition: service_started
|
|
||||||
ss:
|
|
||||||
condition: service_started
|
|
||||||
xr:
|
xr:
|
||||||
condition: service_started
|
condition: service_started
|
||||||
oc:
|
oc:
|
||||||
condition: service_started
|
condition: service_started
|
||||||
np:
|
np:
|
||||||
condition: service_started
|
condition: service_started
|
||||||
hy:
|
|
||||||
condition: service_started
|
|
||||||
env_file:
|
env_file:
|
||||||
- path: ./.env
|
- path: ./.env
|
||||||
required: true # default
|
required: true # default
|
||||||
@@ -106,6 +98,12 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
php:
|
php:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
|
ad:
|
||||||
|
condition: service_started
|
||||||
|
ss:
|
||||||
|
condition: service_started
|
||||||
|
xr:
|
||||||
|
condition: service_started
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "nginx", "-t"]
|
test: ["CMD", "nginx", "-t"]
|
||||||
interval: 10s
|
interval: 10s
|
||||||
@@ -216,7 +214,7 @@ services:
|
|||||||
- dnstt
|
- dnstt
|
||||||
- hy
|
- hy
|
||||||
wg:
|
wg:
|
||||||
image: mercurykd/vpnbot-wg:1.1
|
image: mercurykd/vpnbot-wg:1.3
|
||||||
build:
|
build:
|
||||||
dockerfile: dockerfile/wireguard.dockerfile
|
dockerfile: dockerfile/wireguard.dockerfile
|
||||||
args:
|
args:
|
||||||
@@ -254,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.1
|
image: mercurykd/vpnbot-wg:1.3
|
||||||
build:
|
build:
|
||||||
dockerfile: dockerfile/wireguard.dockerfile
|
dockerfile: dockerfile/wireguard.dockerfile
|
||||||
args:
|
args:
|
||||||
@@ -327,15 +325,16 @@ services:
|
|||||||
entrypoint: ["/bin/sh", "/start_ad.sh"]
|
entrypoint: ["/bin/sh", "/start_ad.sh"]
|
||||||
logging: *default-logging
|
logging: *default-logging
|
||||||
tg:
|
tg:
|
||||||
image: mercurykd/vpnbot-tg:1.2
|
image: mercurykd/vpnbot-tg:1.3
|
||||||
build:
|
build:
|
||||||
dockerfile: dockerfile/telegram.dockerfile
|
dockerfile: dockerfile/telegram.dockerfile
|
||||||
volumes:
|
volumes:
|
||||||
- ./config/.profile:/root/.ashrc:ro
|
- ./config/.profile:/root/.bashrc:ro
|
||||||
- ./ssh:/ssh
|
- ./ssh:/ssh
|
||||||
- ./config/sshd_config:/etc/ssh/sshd_config
|
- ./config/sshd_config:/etc/ssh/sshd_config
|
||||||
- ./scripts/start_tg.sh:/start_tg.sh
|
- ./scripts/start_tg.sh:/start_tg.sh
|
||||||
- ./config/mtprotosecret:/mtprotosecret
|
- ./config/mtprotosecret:/mtprotosecret
|
||||||
|
- ./logs/:/logs/
|
||||||
hostname: telegram
|
hostname: telegram
|
||||||
container_name: mtproto-${VER}
|
container_name: mtproto-${VER}
|
||||||
depends_on:
|
depends_on:
|
||||||
@@ -355,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:
|
||||||
@@ -419,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:
|
||||||
@@ -450,7 +449,7 @@ services:
|
|||||||
ipv4_address: 10.10.0.12
|
ipv4_address: 10.10.0.12
|
||||||
logging: *default-logging
|
logging: *default-logging
|
||||||
wp:
|
wp:
|
||||||
image: mercurykd/vpnbot-wp:1.4
|
image: mercurykd/vpnbot-wp:1.5
|
||||||
build:
|
build:
|
||||||
dockerfile: dockerfile/warp.dockerfile
|
dockerfile: dockerfile/warp.dockerfile
|
||||||
args:
|
args:
|
||||||
@@ -550,6 +549,7 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- ./config/.profile:/root/.ashrc:ro
|
- ./config/.profile:/root/.ashrc:ro
|
||||||
- ./ssh:/ssh
|
- ./ssh:/ssh
|
||||||
|
- ./logs:/logs
|
||||||
- ./config/sshd_config:/etc/ssh/sshd_config
|
- ./config/sshd_config:/etc/ssh/sshd_config
|
||||||
- ./config/dnstt:/dnstt
|
- ./config/dnstt:/dnstt
|
||||||
- ./scripts/start_dnstt.sh:/start_dnstt.sh
|
- ./scripts/start_dnstt.sh:/start_dnstt.sh
|
||||||
@@ -580,6 +580,7 @@ services:
|
|||||||
- ./ssh:/ssh
|
- ./ssh:/ssh
|
||||||
- ./config/sshd_config:/etc/ssh/sshd_config
|
- ./config/sshd_config:/etc/ssh/sshd_config
|
||||||
- ./certs:/certs
|
- ./certs:/certs
|
||||||
|
- ./logs:/logs
|
||||||
- ./config:/config
|
- ./config:/config
|
||||||
- ./scripts/start_hysteria.sh:/start_hysteria.sh
|
- ./scripts/start_hysteria.sh:/start_hysteria.sh
|
||||||
hostname: hysteria
|
hostname: hysteria
|
||||||
|
|||||||
@@ -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 \
|
||||||
|
|||||||
@@ -1,13 +1,33 @@
|
|||||||
FROM alpine:3.6
|
# Build stage
|
||||||
RUN apk add --no-cache --virtual .build-deps alpine-sdk linux-headers openssl-dev \
|
FROM ubuntu:22.04 AS builder
|
||||||
&& git clone --single-branch --depth 1 https://github.com/TelegramMessenger/MTProxy.git /mtproxy/sources \
|
|
||||||
&& mkdir /mtproxy/patches && wget -P /mtproxy/patches https://raw.githubusercontent.com/alexdoesh/mtproxy/master/patches/randr_compat.patch \
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
&& cd /mtproxy/sources && patch -p0 -i /mtproxy/patches/randr_compat.patch \
|
git \
|
||||||
&& make \
|
build-essential \
|
||||||
&& mkdir /root/.ssh \
|
libssl-dev \
|
||||||
&& cp /mtproxy/sources/objs/bin/mtproto-proxy /usr/bin \
|
zlib1g-dev \
|
||||||
&& rm -rf /mtproxy \
|
ca-certificates \
|
||||||
&& apk del .build-deps\
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
&& apk add --no-cache --update curl openssh \
|
|
||||||
&& ln -s /usr/lib/libcrypto.so.41 /usr/lib/libcrypto.so.1.0.0
|
WORKDIR /src
|
||||||
ENV ENV="/root/.ashrc"
|
RUN git clone --single-branch --depth 1 https://github.com/GetPageSpeed/MTProxy . \
|
||||||
|
&& make -j$(nproc) \
|
||||||
|
&& strip objs/bin/mtproto-proxy
|
||||||
|
|
||||||
|
# Runtime stage - minimal Ubuntu
|
||||||
|
FROM ubuntu:22.04
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
|
libssl3 \
|
||||||
|
zlib1g \
|
||||||
|
curl \
|
||||||
|
openssh-client \
|
||||||
|
openssh-server \
|
||||||
|
ca-certificates \
|
||||||
|
vim-common \
|
||||||
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
|
&& mkdir -p /root/.ssh /var/run/sshd
|
||||||
|
|
||||||
|
COPY --from=builder /src/objs/bin/mtproto-proxy /usr/local/bin/mtproto-proxy
|
||||||
|
|
||||||
|
ENV PATH="/usr/local/bin:$PATH"
|
||||||
|
|||||||
@@ -1,6 +1,16 @@
|
|||||||
FROM ubuntu:22.04
|
FROM ubuntu:22.04
|
||||||
RUN apt update && apt install -y curl gpg socat jq lsb-release openssh-server \
|
|
||||||
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
|
curl \
|
||||||
|
gpg \
|
||||||
|
socat \
|
||||||
|
jq \
|
||||||
|
lsb-release \
|
||||||
|
openssh-server \
|
||||||
|
ca-certificates \
|
||||||
&& curl -fsSL https://pkg.cloudflareclient.com/pubkey.gpg | gpg --yes --dearmor --output /usr/share/keyrings/cloudflare-warp-archive-keyring.gpg \
|
&& curl -fsSL https://pkg.cloudflareclient.com/pubkey.gpg | gpg --yes --dearmor --output /usr/share/keyrings/cloudflare-warp-archive-keyring.gpg \
|
||||||
&& echo "deb [signed-by=/usr/share/keyrings/cloudflare-warp-archive-keyring.gpg] https://pkg.cloudflareclient.com/ $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/cloudflare-client.list \
|
&& echo "deb [signed-by=/usr/share/keyrings/cloudflare-warp-archive-keyring.gpg] https://pkg.cloudflareclient.com/ $(lsb_release -cs) main" > /etc/apt/sources.list.d/cloudflare-client.list \
|
||||||
&& apt update && apt install -y cloudflare-warp \
|
&& apt-get update && apt-get install -y --no-install-recommends cloudflare-warp \
|
||||||
&& mkdir /root/.ssh
|
&& apt-get clean \
|
||||||
|
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
|
||||||
|
&& mkdir -p /root/.ssh /var/run/sshd
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
@@ -47,15 +51,11 @@ oc: # консоль сервиса
|
|||||||
docker compose exec oc /bin/sh
|
docker compose exec oc /bin/sh
|
||||||
service: # консоль сервиса
|
service: # консоль сервиса
|
||||||
docker compose exec service /bin/sh
|
docker compose exec service /bin/sh
|
||||||
clean:
|
delete:
|
||||||
docker image prune
|
make d
|
||||||
docker builder prune
|
docker system prune -f -a
|
||||||
cleanf:
|
docker volume prune -f -a
|
||||||
docker image prune -f > /dev/null
|
rm -rf /root/vpnbot
|
||||||
docker builder prune -f > /dev/null
|
|
||||||
cleanall:
|
|
||||||
docker image prune -a -f
|
|
||||||
docker builder prune -a -f
|
|
||||||
push:
|
push:
|
||||||
docker compose push
|
docker compose push
|
||||||
s:
|
s:
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
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 "$@" &
|
||||||
hysteria server -c /config/hysteria.yaml &
|
|
||||||
tail -f /dev/null
|
tail -f /dev/null
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
echo 'root:dummy_passwd'|chpasswd
|
|
||||||
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 "$@" &
|
||||||
|
|||||||
+19
-2
@@ -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 "$@" &
|
||||||
@@ -14,7 +18,8 @@ then
|
|||||||
echo "ListenPort = $WG1PORT" >> /etc/wireguard/wg0.conf
|
echo "ListenPort = $WG1PORT" >> /etc/wireguard/wg0.conf
|
||||||
else
|
else
|
||||||
sed "s/ListenPort = [0-9]\+/ListenPort = $WG1PORT/" /etc/wireguard/wg0.conf > change_port
|
sed "s/ListenPort = [0-9]\+/ListenPort = $WG1PORT/" /etc/wireguard/wg0.conf > change_port
|
||||||
cat change_port > /etc/wireguard/wg0.conf
|
sed "s|Address = [0-9\.\/ ]\+|Address = $ADDRESS|" change_port > change_address
|
||||||
|
cat change_address > /etc/wireguard/wg0.conf
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
if [ $(cat /etc/wireguard/wg0.conf | wc -c) -eq 0 ]
|
if [ $(cat /etc/wireguard/wg0.conf | wc -c) -eq 0 ]
|
||||||
@@ -26,7 +31,8 @@ else
|
|||||||
echo "ListenPort = $WGPORT" >> /etc/wireguard/wg0.conf
|
echo "ListenPort = $WGPORT" >> /etc/wireguard/wg0.conf
|
||||||
else
|
else
|
||||||
sed "s/ListenPort = [0-9]\+/ListenPort = $WGPORT/" /etc/wireguard/wg0.conf > change_port
|
sed "s/ListenPort = [0-9]\+/ListenPort = $WGPORT/" /etc/wireguard/wg0.conf > change_port
|
||||||
cat change_port > /etc/wireguard/wg0.conf
|
sed "s|Address = [0-9\.\/ ]\+|Address = $ADDRESS|" change_port > change_address
|
||||||
|
cat change_address > /etc/wireguard/wg0.conf
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
iptables -t nat -A POSTROUTING --destination 10.10.0.5 -j ACCEPT
|
iptables -t nat -A POSTROUTING --destination 10.10.0.5 -j ACCEPT
|
||||||
@@ -64,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
|
||||||
|
|||||||
@@ -1,3 +1,26 @@
|
|||||||
|
27.03.2026 v2.30
|
||||||
|
- возможность понижать амнезию до 1
|
||||||
|
10.03.2026 v2.29
|
||||||
|
- amnezia 2.0
|
||||||
|
16.12.2025 v2.28.1
|
||||||
|
- фикс шаблона mihomo
|
||||||
|
15.12.2025 v2.28
|
||||||
|
- новый MTProto
|
||||||
|
- hysteria
|
||||||
|
- dnstt (вместо iodine)
|
||||||
|
- xhttp-vless by legiz
|
||||||
|
- возможность отключать поддомены для naive и openconnect (через установку поддомена в 0)
|
||||||
|
- возможность отключать naive и openconnect (через установку пароля в 0)
|
||||||
|
- возможность указывать айпишники в списках block, warp
|
||||||
|
- быстрая команда для добавления бота в крон: make cron
|
||||||
|
- увиличены тайминги пула рулсетов
|
||||||
|
- увиличен тайминг сбора статы с xray-ядра
|
||||||
|
- улучшено логирование: ssh не срет в контейнер, а основной процесс пишет в /logs
|
||||||
|
- улучшены кроны autobackup, autoscan, autoreset
|
||||||
|
- фикс старта upstream
|
||||||
|
- фикс шорт-ссылки для амнезии
|
||||||
|
- фикс папки override для своих заглушек
|
||||||
|
- фикс сброса страницы в списках route
|
||||||
09.11.2025 v2.27
|
09.11.2025 v2.27
|
||||||
- фикс reality
|
- фикс reality
|
||||||
08.11.2025 v2.26
|
08.11.2025 v2.26
|
||||||
|
|||||||
Reference in New Issue
Block a user