Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c115661529 | |||
| e0ee25127f | |||
| ae2e9c0205 |
@@ -3,6 +3,6 @@ WGADDRESS=10.0.1.1/24
|
|||||||
WGPORT=51820
|
WGPORT=51820
|
||||||
SSPORT=8388
|
SSPORT=8388
|
||||||
TGPORT=4443
|
TGPORT=4443
|
||||||
SYSTEM=ubuntu
|
|
||||||
RELEASE=18.04
|
|
||||||
IMAGE=alpine:3.18.2
|
IMAGE=alpine:3.18.2
|
||||||
|
IP=
|
||||||
|
VER=
|
||||||
|
|||||||
@@ -15,3 +15,4 @@
|
|||||||
!/app/zapretlists/.gitkeep
|
!/app/zapretlists/.gitkeep
|
||||||
.vscode/
|
.vscode/
|
||||||
.idea/
|
.idea/
|
||||||
|
mirror/.env
|
||||||
|
|||||||
+77
-1
@@ -117,7 +117,7 @@ class Bot
|
|||||||
case preg_match('~^/menu (?P<type>addpeer) (?P<arg>(?:-)?\d+)$~', $this->input['callback'], $m):
|
case preg_match('~^/menu (?P<type>addpeer) (?P<arg>(?:-)?\d+)$~', $this->input['callback'], $m):
|
||||||
case preg_match('~^/menu (?P<type>wg) (?P<arg>(?:-)?\d+)$~', $this->input['callback'], $m):
|
case preg_match('~^/menu (?P<type>wg) (?P<arg>(?:-)?\d+)$~', $this->input['callback'], $m):
|
||||||
case preg_match('~^/menu (?P<type>client) (?P<arg>\d+(?:_(?:-)?\d+)?)$~', $this->input['callback'], $m):
|
case preg_match('~^/menu (?P<type>client) (?P<arg>\d+(?:_(?:-)?\d+)?)$~', $this->input['callback'], $m):
|
||||||
case preg_match('~^/menu (?P<type>pac|adguard|config|ss|lang|oc|naive)$~', $this->input['callback'], $m):
|
case preg_match('~^/menu (?P<type>pac|adguard|config|ss|lang|oc|naive|mirror)$~', $this->input['callback'], $m):
|
||||||
case preg_match('~^/menu (?P<type>subzoneslist|reverselist|includelist|excludelist) (?P<arg>(?:-)?\d+)$~', $this->input['callback'], $m):
|
case preg_match('~^/menu (?P<type>subzoneslist|reverselist|includelist|excludelist) (?P<arg>(?:-)?\d+)$~', $this->input['callback'], $m):
|
||||||
$this->menu(type: $m['type'] ?? false, arg: $m['arg'] ?? false);
|
$this->menu(type: $m['type'] ?? false, arg: $m['arg'] ?? false);
|
||||||
break;
|
break;
|
||||||
@@ -127,6 +127,9 @@ class Bot
|
|||||||
case preg_match('~^/mtproto$~', $this->input['callback'], $m):
|
case preg_match('~^/mtproto$~', $this->input['callback'], $m):
|
||||||
$this->mtproto();
|
$this->mtproto();
|
||||||
break;
|
break;
|
||||||
|
case preg_match('~^/getMirror$~', $this->input['callback'], $m):
|
||||||
|
$this->getMirror();
|
||||||
|
break;
|
||||||
case preg_match('~^/logs$~', $this->input['callback'], $m):
|
case preg_match('~^/logs$~', $this->input['callback'], $m):
|
||||||
$this->logs();
|
$this->logs();
|
||||||
break;
|
break;
|
||||||
@@ -2936,6 +2939,12 @@ DNS-over-HTTPS with IP:
|
|||||||
'callback_data' => "/menu pac",
|
'callback_data' => "/menu pac",
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
[
|
||||||
|
[
|
||||||
|
'text' => $this->i18n('mirror'),
|
||||||
|
'callback_data' => "/menu mirror",
|
||||||
|
],
|
||||||
|
],
|
||||||
[
|
[
|
||||||
[
|
[
|
||||||
'text' => $this->i18n('config'),
|
'text' => $this->i18n('config'),
|
||||||
@@ -2968,6 +2977,7 @@ DNS-over-HTTPS with IP:
|
|||||||
'lang' => $type == 'lang' ? $this->menuLang() : false,
|
'lang' => $type == 'lang' ? $this->menuLang() : false,
|
||||||
'oc' => $type == 'oc' ? $this->ocMenu() : false,
|
'oc' => $type == 'oc' ? $this->ocMenu() : false,
|
||||||
'naive' => $type == 'naive' ? $this->naiveMenu() : false,
|
'naive' => $type == 'naive' ? $this->naiveMenu() : false,
|
||||||
|
'mirror' => $type == 'mirror' ? $this->mirrorMenu() : false,
|
||||||
];
|
];
|
||||||
|
|
||||||
$text = $menu[$type ?: 'main' ]['text'];
|
$text = $menu[$type ?: 'main' ]['text'];
|
||||||
@@ -3034,6 +3044,72 @@ DNS-over-HTTPS with IP:
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function mirrorMenu()
|
||||||
|
{
|
||||||
|
$ip = $this->getPacConf()['domain'] ?: $this->ip;
|
||||||
|
$hash = substr(md5($this->key), 0, 8);
|
||||||
|
$scheme = empty($this->nginxGetTypeCert()) ? 'http' : 'https';
|
||||||
|
$text[] = "Menu -> Mirror";
|
||||||
|
$text[] = <<<PNG
|
||||||
|
<pre>client -> intermediate VPS -> vpnbot
|
||||||
|
^ |
|
||||||
|
| install |
|
||||||
|
| mirror |
|
||||||
|
-----------
|
||||||
|
</pre>
|
||||||
|
PNG;
|
||||||
|
$text[] = "<code>$scheme://$ip/pac?h=$hash&t=mirror</code>";
|
||||||
|
$data[] = [
|
||||||
|
[
|
||||||
|
'text' => $this->i18n('download'),
|
||||||
|
'callback_data' => "/getMirror",
|
||||||
|
],
|
||||||
|
];
|
||||||
|
$data[] = [
|
||||||
|
[
|
||||||
|
'text' => $this->i18n('back'),
|
||||||
|
'callback_data' => "/menu",
|
||||||
|
],
|
||||||
|
];
|
||||||
|
return [
|
||||||
|
'text' => implode("\n", $text),
|
||||||
|
'data' => $data,
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getMirror()
|
||||||
|
{
|
||||||
|
unlink('/config/mirror.tar.gz');
|
||||||
|
unlink('/config/mirror.tar');
|
||||||
|
$s = file_get_contents('/mirror/start_socat.sh');
|
||||||
|
$t = preg_replace([
|
||||||
|
'~{ip}~',
|
||||||
|
'~{tg}~',
|
||||||
|
'~{ss}~',
|
||||||
|
'~{wg}~',
|
||||||
|
], [
|
||||||
|
getenv('IP'),
|
||||||
|
getenv('TGPORT'),
|
||||||
|
getenv('SSPORT'),
|
||||||
|
getenv('WGPORT'),
|
||||||
|
], $s);
|
||||||
|
file_put_contents('/mirror/start_socat.sh', $t);
|
||||||
|
$a = new PharData('/config/mirror.tar');
|
||||||
|
$a->buildFromDirectory('/mirror');
|
||||||
|
$a->compress(Phar::GZ);
|
||||||
|
if (!empty($this->input)) {
|
||||||
|
$this->sendFile($this->input['from'], curl_file_create('/config/mirror.tar.gz'));
|
||||||
|
} else {
|
||||||
|
header('Content-Disposition: attachment; filename=mirror.tar.gz');
|
||||||
|
header('Content-Type: application/tar+gzip');
|
||||||
|
echo file_get_contents('/config/mirror.tar.gz');
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
unlink('/config/mirror.tar.gz');
|
||||||
|
unlink('/config/mirror.tar');
|
||||||
|
file_put_contents('/mirror/start_socat.sh', $s);
|
||||||
|
}
|
||||||
|
|
||||||
public function ocMenu()
|
public function ocMenu()
|
||||||
{
|
{
|
||||||
$pac = $this->getPacConf();
|
$pac = $this->getPacConf();
|
||||||
|
|||||||
@@ -293,4 +293,12 @@ $i = [
|
|||||||
'en' => 'dns',
|
'en' => 'dns',
|
||||||
'ru' => 'днс',
|
'ru' => 'днс',
|
||||||
],
|
],
|
||||||
|
'mirror' => [
|
||||||
|
'en' => 'mirror',
|
||||||
|
'ru' => 'зеркало',
|
||||||
|
],
|
||||||
|
'download' => [
|
||||||
|
'en' => 'download',
|
||||||
|
'ru' => 'скачать',
|
||||||
|
],
|
||||||
];
|
];
|
||||||
|
|||||||
+18
-11
@@ -22,17 +22,24 @@ $address = $_GET['a'] ?: '127.0.0.1';
|
|||||||
$port = $_GET['p'] ?: '1080';
|
$port = $_GET['p'] ?: '1080';
|
||||||
$hash = $_GET['h'];
|
$hash = $_GET['h'];
|
||||||
if ($hash == substr(md5($c['key']), 0, 8)) {
|
if ($hash == substr(md5($c['key']), 0, 8)) {
|
||||||
if (file_exists($file = __DIR__ . "/zapretlists/$type")) {
|
if ($type == 'mirror') {
|
||||||
$pac = file_get_contents($file);
|
require __DIR__ . '/bot.php';
|
||||||
header('Content-Type: text/plain');
|
require __DIR__ . '/i18n.php';
|
||||||
echo str_replace([
|
$bot = new Bot($c['key'], $i);
|
||||||
'~address~',
|
$bot->getMirror();
|
||||||
'~port~',
|
} else {
|
||||||
], [
|
if (file_exists($file = __DIR__ . "/zapretlists/$type")) {
|
||||||
$address,
|
$pac = file_get_contents($file);
|
||||||
$port,
|
header('Content-Type: text/plain');
|
||||||
], $pac);
|
echo str_replace([
|
||||||
exit;
|
'~address~',
|
||||||
|
'~port~',
|
||||||
|
], [
|
||||||
|
$address,
|
||||||
|
$port,
|
||||||
|
], $pac);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ volumes:
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
up:
|
up:
|
||||||
|
image: mercurykd/vpnbot-up:1.1
|
||||||
build:
|
build:
|
||||||
context: dockerfile
|
context: dockerfile
|
||||||
dockerfile: nginx.dockerfile
|
dockerfile: nginx.dockerfile
|
||||||
@@ -32,6 +33,7 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- 443:443
|
- 443:443
|
||||||
hostname: upstream
|
hostname: upstream
|
||||||
|
container_name: upstream-${VER}
|
||||||
depends_on:
|
depends_on:
|
||||||
php:
|
php:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
@@ -48,6 +50,7 @@ services:
|
|||||||
ipv4_address: 10.10.0.10
|
ipv4_address: 10.10.0.10
|
||||||
logging: *default-logging
|
logging: *default-logging
|
||||||
ng:
|
ng:
|
||||||
|
image: mercurykd/vpnbot-ng:1.1
|
||||||
build:
|
build:
|
||||||
context: dockerfile
|
context: dockerfile
|
||||||
dockerfile: nginx.dockerfile
|
dockerfile: nginx.dockerfile
|
||||||
@@ -66,6 +69,7 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- 80:80
|
- 80:80
|
||||||
hostname: nginx
|
hostname: nginx
|
||||||
|
container_name: nginx-${VER}
|
||||||
depends_on:
|
depends_on:
|
||||||
up:
|
up:
|
||||||
condition: service_started
|
condition: service_started
|
||||||
@@ -79,6 +83,7 @@ services:
|
|||||||
ipv4_address: 10.10.0.2
|
ipv4_address: 10.10.0.2
|
||||||
logging: *default-logging
|
logging: *default-logging
|
||||||
php:
|
php:
|
||||||
|
image: mercurykd/vpnbot-php:1.1
|
||||||
build:
|
build:
|
||||||
dockerfile: dockerfile/php.dockerfile
|
dockerfile: dockerfile/php.dockerfile
|
||||||
args:
|
args:
|
||||||
@@ -94,6 +99,8 @@ services:
|
|||||||
- ./scripts/start_php.sh:/start_php.sh
|
- ./scripts/start_php.sh:/start_php.sh
|
||||||
- ./scripts/check_file.sh:/check_file.sh
|
- ./scripts/check_file.sh:/check_file.sh
|
||||||
- ./version:/version
|
- ./version:/version
|
||||||
|
- ./mirror:/mirror
|
||||||
|
- ./.env:/mirror/.env
|
||||||
environment:
|
environment:
|
||||||
TZ: ${TZ}
|
TZ: ${TZ}
|
||||||
IP: ${IP}
|
IP: ${IP}
|
||||||
@@ -102,6 +109,7 @@ services:
|
|||||||
SSPORT: ${SSPORT}
|
SSPORT: ${SSPORT}
|
||||||
TGPORT: ${TGPORT}
|
TGPORT: ${TGPORT}
|
||||||
hostname: php
|
hostname: php
|
||||||
|
container_name: php-${VER}
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
stop_grace_period: 1s
|
stop_grace_period: 1s
|
||||||
command: ["/bin/sh", "/start_php.sh"]
|
command: ["/bin/sh", "/start_php.sh"]
|
||||||
@@ -118,6 +126,7 @@ services:
|
|||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 5
|
retries: 5
|
||||||
proxy:
|
proxy:
|
||||||
|
image: mercurykd/vpnbot-ss:1.1
|
||||||
build:
|
build:
|
||||||
dockerfile: dockerfile/shadowsocks.dockerfile
|
dockerfile: dockerfile/shadowsocks.dockerfile
|
||||||
args:
|
args:
|
||||||
@@ -129,6 +138,7 @@ services:
|
|||||||
- ./config/sshd_config:/etc/ssh/sshd_config
|
- ./config/sshd_config:/etc/ssh/sshd_config
|
||||||
- ./scripts/start_proxy.sh:/start_proxy.sh
|
- ./scripts/start_proxy.sh:/start_proxy.sh
|
||||||
hostname: proxy
|
hostname: proxy
|
||||||
|
container_name: proxy-${VER}
|
||||||
depends_on:
|
depends_on:
|
||||||
php:
|
php:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
@@ -142,6 +152,7 @@ services:
|
|||||||
command: ["/bin/sh", "/start_proxy.sh"]
|
command: ["/bin/sh", "/start_proxy.sh"]
|
||||||
logging: *default-logging
|
logging: *default-logging
|
||||||
wg:
|
wg:
|
||||||
|
image: mercurykd/vpnbot-wg:1.1
|
||||||
build:
|
build:
|
||||||
dockerfile: dockerfile/wireguard.dockerfile
|
dockerfile: dockerfile/wireguard.dockerfile
|
||||||
args:
|
args:
|
||||||
@@ -159,6 +170,7 @@ services:
|
|||||||
- ./ssh:/ssh
|
- ./ssh:/ssh
|
||||||
- ./config/sshd_config:/etc/ssh/sshd_config
|
- ./config/sshd_config:/etc/ssh/sshd_config
|
||||||
hostname: wireguard
|
hostname: wireguard
|
||||||
|
container_name: wireguard-${VER}
|
||||||
depends_on:
|
depends_on:
|
||||||
php:
|
php:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
@@ -179,6 +191,7 @@ services:
|
|||||||
ipv4_address: 10.10.0.4
|
ipv4_address: 10.10.0.4
|
||||||
logging: *default-logging
|
logging: *default-logging
|
||||||
ad:
|
ad:
|
||||||
|
image: mercurykd/vpnbot-ad:1.1
|
||||||
build:
|
build:
|
||||||
dockerfile: dockerfile/adguard.dockerfile
|
dockerfile: dockerfile/adguard.dockerfile
|
||||||
args:
|
args:
|
||||||
@@ -197,6 +210,7 @@ services:
|
|||||||
- ./logs/:/logs/
|
- ./logs/:/logs/
|
||||||
- ./scripts/start_ad.sh:/start_ad.sh
|
- ./scripts/start_ad.sh:/start_ad.sh
|
||||||
hostname: adguard
|
hostname: adguard
|
||||||
|
container_name: adguard-${VER}
|
||||||
depends_on:
|
depends_on:
|
||||||
php:
|
php:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
@@ -211,6 +225,7 @@ services:
|
|||||||
entrypoint: ["/bin/sh", "/start_ad.sh"]
|
entrypoint: ["/bin/sh", "/start_ad.sh"]
|
||||||
logging: *default-logging
|
logging: *default-logging
|
||||||
ss:
|
ss:
|
||||||
|
image: mercurykd/vpnbot-ss:1.1
|
||||||
build:
|
build:
|
||||||
dockerfile: dockerfile/shadowsocks.dockerfile
|
dockerfile: dockerfile/shadowsocks.dockerfile
|
||||||
args:
|
args:
|
||||||
@@ -222,6 +237,7 @@ services:
|
|||||||
- ./config/sshd_config:/etc/ssh/sshd_config
|
- ./config/sshd_config:/etc/ssh/sshd_config
|
||||||
- ./scripts/start_ss.sh:/start_ss.sh
|
- ./scripts/start_ss.sh:/start_ss.sh
|
||||||
hostname: shadowsocks
|
hostname: shadowsocks
|
||||||
|
container_name: shadowsocks-${VER}
|
||||||
depends_on:
|
depends_on:
|
||||||
php:
|
php:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
@@ -238,6 +254,7 @@ services:
|
|||||||
ipv4_address: 10.10.0.6
|
ipv4_address: 10.10.0.6
|
||||||
logging: *default-logging
|
logging: *default-logging
|
||||||
tg:
|
tg:
|
||||||
|
image: mercurykd/vpnbot-tg:1.1
|
||||||
build:
|
build:
|
||||||
dockerfile: dockerfile/telegram.dockerfile
|
dockerfile: dockerfile/telegram.dockerfile
|
||||||
volumes:
|
volumes:
|
||||||
@@ -247,6 +264,7 @@ services:
|
|||||||
- ./scripts/start_tg.sh:/start_tg.sh
|
- ./scripts/start_tg.sh:/start_tg.sh
|
||||||
- ./config/mtprotosecret:/mtprotosecret
|
- ./config/mtprotosecret:/mtprotosecret
|
||||||
hostname: telegram
|
hostname: telegram
|
||||||
|
container_name: mtproto-${VER}
|
||||||
depends_on:
|
depends_on:
|
||||||
php:
|
php:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
@@ -263,6 +281,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.1
|
||||||
build:
|
build:
|
||||||
dockerfile: dockerfile/xray.dockerfile
|
dockerfile: dockerfile/xray.dockerfile
|
||||||
args:
|
args:
|
||||||
@@ -274,6 +293,7 @@ services:
|
|||||||
- ./config/xray.json:/xray.json
|
- ./config/xray.json:/xray.json
|
||||||
- ./scripts/start_xray.sh:/start_xray.sh
|
- ./scripts/start_xray.sh:/start_xray.sh
|
||||||
hostname: xray
|
hostname: xray
|
||||||
|
container_name: xray-${VER}
|
||||||
depends_on:
|
depends_on:
|
||||||
php:
|
php:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
@@ -286,6 +306,7 @@ services:
|
|||||||
ipv4_address: 10.10.0.9
|
ipv4_address: 10.10.0.9
|
||||||
logging: *default-logging
|
logging: *default-logging
|
||||||
oc:
|
oc:
|
||||||
|
image: mercurykd/vpnbot-oc:1.1
|
||||||
build:
|
build:
|
||||||
dockerfile: dockerfile/ocserv.dockerfile
|
dockerfile: dockerfile/ocserv.dockerfile
|
||||||
args:
|
args:
|
||||||
@@ -298,6 +319,7 @@ services:
|
|||||||
- ./certs:/certs
|
- ./certs:/certs
|
||||||
- ./scripts/start_oc.sh:/start_oc.sh
|
- ./scripts/start_oc.sh:/start_oc.sh
|
||||||
hostname: ocserv
|
hostname: ocserv
|
||||||
|
container_name: openconnect-${VER}
|
||||||
depends_on:
|
depends_on:
|
||||||
php:
|
php:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
@@ -315,6 +337,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.1
|
||||||
build:
|
build:
|
||||||
dockerfile: dockerfile/naive.dockerfile
|
dockerfile: dockerfile/naive.dockerfile
|
||||||
args:
|
args:
|
||||||
@@ -327,6 +350,7 @@ services:
|
|||||||
- ./certs:/certs
|
- ./certs:/certs
|
||||||
- ./scripts/start_np.sh:/start_np.sh
|
- ./scripts/start_np.sh:/start_np.sh
|
||||||
hostname: naive
|
hostname: naive
|
||||||
|
container_name: naive-${VER}
|
||||||
depends_on:
|
depends_on:
|
||||||
php:
|
php:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ FROM $image
|
|||||||
RUN apk add --no-cache --update php81 \
|
RUN apk add --no-cache --update php81 \
|
||||||
php81-mbstring \
|
php81-mbstring \
|
||||||
php81-session \
|
php81-session \
|
||||||
|
php81-phar \
|
||||||
php81-curl \
|
php81-curl \
|
||||||
php81-opcache \
|
php81-opcache \
|
||||||
php81-openssl \
|
php81-openssl \
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
b:
|
b:
|
||||||
docker compose build
|
docker compose build
|
||||||
u: # запуск контейнеров
|
u: # запуск контейнеров
|
||||||
IP=$(shell ip -4 addr | sed -ne 's|^.* inet \([^/]*\)/.* scope global.*$$|\1|p' | awk '{print $1}' | head -1) docker compose up -d --build --force-recreate
|
IP=$(shell ip -4 addr | sed -ne 's|^.* inet \([^/]*\)/.* scope global.*$$|\1|p' | awk '{print $1}' | head -1) VER=$(shell git describe --tags) docker compose up -d --force-recreate
|
||||||
d: # остановка контейнеров
|
d: # остановка контейнеров
|
||||||
docker compose down
|
docker compose down
|
||||||
dv: # остановка контейнеров
|
dv: # остановка контейнеров
|
||||||
@@ -40,8 +40,8 @@ cleanf:
|
|||||||
docker image prune -f > /dev/null
|
docker image prune -f > /dev/null
|
||||||
docker builder prune -f > /dev/null
|
docker builder prune -f > /dev/null
|
||||||
cleanall:
|
cleanall:
|
||||||
docker image prune -a
|
docker image prune -a -f
|
||||||
docker builder prune -a
|
docker builder prune -a -f
|
||||||
p:
|
p:
|
||||||
git stash
|
git stash
|
||||||
git pull
|
git pull
|
||||||
@@ -49,3 +49,5 @@ p:
|
|||||||
update: p r
|
update: p r
|
||||||
cn:
|
cn:
|
||||||
docker compose exec ng nginx -t
|
docker compose exec ng nginx -t
|
||||||
|
push:
|
||||||
|
docker compose push
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
version: "3"
|
||||||
|
|
||||||
|
services:
|
||||||
|
socat:
|
||||||
|
build:
|
||||||
|
dockerfile: ./dockerfile
|
||||||
|
ports:
|
||||||
|
- 80:80
|
||||||
|
- 443:443
|
||||||
|
- 853:853
|
||||||
|
- ${TGPORT}:${TGPORT}
|
||||||
|
- ${SSPORT}:${SSPORT}
|
||||||
|
- ${SSPORT}:${SSPORT}/udp
|
||||||
|
- ${WGPORT}:${WGPORT}/udp
|
||||||
|
volumes:
|
||||||
|
- ./start_socat.sh:/start_socat.sh
|
||||||
|
command: /bin/sh /start_socat.sh
|
||||||
|
stop_grace_period: 1s
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
FROM alpine:3.18
|
||||||
|
RUN apk add socat htop net-tools
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
b:
|
||||||
|
docker compose build --no-cache
|
||||||
|
u:
|
||||||
|
docker compose up -d --build
|
||||||
|
d:
|
||||||
|
docker compose down
|
||||||
|
ps:
|
||||||
|
docker compose ps
|
||||||
|
e:
|
||||||
|
docker compose exec socat sh
|
||||||
|
r: d u
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
socat TCP-LISTEN:80,fork TCP:{ip}:80 &
|
||||||
|
socat TCP-LISTEN:443,fork TCP:{ip}:443 &
|
||||||
|
socat TCP-LISTEN:853,fork TCP:{ip}:853 &
|
||||||
|
socat TCP-LISTEN:{tg},fork TCP:{ip}:{tg} &
|
||||||
|
socat TCP-LISTEN:{ss},fork TCP:{ip}:{ss} &
|
||||||
|
socat UDP-LISTEN:{ss},fork UDP:{ip}:{ss} &
|
||||||
|
socat UDP-LISTEN:{wg},fork UDP:{ip}:{wg} &
|
||||||
|
tail -f /dev/null
|
||||||
@@ -1,3 +1,7 @@
|
|||||||
|
29.02.2024 образы теперь будут скачиваться с docker hub
|
||||||
|
- <code>git pull && make d cleanall u</code>
|
||||||
|
28.02.2024 v1.1 добавлен раздел "зеркало"
|
||||||
|
- <code>git pull && make r</code>
|
||||||
27.02.2024 оптимизация размеров образов, сборка naive из исходников
|
27.02.2024 оптимизация размеров образов, сборка naive из исходников
|
||||||
- <code>git pull && make r</code>
|
- <code>git pull && make r</code>
|
||||||
19.02.2024 добавлен NaiveProxy
|
19.02.2024 добавлен NaiveProxy
|
||||||
|
|||||||
Reference in New Issue
Block a user