Compare commits

...

161 Commits

Author SHA1 Message Date
mercury 3f1e80c641 update version 2025-12-15 16:48:24 +04:00
mercury 5afe6a4777 lightweight warp image 2025-12-15 00:44:54 +04:00
mercury c2cf0bff98 delete bot command 2025-12-15 00:34:41 +04:00
mercury 60241aaffb new mtproto image 2025-12-15 00:18:08 +04:00
mercury 96ff868b10 improve dnstt menu 2025-12-14 22:49:28 +04:00
mercury f58c29a66b fix reality start 2025-12-14 22:48:58 +04:00
mercury ca922f4612 change address for wg on start 2025-12-14 22:04:22 +04:00
mercury 5a5b1b62b1 domain for shortlink amnezia 2025-12-14 21:55:30 +04:00
mercury 0ef34f818d changing dependencies when starting containers 2025-12-11 00:44:32 +04:00
mercury d1960d6acb change of strategy for server xray domain resolution 2025-12-10 01:34:44 +04:00
mercury 95cba4c8d1 improved issuance of routing rules vless: ip or domains 2025-12-10 01:33:21 +04:00
mercury 18e2dd53ff changing dependencies when starting containers 2025-12-10 00:40:45 +04:00
mercury 3e5b131c16 delete hysteria upstream 2025-12-10 00:40:15 +04:00
mercury e07d1505e4 attempt to save page when changing domain list 2025-12-10 00:01:02 +04:00
mercury c140f292e8 fix port for first amnezia container 2025-12-09 21:57:10 +04:00
mercury 7cc100ace5 dnstt menu improve 2025-12-09 21:31:12 +04:00
mercury 4938ada85d Merge branch 'xhttp' into dev 2025-12-04 02:24:43 +04:00
mercury c5b9886470 hysteria: logging, correct port 2025-12-04 02:23:00 +04:00
mercury 61d8b899e7 improved docker-compose.override.yml rewrite algorithm 2025-12-04 01:08:14 +04:00
mercury 7d81eeeddd improved process logging 2025-12-03 01:25:53 +04:00
mercury 3bdebd95ab backup dnstt keys 2025-12-03 00:16:19 +04:00
mercury eb4641a58d ability to disable naive and openconnect subdomains 2025-12-03 00:10:47 +04:00
mercury 61900daafd custom hysteria port 2025-12-03 00:08:49 +04:00
mercury 364dbd6408 xhttp from legiz 2025-12-02 22:41:08 +04:00
mercury 57ee403070 added hysteria 2025-12-01 00:13:19 +04:00
mercury b5ab8fb4eb command to add to cron to restart the bot when restarting the vps 2025-11-30 21:06:16 +04:00
mercury 95c6a023d0 iodine -> dnstt 2025-11-30 20:46:31 +04:00
mercury 9f196ca58e issue #36 fix 2025-11-29 22:32:50 +04:00
mercury 665b4007eb improve cron handlers 2025-11-28 02:43:29 +04:00
mercury 9c9f42e9e4 update mtproto image 2025-11-28 02:06:19 +04:00
mercury 30c260bf02 fix override html 2025-11-27 21:41:59 +04:00
mercury a3c59991ce fix override html 2025-11-27 21:35:09 +04:00
mercury 288435e2a0 support quic destination override 2025-11-27 14:29:41 +04:00
mercury 1b1acee59f Ruleset polling timeout increased to 60 seconds 2025-11-27 02:16:59 +04:00
mercury a8d121b7e1 adaptation of the warp, block list to the presence of ipcidr for all kernel configs 2025-11-27 02:15:22 +04:00
mercury f6d2c89e8d xray statistics are collected once per minute 2025-11-27 02:12:22 +04:00
mercury e4863eb645 update warp image 2025-11-26 11:54:13 +04:00
mercury bc28be571b fix warp rules for xray 2025-11-26 10:22:35 +04:00
mercury 34f5f32a82 warp list create classical ruleset for mihomo 2025-11-26 10:03:29 +04:00
mercury fc4c28edfb naiveproxy image update 2025-11-26 01:10:06 +04:00
mercury c352270b39 Fix overwriting fingerprint for vray 2025-11-26 01:03:55 +04:00
mercury 2ee6c3392b ability to add IPs and subnets to warplist 2025-11-26 00:50:43 +04:00
mercury 9bd85c9e05 empty password stoped openconnect and naive, fix 2025-11-10 00:24:35 +04:00
mercury 82e51c0d9c empty password stoped openconnect and naive 2025-11-10 00:14:04 +04:00
mercury 9051b214c5 fix reality 2025-11-09 23:52:51 +04:00
mercury 0710ef51fd fix domain in download config vless 2025-11-08 22:54:18 +04:00
mercury 597763f80a update group link 2025-11-08 19:44:38 +04:00
mercury 8398ecf736 edit announce 2025-11-08 19:24:39 +04:00
mercury 0d14061edb Merge branch 'dev' of github.com:mercurykd/vpnbot into dev 2025-11-08 19:23:05 +04:00
mercury 03218b974d download vless button 2025-11-08 19:20:50 +04:00
Konstantin 84ac1200dc Merge pull request #41 from legiz-ru/dev
Add HWID device limit support for sub page
2025-09-25 11:00:13 +04:00
legiz-ru aa64a48db2 delete overhead mkdir0777 2025-09-25 09:52:17 +03:00
legiz-ru 70c83da66a add hwid to backup 2025-09-23 20:44:42 +03:00
legiz-ru 52ff056474 fix: hwid ignore for browsers 2025-09-23 14:21:41 +03:00
legiz-ru 225260044a Add HWID device limit support for sub page
based on standart by remnawave: https://remna.st/docs/features/hwid-device-limit
2025-09-23 13:50:03 +03:00
mercury 050d1ee3eb fix start_io 2025-09-11 16:46:12 +04:00
mercury 6979cca602 iodine 2025-09-11 16:22:27 +04:00
mercury 7fc24ea4f4 add suburl, expire to subs page 2025-08-31 00:18:00 +04:00
mercury 3dff9e039f non-wiped additional nginx configurations 2025-07-19 22:48:28 +04:00
mercury e2441eb9fd update version 2025-07-16 17:18:18 +04:00
mercury 269d0e9956 mirror shell-script 2025-07-13 23:34:11 +04:00
mercury 8ba85164aa fix empty warp status 2025-07-11 20:55:38 +04:00
mercury e7cc7b66e2 add configs to subs page 2025-07-04 18:33:04 +04:00
mercury 54fa8d35b1 update version 2025-07-04 17:48:15 +04:00
mercury ffe6bb4ba8 subscription page 2025-07-04 17:45:50 +04:00
mercury 6be95533c4 improve vless menu 2025-07-04 16:42:47 +04:00
mercury 8d13bee021 improve /id 2025-07-04 16:38:39 +04:00
mercury db6a18f498 update version 2025-06-18 00:56:49 +04:00
mercury 6954a16fa2 get ip from host 2025-06-18 00:47:48 +04:00
mercury ca7a9c955d update version 2025-06-11 14:09:51 +04:00
mercury 852fbd55c6 Pagination number 2025-05-27 23:42:02 +04:00
mercury 3a8a843d8c update version 2025-05-20 21:39:34 +04:00
mercury 90828d1117 improve main menu 2025-05-18 19:23:42 +04:00
mercury 37e8b96bcf improve main menu 2025-05-18 11:30:59 +04:00
mercury 306bc41813 improve main menu 2025-05-18 03:29:15 +04:00
mercury f6e5da382b reset vless stats monthly 2025-05-17 16:18:46 +04:00
mercury d7ed7042ec update version 2025-05-17 14:54:58 +04:00
mercury 4496a30552 add status process container 2025-05-17 14:49:32 +04:00
mercury ca1a596f85 fix crash vless when enable timer user 2025-05-17 14:24:22 +04:00
mercury b3edf1bdcc Merge branch 'dev' of github.com:mercurykd/vpnbot into dev 2025-05-17 13:55:28 +04:00
mercury c6306aa918 vless: check already exists user 2025-05-17 13:52:45 +04:00
Konstantin d5bbc9a564 Merge pull request #39 from legiz-ru/dev
add no overwrite key for Clash Mi
2025-05-10 12:22:57 +04:00
legiz-ru d2aab8ee4b add no overwrite key for Clash Mi 2025-05-09 22:18:30 +03:00
mercury 304217d36e Периодическое падение upstream при запуске сервисов 2025-04-26 23:37:37 +04:00
mercury 2622397542 mihomo: udp true 2025-04-18 23:40:33 +04:00
mercury 702123e39c vless: ip limit only notifies 2025-04-17 00:58:13 +04:00
mercury 01ef7707c4 fix first start 2025-04-14 11:36:26 +04:00
mercury 064d39d80b Excess image php 2025-04-09 18:12:18 +04:00
mercury 1b93d41421 cyclical rebooting panel adguardhome fix 2025-04-07 00:22:50 +04:00
mercury e41c8e30a4 fix warp 2025-04-06 23:57:46 +04:00
mercury 260f988360 Merge branch 'dev' of github.com:mercurykd/vpnbot into dev 2025-04-05 00:38:54 +04:00
mercury ca4905220d np/oc the domain is preserved when transferring 2025-04-05 00:36:08 +04:00
Konstantin 08c5ff136e Merge pull request #38 from legiz-ru/dev
new variable ~dnspath~
2025-03-04 15:45:18 +04:00
legiz-ru 8709531717 new variable ~dnspath~
new variable ~dnspath~ for client templates (required for future release sing-box 1.12)
2025-03-04 12:41:23 +03:00
Konstantin 71f53c3575 Merge pull request #37 from legiz-ru/dev
update singbox 1.11.4 windows x64
2025-03-04 12:16:19 +04:00
legiz-ru 2607f1f264 update singbox 1.11.4 windows x64 2025-03-04 10:46:56 +03:00
mercury a94cab7dc1 fix ip limit user off 2025-03-02 18:41:18 +04:00
mercury 694d446402 update version 2025-02-22 18:56:42 +04:00
mercury 6074d40643 update version 2025-02-22 18:52:17 +04:00
mercury 4b1df94325 Revert "add clash mode selector for sing-box clients"
This reverts commit fb22744fa7.
2025-02-22 18:51:49 +04:00
mercury 232c75d5bf Merge branch 'dev' of github.com:mercurykd/vpnbot into dev 2025-02-22 18:50:32 +04:00
mercury 5e860a4896 fix addruleset for block outbound 2025-02-22 18:47:36 +04:00
Konstantin 5b05486b98 Merge pull request #35 from legiz-ru/dev
add clash mode selector for sing-box clients
2025-02-13 10:13:38 +04:00
legiz-ru fb22744fa7 add clash mode selector for sing-box clients 2025-02-13 08:11:20 +03:00
mercury af812b7c93 vless: stats collect improve 2025-02-12 13:29:08 +04:00
mercury 3302ca8871 vless stats: fix delete user 2025-02-12 12:50:39 +04:00
mercury 2c5eff03d5 vless stats: fix reset user stats 2025-02-12 00:25:23 +04:00
mercury a8a203041f vless stats: fix reset user stats 2025-02-11 22:48:47 +04:00
mercury a21c9b5fe9 update version 2025-02-11 00:14:07 +04:00
mercury 696779450f ip limit: count ip 2025-02-11 00:12:21 +04:00
mercury 7c5b3dfa3a xray: fix stats user 2025-02-10 23:58:17 +04:00
mercury 74404559f9 xray: stats to separate file 2025-02-10 23:33:38 +04:00
mercury 11e8fb468b singbox: return mixed-in port 2025-02-10 10:03:27 +04:00
mercury ca92ca703f update version 2025-02-08 15:52:49 +04:00
mercury f527888db8 vless: singbox 1.11 migrate 2025-02-08 15:51:44 +04:00
mercury 0e47a771cc Reapply "update singbox 1.11 windows x64"
This reverts commit 414a67c10d.
2025-02-08 15:51:20 +04:00
mercury ff10cbefc8 vless: fix reset stats 2025-02-07 22:44:55 +04:00
mercury 3371ba4bae update version 2025-02-07 00:53:07 +04:00
mercury 621fb08467 vless stats fix 2025-02-07 00:47:52 +04:00
mercury 5153b2c94a vless stats fix 2025-02-07 00:36:49 +04:00
mercury 1e9461cc49 vless: global stats traffic 2025-02-06 17:34:25 +04:00
mercury 88f48a036c autoclean logs 2025-02-06 17:33:56 +04:00
mercury b40e052d3f vless: add user with uuid 2025-02-06 16:34:14 +04:00
mercury a43082ae27 vless: global stats traffic 2025-02-06 16:25:36 +04:00
mercury c2cd945991 hashbot migration with backup 2025-02-06 16:09:21 +04:00
mercury 0737327e4b vless ip limit: ability change window time 2025-02-05 21:34:01 +04:00
mercury f620bf12cd vless ip limit: improve message 2025-02-05 17:26:03 +04:00
mercury 8b3730c61f vless ip limit improve 2025-02-05 17:01:52 +04:00
mercury c6d9dcd47b vless: batch adding users 2025-02-05 16:13:55 +04:00
mercury d83ba51d81 vless ip limit 2025-02-05 16:00:32 +04:00
mercury 1a593100b7 update version 2025-02-02 14:24:05 +04:00
mercury 414a67c10d Revert "update singbox 1.11 windows x64"
This reverts commit 284b025881.
2025-02-02 13:29:51 +04:00
mercury f92b484011 Revert "fix singbox template"
This reverts commit 86261e6b76.
2025-02-02 11:52:02 +04:00
mercury 7af0276944 Revert "Migrate to sing-box 1.11"
This reverts commit 6d1ab0cb3a.
2025-02-02 01:56:15 +04:00
mercury 24aaa8756c update version 2025-02-02 00:05:02 +04:00
mercury 07e2beff9b xray stats improve 2025-01-31 18:15:48 +04:00
mercury 86261e6b76 fix singbox template 2025-01-31 12:30:45 +04:00
Konstantin d816582e6f Merge pull request #34 from legiz-ru/dev
Migrate to sing-box 1.11
2025-01-30 19:04:30 +04:00
legiz-ru 6d1ab0cb3a Migrate to sing-box 1.11 2025-01-30 17:55:27 +03:00
legiz-ru 284b025881 update singbox 1.11 windows x64 2025-01-30 17:51:19 +03:00
mercury 0ca93b56a3 vless: ~email~ tag in subscription 2025-01-29 18:18:28 +04:00
mercury 7bcd8de007 vless: reset stats user 2025-01-29 11:04:06 +04:00
mercury 34eb950852 ip-cidr route 2025-01-24 22:09:05 +04:00
mercury 46021855a5 improve wg client menu 2025-01-23 00:55:44 +04:00
mercury 29c18ceb9d update readme 2025-01-20 01:04:24 +04:00
mercury 49d0827b9e update version 2025-01-18 23:39:39 +04:00
mercury 07e04c384a Merge branch 'dev' of github.com:mercurykd/vpnbot into dev 2025-01-18 23:33:29 +04:00
mercury 579457b4f4 show xray stats 2025-01-18 23:33:00 +04:00
mercury 3dac9416ca fix download mihomo template 2025-01-18 23:32:31 +04:00
mercury 5b4d3b5627 reality degenerate pattern improve 2025-01-18 23:31:58 +04:00
mercury 658e125cd8 show group id 2025-01-18 23:31:01 +04:00
Konstantin 1840555573 Merge pull request #33 from legiz-ru/dev
update singbox 1.10.7 windows x64
2025-01-18 18:23:20 +04:00
legiz-ru ecdc028226 update singbox 1.10.7 windows x64 2025-01-18 16:57:39 +03:00
mercury d432bf82f2 force inclusion of xray statistics 2025-01-16 01:04:33 +04:00
mercury 211e2c079d collect xray metrics 2025-01-13 15:32:54 +04:00
Konstantin 1696c4da7b Merge pull request #32 from legiz-ru/dev
v2ray(xray) client templates update
2025-01-12 02:23:56 +04:00
legiz-ru b8d5700eba v2ray(xray) client update
return warp+block domain routes
replace rule for directing
2025-01-12 01:17:23 +03:00
mercury 7e20c14299 update version 2025-01-07 21:02:43 +04:00
mercury b9155cf674 fix show ports on start 2025-01-07 21:00:06 +04:00
mercury 159f775e12 port accounting for shadowsocks 2025-01-07 18:30:57 +04:00
mercury ae672439be return shadowsocks 2025-01-07 18:01:44 +04:00
36 changed files with 3139 additions and 600 deletions
+6
View File
@@ -10,6 +10,7 @@
/sftp-config.json /sftp-config.json
/tg.pyr /tg.pyr
/config/wg0.conf /config/wg0.conf
/config/hwid.json
/todo.todo /todo.todo
/app/zapretlists/* /app/zapretlists/*
!/app/zapretlists/.gitkeep !/app/zapretlists/.gitkeep
@@ -26,3 +27,8 @@ docker-compose.override.yml
backup.json backup.json
app/webapp/override/ app/webapp/override/
.rest .rest
subscription.php
location.conf
override.conf
i18n.override.php
+2362 -370
View File
File diff suppressed because it is too large Load Diff
+29 -1
View File
@@ -30,7 +30,7 @@ $i = [
'ru' => 'PAC', 'ru' => 'PAC',
], ],
'chat' => [ 'chat' => [
'en' => 'discussion group', 'en' => 'chat',
'ru' => 'чат поддержки', 'ru' => 'чат поддержки',
], ],
'back' => [ 'back' => [
@@ -193,6 +193,30 @@ $i = [
'en' => 'delete internal dns', 'en' => 'delete internal dns',
'ru' => 'удалить внутренний dns', 'ru' => 'удалить внутренний dns',
], ],
'hwid limit' => [
'en' => 'HWID limit',
'ru' => 'HWID лимит',
],
'hwid devices' => [
'en' => 'HWID devices',
'ru' => 'Устройства HWID',
],
'set hwid devices count' => [
'en' => 'set HWID devices count',
'ru' => 'установить количество HWID устройств',
],
'use default hwid limit' => [
'en' => 'use default limit',
'ru' => 'использовать лимит по умолчанию',
],
'no devices' => [
'en' => 'no devices',
'ru' => 'нет устройств',
],
'hwid notice' => [
'en' => 'HWID limit works only when subscription is refreshed or added',
'ru' => 'HWID лимит срабатывает только в момент обновления и добавления подписки',
],
'on' => [ 'on' => [
'en' => '🟢', 'en' => '🟢',
'ru' => '🟢', 'ru' => '🟢',
@@ -378,3 +402,7 @@ $i = [
'ru' => 'перезагрузка', 'ru' => 'перезагрузка',
], ],
]; ];
if (file_exists(__DIR__ . '/i18n.override.php')) {
include __DIR__ . '/i18n.override.php';
}
+5 -1
View File
@@ -38,10 +38,14 @@ switch (true) {
// adguard cookie // adguard cookie
case preg_match('~^' . preg_quote("/webapp$hash/check") . '~', $_SERVER['REQUEST_URI']) && $webapp: case preg_match('~^' . preg_quote("/webapp$hash/check") . '~', $_SERVER['REQUEST_URI']) && $webapp:
setcookie('c', substr(hash('sha256', $c['key']), 0, 8), 0, '/'); setcookie('c', $hash, 0, '/');
echo "/adguard$hash/"; echo "/adguard$hash/";
break; break;
case preg_match('~^' . preg_quote("/pac$hash/sub") . '~', $_SERVER['REQUEST_URI']) && file_exists(__DIR__ . '/subscription.php'):
$bot->sub();
exit;
// subs & pac // subs & pac
case preg_match('~^' . preg_quote("/pac$hash") . '~', $_SERVER['REQUEST_URI']): case preg_match('~^' . preg_quote("/pac$hash") . '~', $_SERVER['REQUEST_URI']):
if (!empty($t = unserialize(base64_decode(explode('/', $_SERVER['REQUEST_URI'])[2])))) { // fix sing-box import if (!empty($t = unserialize(base64_decode(explode('/', $_SERVER['REQUEST_URI'])[2])))) { // fix sing-box import
+10
View File
@@ -0,0 +1,10 @@
<?php
require __DIR__ . '/timezone.php';
// require __DIR__ . '/debug.php';
require __DIR__ . '/bot.php';
require __DIR__ . '/config.php';
require __DIR__ . '/i18n.php';
(new Bot($c['key'], $i))->analyzeXray();
+7
View File
@@ -13,6 +13,7 @@ if ($c['debug']) {
$bot = new Bot($c['key'], $i); $bot = new Bot($c['key'], $i);
$bot->selfUpdate(); $bot->selfUpdate();
$bot->ssPswdCheck();
$bot->restartTG(); $bot->restartTG();
if (!empty($bot->selfupdate)) { if (!empty($bot->selfupdate)) {
$bot->offWarp(); $bot->offWarp();
@@ -23,3 +24,9 @@ $bot->adguardSync();
$bot->cloakNginx(); $bot->cloakNginx();
$bot->syncDeny(); $bot->syncDeny();
$bot->cleanDocker(); $bot->cleanDocker();
$bot->dnsttStart();
$bot->restartHysteria();
$c = $bot->getPacConf();
$bot->setUpstreamDomain($c['transport'] != 'Reality' ? 't' : $c['reality']['domain']);
$bot->setUpstreamDomainNaive($c['domain']);
$bot->setUpstreamDomainOcserv($c['domain']);
+16 -7
View File
@@ -8,7 +8,7 @@
"mode": "rule", "mode": "rule",
"log-level": "info", "log-level": "info",
"ipv6": false, "ipv6": false,
"keep-alive-interval": 30, "keep-alive-interval": 60,
"unified-delay": false, "unified-delay": false,
"profile": { "profile": {
"store-selected": true, "store-selected": true,
@@ -72,6 +72,7 @@
"uuid": "~uid~", "uuid": "~uid~",
"network": "tcp", "network": "tcp",
"flow": "xtls-rprx-vision", "flow": "xtls-rprx-vision",
"udp": true,
"tls": true, "tls": true,
"reality-opts": { "reality-opts": {
"public-key": "~public_key~", "public-key": "~public_key~",
@@ -97,7 +98,7 @@
"type": "RULE-SET", "type": "RULE-SET",
"list": "~block~", "list": "~block~",
"action": "REJECT", "action": "REJECT",
"interval": 30, "interval": 60,
"behavior": "domain", "behavior": "domain",
"name": "block" "name": "block"
}, },
@@ -105,7 +106,7 @@
"type": "RULE-SET", "type": "RULE-SET",
"list": "~process~", "list": "~process~",
"action": "PROXY", "action": "PROXY",
"interval": 30, "interval": 60,
"behavior": "classical", "behavior": "classical",
"name": "process" "name": "process"
}, },
@@ -113,7 +114,7 @@
"type": "RULE-SET", "type": "RULE-SET",
"list": "~package~", "list": "~package~",
"action": "PROXY", "action": "PROXY",
"interval": 30, "interval": 60,
"behavior": "classical", "behavior": "classical",
"name": "package" "name": "package"
}, },
@@ -121,18 +122,26 @@
"type": "RULE-SET", "type": "RULE-SET",
"list": "~warp~", "list": "~warp~",
"action": "PROXY", "action": "PROXY",
"interval": 30, "interval": 60,
"behavior": "domain", "behavior": "classical",
"name": "warp" "name": "warp"
}, },
{ {
"type": "RULE-SET", "type": "RULE-SET",
"list": "~pac~", "list": "~pac~",
"action": "PROXY", "action": "PROXY",
"interval": 30, "interval": 60,
"behavior": "domain", "behavior": "domain",
"name": "pac" "name": "pac"
}, },
{
"type": "RULE-SET",
"list": "~subnet~",
"action": "PROXY",
"interval": 60,
"behavior": "ipcidr",
"name": "subnet"
},
{ {
"type": "MATCH", "type": "MATCH",
"action": "DIRECT" "action": "DIRECT"
+1
View File
@@ -0,0 +1 @@
{}
+9
View File
@@ -0,0 +1,9 @@
listen: :443
proxy_protocol: true
tls:
cert: /certs/cert_public
key: /certs/cert_private
auth:
type: password
password:
+38 -1
View File
@@ -11,7 +11,7 @@ events {
http { http {
server_names_hash_bucket_size 64; server_names_hash_bucket_size 64;
server_tokens off; server_tokens off;
include include.conf; include override.conf;
include /etc/nginx/mime.types; include /etc/nginx/mime.types;
default_type application/octet-stream; default_type application/octet-stream;
@@ -48,6 +48,11 @@ http {
try_files $uri /override.html @auth; try_files $uri /override.html @auth;
} }
location /override/ {
alias /app/override/;
try_files $uri =404;
}
location / { location / {
root /app; root /app;
auth_basic "Restricted Content"; auth_basic "Restricted Content";
@@ -97,6 +102,18 @@ http {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_read_timeout 5d; proxy_read_timeout 5d;
} }
location /v2ray {
access_log /logs/nginx_v2ray_access;
proxy_redirect off;
proxy_buffering off;
proxy_http_version 1.1;
proxy_pass http://ss:8388/;
proxy_set_header Host $http_host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
location /dns-query { location /dns-query {
access_log /logs/nginx_doh_access; access_log /logs/nginx_doh_access;
proxy_http_version 1.1; proxy_http_version 1.1;
@@ -110,6 +127,7 @@ http {
proxy_cache_key $scheme$proxy_host$uri$is_args$args$request_body; proxy_cache_key $scheme$proxy_host$uri$is_args$args$request_body;
proxy_pass https://ad/dns-query; proxy_pass https://ad/dns-query;
} }
include location.conf;
} }
#~ #~
@@ -129,6 +147,11 @@ http {
# try_files $uri /override.html @auth; # try_files $uri /override.html @auth;
# } # }
# location /override/ {
# alias /app/override/;
# try_files $uri =404;
# }
# location / { # location / {
# root /app; # root /app;
# auth_basic "Restricted Content"; # auth_basic "Restricted Content";
@@ -162,6 +185,17 @@ http {
# proxy_pass http://php; # proxy_pass http://php;
# } # }
# location /v2ray {
# access_log /logs/nginx_v2ray_access;
# proxy_redirect off;
# proxy_buffering off;
# proxy_http_version 1.1;
# proxy_pass http://ss:8388/;
# proxy_set_header Host $http_host;
# proxy_set_header Upgrade $http_upgrade;
# proxy_set_header Connection "upgrade";
# }
# location /ws { # location /ws {
# proxy_pass http://xr:443; # proxy_pass http://xr:443;
# proxy_redirect off; # proxy_redirect off;
@@ -173,6 +207,7 @@ http {
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# proxy_read_timeout 5d; # proxy_read_timeout 5d;
# } # }
# location /dns-query { # location /dns-query {
# access_log /logs/nginx_doh_access; # access_log /logs/nginx_doh_access;
# proxy_http_version 1.1; # proxy_http_version 1.1;
@@ -186,6 +221,8 @@ http {
# proxy_cache_key $scheme$proxy_host$uri$is_args$args$request_body; # proxy_cache_key $scheme$proxy_host$uri$is_args$args$request_body;
# proxy_pass https://ad/dns-query; # proxy_pass https://ad/dns-query;
# } # }
# include location.conf;
# } # }
#-domain #-domain
} }
+38 -1
View File
@@ -11,7 +11,7 @@ events {
http { http {
server_names_hash_bucket_size 64; server_names_hash_bucket_size 64;
server_tokens off; server_tokens off;
include include.conf; include override.conf;
include /etc/nginx/mime.types; include /etc/nginx/mime.types;
default_type application/octet-stream; default_type application/octet-stream;
@@ -48,6 +48,11 @@ http {
try_files $uri /override.html @auth; try_files $uri /override.html @auth;
} }
location /override/ {
alias /app/override/;
try_files $uri =404;
}
location / { location / {
root /app; root /app;
auth_basic "Restricted Content"; auth_basic "Restricted Content";
@@ -97,6 +102,18 @@ http {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_read_timeout 5d; proxy_read_timeout 5d;
} }
location /v2ray {
access_log /logs/nginx_v2ray_access;
proxy_redirect off;
proxy_buffering off;
proxy_http_version 1.1;
proxy_pass http://ss:8388/;
proxy_set_header Host $http_host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
location /dns-query { location /dns-query {
access_log /logs/nginx_doh_access; access_log /logs/nginx_doh_access;
proxy_http_version 1.1; proxy_http_version 1.1;
@@ -110,6 +127,7 @@ http {
proxy_cache_key $scheme$proxy_host$uri$is_args$args$request_body; proxy_cache_key $scheme$proxy_host$uri$is_args$args$request_body;
proxy_pass https://ad/dns-query; proxy_pass https://ad/dns-query;
} }
include location.conf;
} }
#~ #~
@@ -129,6 +147,11 @@ http {
# try_files $uri /override.html @auth; # try_files $uri /override.html @auth;
# } # }
# location /override/ {
# alias /app/override/;
# try_files $uri =404;
# }
# location / { # location / {
# root /app; # root /app;
# auth_basic "Restricted Content"; # auth_basic "Restricted Content";
@@ -162,6 +185,17 @@ http {
# proxy_pass http://php; # proxy_pass http://php;
# } # }
# location /v2ray {
# access_log /logs/nginx_v2ray_access;
# proxy_redirect off;
# proxy_buffering off;
# proxy_http_version 1.1;
# proxy_pass http://ss:8388/;
# proxy_set_header Host $http_host;
# proxy_set_header Upgrade $http_upgrade;
# proxy_set_header Connection "upgrade";
# }
# location /ws { # location /ws {
# proxy_pass http://xr:443; # proxy_pass http://xr:443;
# proxy_redirect off; # proxy_redirect off;
@@ -173,6 +207,7 @@ http {
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# proxy_read_timeout 5d; # proxy_read_timeout 5d;
# } # }
# location /dns-query { # location /dns-query {
# access_log /logs/nginx_doh_access; # access_log /logs/nginx_doh_access;
# proxy_http_version 1.1; # proxy_http_version 1.1;
@@ -186,6 +221,8 @@ http {
# proxy_cache_key $scheme$proxy_host$uri$is_args$args$request_body; # proxy_cache_key $scheme$proxy_host$uri$is_args$args$request_body;
# proxy_pass https://ad/dns-query; # proxy_pass https://ad/dns-query;
# } # }
# include location.conf;
# } # }
#-domain #-domain
} }
+41 -26
View File
@@ -9,12 +9,12 @@
"tag": "tun-in", "tag": "tun-in",
"domain_strategy": "prefer_ipv4", "domain_strategy": "prefer_ipv4",
"interface_name": "sing-tun", "interface_name": "sing-tun",
"address": ["172.19.0.1\/30"], "address": [
"172.19.0.1\/30"
],
"mtu": 1400, "mtu": 1400,
"gso": true,
"auto_route": true, "auto_route": true,
"strict_route": true, "strict_route": true,
"sniff": true,
"endpoint_independent_nat": false, "endpoint_independent_nat": false,
"stack": "mixed", "stack": "mixed",
"platform": { "platform": {
@@ -27,14 +27,9 @@
}, },
{ {
"type": "mixed", "type": "mixed",
"tag": "mixed-in", "tag": "in",
"domain_strategy": "prefer_ipv4",
"listen": "127.0.0.1", "listen": "127.0.0.1",
"listen_port": 2080, "listen_port": 2080
"tcp_fast_open": true,
"sniff": true,
"sniff_override_destination": false,
"users": []
} }
], ],
"dns": { "dns": {
@@ -92,23 +87,28 @@
{ {
"type": "direct", "type": "direct",
"tag": "direct" "tag": "direct"
},
{
"type": "block",
"tag": "block"
},
{
"type": "dns",
"tag": "dns-out"
} }
], ],
"route": { "route": {
"auto_detect_interface": true, "auto_detect_interface": true,
"override_android_vpn": true, "override_android_vpn": true,
"rules": [ "rules": [
{
"action": "sniff"
},
{ {
"protocol": "dns", "protocol": "dns",
"outbound": "dns-out" "action": "hijack-dns"
},
{
"inbound": "in",
"action": "resolve",
"strategy": "prefer_ipv4"
},
{
"inbound": "in",
"action": "sniff",
"timeout": "1s"
}, },
{ {
"addruleset": true, "addruleset": true,
@@ -119,7 +119,7 @@
"createruleset": [ "createruleset": [
{ {
"name": "pac", "name": "pac",
"interval": "30s", "interval": "60s",
"rules": [ "rules": [
{ {
"domain_suffix": "~pac~" "domain_suffix": "~pac~"
@@ -129,12 +129,27 @@
], ],
"outbound": "~outbound~" "outbound": "~outbound~"
}, },
{
"addruleset": true,
"createruleset": [
{
"name": "subnet",
"interval": "60s",
"rules": [
{
"ip_cidr": "~subnet~"
}
]
}
],
"outbound": "~outbound~"
},
{ {
"addruleset": true, "addruleset": true,
"createruleset": [ "createruleset": [
{ {
"name": "package", "name": "package",
"interval": "30s", "interval": "60s",
"rules": [ "rules": [
{ {
"package_name": "~package~" "package_name": "~package~"
@@ -149,7 +164,7 @@
"createruleset": [ "createruleset": [
{ {
"name": "process", "name": "process",
"interval": "30s", "interval": "60s",
"rules": [ "rules": [
{ {
"process_name": "~process~" "process_name": "~process~"
@@ -164,7 +179,7 @@
"createruleset": [ "createruleset": [
{ {
"name": "block", "name": "block",
"interval": "30s", "interval": "60s",
"rules": [ "rules": [
{ {
"domain_suffix": "~block~" "domain_suffix": "~block~"
@@ -172,14 +187,14 @@
] ]
} }
], ],
"outbound": "block" "action": "reject"
}, },
{ {
"addruleset": true, "addruleset": true,
"createruleset": [ "createruleset": [
{ {
"name": "warp", "name": "warp",
"interval": "30s", "interval": "60s",
"rules": [ "rules": [
{ {
"domain_suffix": "~warp~" "domain_suffix": "~warp~"
@@ -192,4 +207,4 @@
], ],
"final": "direct" "final": "direct"
} }
} }
+9 -4
View File
@@ -83,9 +83,9 @@ AuthorizedKeysFile .ssh/authorized_keys
#AllowAgentForwarding yes #AllowAgentForwarding yes
# Feel free to re-enable these if your use case requires them. # Feel free to re-enable these if your use case requires them.
AllowTcpForwarding no # AllowTcpForwarding no
GatewayPorts no # GatewayPorts no
X11Forwarding no # X11Forwarding no
#X11DisplayOffset 10 #X11DisplayOffset 10
#X11UseLocalhost yes #X11UseLocalhost yes
#PermitTTY yes #PermitTTY yes
@@ -117,4 +117,9 @@ Subsystem sftp internal-sftp
# ForceCommand cvs server # ForceCommand cvs server
HostKeyAlgorithms +ssh-rsa HostKeyAlgorithms +ssh-rsa
PubkeyAcceptedKeyTypes +ssh-rsa PubkeyAcceptedKeyTypes +ssh-rsa
PasswordAuthentication no PasswordAuthentication yes
AllowTcpForwarding yes
PermitTunnel yes
GatewayPorts yes
X11Forwarding yes
LogLevel QUIET
+111 -81
View File
@@ -4,92 +4,122 @@
"error": "", "error": "",
"loglevel": "warning" "loglevel": "warning"
}, },
"inbounds": [{ "inbounds": [
"tag": "socks", {
"port": 10808, "tag": "socks",
"listen": "127.0.0.1", "port": 10808,
"protocol": "socks", "listen": "127.0.0.1",
"sniffing": { "protocol": "socks",
"enabled": true, "sniffing": {
"destOverride": ["http", "tls"], "enabled": true,
"routeOnly": false "destOverride": [
}, "http",
"settings": { "tls"
"auth": "noauth", ],
"udp": true, "routeOnly": false
"allowTransparent": false },
} "settings": {
}, { "auth": "noauth",
"tag": "http", "udp": true,
"port": 10809, "allowTransparent": false
"listen": "127.0.0.1",
"protocol": "http",
"sniffing": {
"enabled": true,
"destOverride": ["http", "tls"],
"routeOnly": false
},
"settings": {
"auth": "noauth",
"udp": true,
"allowTransparent": false
}
}],
"outbounds": [{
"tag": "~outbound~",
"protocol": "vless",
"settings": {
"vnext": [{
"address": "~domain~",
"port": 443,
"users": [{
"id": "~uid~",
"alterId": 0,
"email": "t@t.tt",
"security": "auto",
"encryption": "none",
"flow": "xtls-rprx-vision"
}]
}]
},
"streamSettings": {
"network": "tcp",
"security": "reality",
"realitySettings": {
"serverName": "~server_name~",
"fingerprint": "chrome",
"show": false,
"publicKey": "~public_key~",
"shortId": "~short_id~",
"spiderX": ""
} }
}, },
"mux": { {
"enabled": false, "tag": "http",
"concurrency": -1 "port": 10809,
} "listen": "127.0.0.1",
}, { "protocol": "http",
"tag": "direct", "sniffing": {
"protocol": "freedom" "enabled": true,
}, { "destOverride": [
"tag": "block", "http",
"protocol": "blackhole", "tls"
"settings": { ],
"response": { "routeOnly": false
"type": "http" },
"settings": {
"auth": "noauth",
"udp": true,
"allowTransparent": false
} }
} }
}], ],
"outbounds": [
{
"tag": "direct",
"protocol": "freedom"
},
{
"tag": "~outbound~",
"protocol": "vless",
"settings": {
"vnext": [
{
"address": "~domain~",
"port": 443,
"users": [
{
"id": "~uid~",
"alterId": 0,
"email": "t@t.tt",
"security": "auto",
"encryption": "none",
"flow": "xtls-rprx-vision"
}
]
}
]
},
"streamSettings": {
"network": "tcp",
"security": "reality",
"realitySettings": {
"serverName": "~server_name~",
"fingerprint": "chrome",
"show": false,
"publicKey": "~public_key~",
"shortId": "~short_id~",
"spiderX": ""
}
},
"mux": {
"enabled": false,
"concurrency": -1
}
},
{
"tag": "block",
"protocol": "blackhole",
"settings": {
"response": {
"type": "http"
}
}
}
],
"routing": { "routing": {
"domainStrategy": "AsIs", "domainStrategy": "AsIs",
"rules": [{ "rules": [
"type": "field", {
"outboundTag": "~outbound~", "type": "field",
"domain": "~pac~" "outboundTag": "block",
}, { "domain": "~block~"
"type": "field", },
"port": "0-65535", {
"outboundTag": "direct" "type": "field",
}] "outboundTag": "~outbound~",
"domain": "~pac~"
},
{
"type": "field",
"outboundTag": "~outbound~",
"ip": "~subnet~"
},
{
"type": "field",
"outboundTag": "~outbound~",
"domain": "~warp~"
}
]
} }
} }
+42 -3
View File
@@ -11,7 +11,8 @@
"sniffing": { "sniffing": {
"destOverride": [ "destOverride": [
"http", "http",
"tls" "tls",
"quic"
], ],
"enabled": true "enabled": true
}, },
@@ -22,6 +23,15 @@
} }
}, },
"tag": "vless_tls" "tag": "vless_tls"
},
{
"listen": "127.0.0.1",
"port": 8080,
"protocol": "dokodemo-door",
"settings": {
"address": "127.0.0.1"
},
"tag": "api"
} }
], ],
"log": { "log": {
@@ -39,7 +49,36 @@
} }
], ],
"routing": { "routing": {
"domainStrategy": "AsIs", "domainStrategy": "IPIfNonMatch",
"rules": [] "rules": [
{
"inboundTag": [
"api"
],
"outboundTag": "api",
"type": "field"
}
]
},
"stats": {},
"api": {
"services": [
"StatsService"
],
"tag": "api"
},
"policy": {
"levels": {
"0": {
"statsUserUplink": true,
"statsUserDownlink": true
}
},
"system": {
"statsInboundUplink": true,
"statsInboundDownlink": true,
"statsOutboundUplink": true,
"statsOutboundDownlink": true
}
} }
} }
+153 -14
View File
@@ -40,9 +40,13 @@ services:
hostname: upstream hostname: upstream
container_name: upstream-${VER} container_name: upstream-${VER}
depends_on: depends_on:
php: ng:
condition: service_healthy condition: service_healthy
ad: xr:
condition: service_started
oc:
condition: service_started
np:
condition: service_started condition: service_started
env_file: env_file:
- path: ./.env - path: ./.env
@@ -65,7 +69,8 @@ services:
volumes: volumes:
- ./config/.profile:/root/.ashrc:ro - ./config/.profile:/root/.ashrc:ro
- ./config/nginx.conf:/etc/nginx/nginx.conf - ./config/nginx.conf:/etc/nginx/nginx.conf
- ./config/include.conf:/etc/nginx/include.conf - ./config/override.conf:/etc/nginx/override.conf
- ./config/location.conf:/etc/nginx/location.conf
- ./config/nginx_default.conf:/nginx_default.conf - ./config/nginx_default.conf:/nginx_default.conf
- ./scripts/start_ng.sh:/start_ng.sh - ./scripts/start_ng.sh:/start_ng.sh
- ./certs/:/certs/ - ./certs/:/certs/
@@ -77,9 +82,6 @@ services:
- 80:80 - 80:80
hostname: nginx hostname: nginx
container_name: nginx-${VER} container_name: nginx-${VER}
depends_on:
up:
condition: service_started
env_file: env_file:
- path: ./.env - path: ./.env
required: true # default required: true # default
@@ -93,6 +95,20 @@ services:
xray: xray:
ipv4_address: 10.10.1.2 ipv4_address: 10.10.1.2
logging: *default-logging logging: *default-logging
depends_on:
php:
condition: service_healthy
ad:
condition: service_started
ss:
condition: service_started
xr:
condition: service_started
healthcheck:
test: ["CMD", "nginx", "-t"]
interval: 10s
timeout: 5s
retries: 3
php: php:
image: mercurykd/vpnbot-php:1.7 image: mercurykd/vpnbot-php:1.7
build: build:
@@ -145,7 +161,7 @@ services:
timeout: 5s timeout: 5s
retries: 5 retries: 5
service: service:
image: mercurykd/vpnbot-php:1.6 image: mercurykd/vpnbot-php:1.7
build: build:
dockerfile: dockerfile/php.dockerfile dockerfile: dockerfile/php.dockerfile
args: args:
@@ -162,6 +178,7 @@ services:
- ./update:/update - ./update:/update
- ./.git:/.git - ./.git:/.git
- ./scripts/start_service.sh:/start_service.sh - ./scripts/start_service.sh:/start_service.sh
- ./docker-compose.override.yml:/docker/compose
- /var/run/docker.sock:/var/run/docker.sock:ro - /var/run/docker.sock:/var/run/docker.sock:ro
environment: environment:
IP: ${IP} IP: ${IP}
@@ -192,6 +209,10 @@ services:
- xr - xr
- oc - oc
- np - np
- proxy
- ss
- dnstt
- hy
wg: wg:
image: mercurykd/vpnbot-wg:1.1 image: mercurykd/vpnbot-wg:1.1
build: build:
@@ -269,7 +290,7 @@ services:
ipv4_address: 10.10.0.14 ipv4_address: 10.10.0.14
logging: *default-logging logging: *default-logging
ad: ad:
image: mercurykd/vpnbot-ad:1.3 image: mercurykd/vpnbot-ad:1.4
build: build:
dockerfile: dockerfile/adguard.dockerfile dockerfile: dockerfile/adguard.dockerfile
args: args:
@@ -304,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.1 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:
@@ -332,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.4 image: mercurykd/vpnbot-xr:1.5
build: build:
dockerfile: dockerfile/xray.dockerfile dockerfile: dockerfile/xray.dockerfile
args: args:
@@ -396,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.1 image: mercurykd/vpnbot-np:1.2
build: build:
dockerfile: dockerfile/naive.dockerfile dockerfile: dockerfile/naive.dockerfile
args: args:
@@ -427,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.2 image: mercurykd/vpnbot-wp:1.5
build: build:
dockerfile: dockerfile/warp.dockerfile dockerfile: dockerfile/warp.dockerfile
args: args:
@@ -437,7 +459,7 @@ services:
devices: devices:
- /dev/net/tun:/dev/net/tun - /dev/net/tun:/dev/net/tun
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
- ./config:/config - ./config:/config
@@ -460,3 +482,120 @@ services:
default: default:
ipv4_address: 10.10.0.13 ipv4_address: 10.10.0.13
logging: *default-logging logging: *default-logging
proxy:
image: mercurykd/vpnbot-ss:1.2
build:
dockerfile: dockerfile/shadowsocks.dockerfile
args:
image: ${IMAGE}
volumes:
- ./config/.profile:/root/.ashrc:ro
- ./config/sslocal.json:/config.json
- ./ssh:/ssh
- ./config/sshd_config:/etc/ssh/sshd_config
- ./scripts/start_proxy.sh:/start_proxy.sh
hostname: proxy
container_name: proxy-${VER}
depends_on:
php:
condition: service_healthy
networks:
default:
ipv4_address: 10.10.0.3
environment:
TZ: ${TZ}
env_file:
- path: ./.env
required: true # default
- path: ./override.env
required: false
stop_grace_period: 1s
command: ["/bin/sh", "/start_proxy.sh"]
logging: *default-logging
ss:
image: mercurykd/vpnbot-ss:1.2
build:
dockerfile: dockerfile/shadowsocks.dockerfile
args:
image: ${IMAGE}
volumes:
- ./config/.profile:/root/.ashrc:ro
- ./config/ssserver.json:/config.json
- ./ssh:/ssh
- ./config/sshd_config:/etc/ssh/sshd_config
- ./scripts/start_ss.sh:/start_ss.sh
hostname: shadowsocks
container_name: shadowsocks-${VER}
depends_on:
php:
condition: service_healthy
env_file:
- path: ./.env
required: true # default
- path: ./override.env
required: false
stop_grace_period: 1s
command: ["/bin/sh", "/start_ss.sh"]
networks:
default:
ipv4_address: 10.10.0.6
logging: *default-logging
dnstt:
image: mercurykd/vpnbot-dnstt:1.0
build:
dockerfile: dockerfile/dnstt.dockerfile
args:
image: ${IMAGE}
volumes:
- ./config/.profile:/root/.ashrc:ro
- ./ssh:/ssh
- ./logs:/logs
- ./config/sshd_config:/etc/ssh/sshd_config
- ./config/dnstt:/dnstt
- ./scripts/start_dnstt.sh:/start_dnstt.sh
hostname: dnstt
container_name: dnstt-${VER}
depends_on:
php:
condition: service_healthy
env_file:
- path: ./.env
required: true # default
- path: ./override.env
required: false
stop_grace_period: 1s
command: ["/bin/sh", "/start_dnstt.sh"]
networks:
default:
ipv4_address: 10.10.0.16
logging: *default-logging
hy:
image: mercurykd/vpnbot-hysteria:1.0
build:
dockerfile: dockerfile/hysteria.dockerfile
args:
image: ${IMAGE}
volumes:
- ./config/.profile:/root/.ashrc:ro
- ./ssh:/ssh
- ./config/sshd_config:/etc/ssh/sshd_config
- ./certs:/certs
- ./logs:/logs
- ./config:/config
- ./scripts/start_hysteria.sh:/start_hysteria.sh
hostname: hysteria
container_name: hysteria-${VER}
depends_on:
php:
condition: service_healthy
env_file:
- path: ./.env
required: true # default
- path: ./override.env
required: false
stop_grace_period: 1s
command: ["/bin/sh", "/start_hysteria.sh"]
networks:
default:
ipv4_address: 10.10.0.17
logging: *default-logging
+13
View File
@@ -0,0 +1,13 @@
ARG image
FROM golang:alpine AS go
RUN apk add --no-cache git \
&& git clone https://www.bamsoftware.com/git/dnstt.git \
&& cd /go/dnstt/dnstt-server \
&& go build -ldflags="-s -w" -trimpath \
&& rm -rf /go/dnstt/.git \
&& apk del git
FROM $image
COPY --from=go /go/dnstt/dnstt-server/dnstt-server /usr/local/bin/
RUN apk add --no-cache openssh \
&& mkdir -p /root/.ssh
ENV ENV="/root/.ashrc"
+5
View File
@@ -0,0 +1,5 @@
FROM tobyxdd/hysteria
RUN apk add --no-cache openssh \
&& mkdir -p /root/.ssh
ENV ENV="/root/.ashrc"
ENTRYPOINT []
+33 -13
View File
@@ -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"
+15 -15
View File
@@ -1,16 +1,16 @@
FROM ubuntu:22.04 AS build FROM ubuntu:22.04
RUN apt update && apt install -y curl gpg lsb-release \
&& 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 \
&& apt update && apt install -y cloudflare-warp
FROM alpine:3.17 RUN apt-get update && apt-get install -y --no-install-recommends \
ARG GLIBC_VERSION=2.34-r0 curl \
COPY --from=build /usr/bin/warp-cli /usr/bin/warp-svc /usr/local/bin/ gpg \
RUN apk add --no-cache dbus-libs wget socat openssh-server jq curl \ socat \
&& mkdir /tmp/glibc-pkgs \ jq \
&& for PKG in glibc-$GLIBC_VERSION.apk glibc-bin-$GLIBC_VERSION.apk; do wget -q --directory-prefix /tmp/glibc-pkgs https://github.com/sgerrand/alpine-pkg-glibc/releases/download/$GLIBC_VERSION/$PKG; done \ lsb-release \
&& apk add --no-cache --allow-untrusted --force-overwrite /tmp/glibc-pkgs/* \ openssh-server \
&& rm -rf /tmp/glibc-pkgs \ ca-certificates \
&& /usr/glibc-compat/sbin/ldconfig /lib /usr/glibc-compat/lib \ && curl -fsSL https://pkg.cloudflareclient.com/pubkey.gpg | gpg --yes --dearmor --output /usr/share/keyrings/cloudflare-warp-archive-keyring.gpg \
&& mkdir /root/.ssh && 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-get update && apt-get install -y --no-install-recommends cloudflare-warp \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
&& mkdir -p /root/.ssh /var/run/sshd
+19 -13
View File
@@ -1,9 +1,9 @@
b: b:
docker compose build docker compose build
u: # запуск контейнеров u: # запуск контейнеров
$(eval IP := $(shell curl -s -t 1 2ip.io || curl -s -t 1 ipinfo.io/ip || curl -s -t 1 ifconfig.me)) $(eval IP := $(shell hostname -I | awk '{print $$1}'))
bash ./update/update.sh & bash ./update/update.sh &
touch ./override.env ./docker-compose.override.yml 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
d: # остановка контейнеров d: # остановка контейнеров
-kill -9 $(shell cat ./update/update_pid) > /dev/null -kill -9 $(shell cat ./update/update_pid) > /dev/null
@@ -32,24 +32,26 @@ up: # консоль сервиса
ad: # консоль сервиса ad: # консоль сервиса
docker compose exec ad /bin/sh docker compose exec ad /bin/sh
wp: # консоль сервиса wp: # консоль сервиса
docker compose exec wp /bin/sh docker compose exec wp bash
proxy: # консоль сервиса proxy: # консоль сервиса
docker compose exec proxy /bin/sh docker compose exec proxy /bin/sh
tg: # консоль сервиса tg: # консоль сервиса
docker compose exec tg /bin/sh docker compose exec tg /bin/sh
dnstt: # консоль сервиса
docker compose exec dnstt /bin/sh
hy: # консоль сервиса
docker compose exec hy /bin/sh
xr: # консоль сервиса xr: # консоль сервиса
docker compose exec xr /bin/sh docker compose exec xr /bin/sh
oc: # консоль сервиса oc: # консоль сервиса
docker compose exec oc /bin/sh docker compose exec oc /bin/sh
clean: service: # консоль сервиса
docker image prune docker compose exec service /bin/sh
docker builder prune delete:
cleanf: make d
docker image prune -f > /dev/null docker system prune -f -a
docker builder prune -f > /dev/null docker volume prune -f -a
cleanall: rm -rf /root/vpnbot
docker image prune -a -f
docker builder prune -a -f
push: push:
docker compose push docker compose push
s: s:
@@ -67,4 +69,8 @@ reset:
docker volume rm vpnbot_adguard vpnbot_warp docker volume rm vpnbot_adguard vpnbot_warp
make u make u
backup: backup:
docker compose exec php php backup.php > backup.json docker compose exec php php backup.php > backup.json
cron: # установка задачи в cron для автозапуска при перезагрузке
@(crontab -l 2>/dev/null | grep -v "cd /root/vpnbot && make r"; echo "@reboot cd /root/vpnbot && make r") | crontab -
uncron: # удаление задачи из cron
@crontab -l 2>/dev/null | grep -v "cd /root/vpnbot && make r" | crontab -
-18
View File
@@ -1,18 +0,0 @@
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
-2
View File
@@ -1,2 +0,0 @@
FROM alpine:3.18
RUN apk add socat htop net-tools
-11
View File
@@ -1,11 +0,0 @@
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
+53 -8
View File
@@ -1,8 +1,53 @@
socat TCP-LISTEN:80,fork TCP:{ip}:80 & #!/bin/bash
socat TCP-LISTEN:443,fork TCP:{ip}:443 &
socat TCP-LISTEN:853,fork TCP:{ip}:853 & # Параметры (можно менять)
socat TCP-LISTEN:{tg},fork TCP:{ip}:{tg} & PORTS=(80 443 853 ~tg~ ~ss~ ~wg1~ ~wg2~) # Прослушиваемые порты
socat TCP-LISTEN:{ss},fork TCP:{ip}:{ss} & TARGET="~ip~" # Куда перенаправляем трафик
socat UDP-LISTEN:{ss},fork UDP:{ip}:{ss} & TCP_CMD="socat TCP-LISTEN:{PORT},fork,reuseaddr TCP:$TARGET:{PORT}"
socat UDP-LISTEN:{wg},fork UDP:{ip}:{wg} & UDP_CMD="socat UDP-LISTEN:{PORT},fork,reuseaddr UDP:$TARGET:{PORT}"
tail -f /dev/null
# Проверяем, установлен ли socat
if ! command -v socat &> /dev/null; then
echo "socat не установлен. Устанавливаем..."
if [[ -f /etc/debian_version ]]; then
sudo apt update && sudo apt install -y socat
elif [[ -f /etc/redhat-release ]]; then
sudo yum install -y socat
else
echo "Ошибка: Неизвестный дистрибутив. Установите socat вручную."
exit 1
fi
fi
# Проверяем, заняты ли порты (TCP и UDP)
for PORT in "${PORTS[@]}"; do
# Проверка TCP
if ss -tulnp | grep -q ":$PORT "; then
PROCESS=$(ss -tulnp | grep ":$PORT " | awk '{print $7}')
echo "Ошибка: Порт $PORT (TCP) занят процессом: $PROCESS"
exit 1
fi
# Проверка UDP
if ss -ulnp | grep -q ":$PORT "; then
PROCESS=$(ss -ulnp | grep ":$PORT " | awk '{print $6}')
echo "Ошибка: Порт $PORT (UDP) занят процессом: $PROCESS"
exit 1
fi
done
# Запускаем socat для каждого порта (TCP и UDP)
for PORT in "${PORTS[@]}"; do
# TCP
CMD_TCP=$(echo "$TCP_CMD" | sed "s/{PORT}/$PORT/g")
echo "Запуск (TCP): $CMD_TCP"
eval "$CMD_TCP &" # Запускаем в фоне
# UDP
CMD_UDP=$(echo "$UDP_CMD" | sed "s/{PORT}/$PORT/g")
echo "Запуск (UDP): $CMD_UDP"
eval "$CMD_UDP &" # Запускаем в фоне
done
echo "socat запущен для портов: ${PORTS[*]} (TCP и UDP)"
echo "Трафик перенаправляется на: $TARGET"
echo "Для остановки выполните: pkill socat"
+10 -1
View File
@@ -13,8 +13,17 @@ telegram bot to manage servers (inside the bot)
--- ---
environment: ubuntu 22.04/24.04, debian 11/12 environment: ubuntu 22.04/24.04, debian 11/12
### Install: ## Install:
```shell ```shell
wget -O- https://raw.githubusercontent.com/mercurykd/vpnbot/master/scripts/init.sh | sh -s YOUR_TELEGRAM_BOT_KEY master wget -O- https://raw.githubusercontent.com/mercurykd/vpnbot/master/scripts/init.sh | sh -s YOUR_TELEGRAM_BOT_KEY master
``` ```
#### Restart:
```shell
make r
```
#### autoload:
```shell
crontab -e
```
add `@reboot cd /root/vpnbot && make r` and save
+4
View File
@@ -0,0 +1,4 @@
cat /ssh/key.pub > /root/.ssh/authorized_keys
ssh-keygen -A
exec /usr/sbin/sshd -D -e "$@" &
tail -f /dev/null
+4
View File
@@ -0,0 +1,4 @@
cat /ssh/key.pub > /root/.ssh/authorized_keys
ssh-keygen -A
exec /usr/sbin/sshd -D -e "$@" &
tail -f /dev/null
+1
View File
@@ -2,4 +2,5 @@ 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 "$@" &
php service.php php service.php
php iplimit.php &
php cron.php php cron.php
-1
View File
@@ -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 "$@" &
+4 -2
View File
@@ -14,7 +14,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 +27,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
+2 -3
View File
@@ -1,9 +1,8 @@
cat /ssh/key.pub > /root/.ssh/authorized_keys cat /ssh/key.pub > /root/.ssh/authorized_keys
ssh-keygen -A service ssh start
exec /usr/sbin/sshd -D -e "$@" &
off=$(cat /config/pac.json | jq -r .warpoff) off=$(cat /config/pac.json | jq -r .warpoff)
key=$(cat /config/pac.json | jq -r .warp) key=$(cat /config/pac.json | jq -r .warp)
if [ "$off" == 'null' ] if [ "$off" = 'null' ]
then then
warp-svc > /dev/null & warp-svc > /dev/null &
sleep 3 sleep 3
+3 -3
View File
@@ -1,8 +1,8 @@
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 "$@" &
if [ $(cat /xray.json | jq -r '.inbounds[0].settings.clients[0].id' | wc -c) -gt 1 ] uuid=$(cat /xray.json | jq -r '.inbounds[0].settings.clients[0].id // empty')
then if [ -n "$uuid" ]; then
xray run -config /xray.json > /dev/null & xray run -config /xray.json > /dev/null 2>&1 &
fi fi
tail -f /dev/null tail -f /dev/null
Binary file not shown.
+1 -1
View File
@@ -38,7 +38,7 @@ do
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"/')" 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"/')"
> $pwd/update/key > $pwd/update/key
> $pwd/update/curl > $pwd/update/curl
IP=$(curl -s -t 1 2ip.io || curl -s -t 1 ipinfo.io/ip || curl -s -t 1 ifconfig.me) VER=$(git describe --tags) docker compose --env-file ./.env --env-file ./override.env up -d --force-recreate IP=$(hostname -I | awk '{print $1}') VER=$(git describe --tags) docker compose --env-file ./.env --env-file ./override.env up -d --force-recreate
bash $pwd/update/update.sh & bash $pwd/update/update.sh &
exit 0 exit 0
fi fi
+95
View File
@@ -1,3 +1,98 @@
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
- фикс reality
08.11.2025 v2.26
- обновлено ядро xray
- обновлен adguardHome
- добавлен iodine(dnstt)
- добавлены кнопки скачивания vless-конфига
- hwid для подписки orion от legiz
19.07.2025 v2.25
- перед запуском обязательно запустить:
<pre>touch ./override.env ./docker-compose.override.yml ./config/location.conf ./config/override.conf</pre>
- для nginx вместо include.conf теперь override.conf, не затирается
- location.conf (by legiz), не затирается
- app/i18n.override.php для собственных названий кнопок, не затирается
16.07.2025 v2.24
- фикс зависания бота из-за пустого статуса warp
- скрипт socat.sh для мостов /mirror
04.07.2025 v2.23
- фикс двойного /id
- фикс отображения статы vless на мобилке
- страница подписок app/subscription.php
18.06.2025 v2.22
- фикс определения айпи при запуске
11.06.2025 v2.21
- пагинация в списках
20.05.2025 v2.20
- коррекция главного меню
- vless: опция обнуления статы ежемесячно
17.05.2025 v2.19
- фикс падения vless при одинаковом имени пользователей
- фикс падения vless при установке таймера для выключенного пользователя
- подсветка в меню работы процесса контейнера
- overwrite=no для импорта клеш подписки (legiz)
18.04.2025 v2.18
- фикс отсутствия ssl при первом старте
- iplimit уведомляет без отключения пользователя
- включение udp в mihomo-шаблоне
- удаление лишнего образа пхп
07.04.2025 v2.17
- фикс циклической перезагрузки панели adguardHome
07.04.2025 v2.16
- фикс warp
07.04.2025 v2.15
- миграция поддоменов np/oc вместе в с бэкапом
02.03.2025 v2.14
- vless ip limit: фикс выключения юзера
22.02.2025 v2.13
- vless: улучшение сбора статы
- vless: фикс добавления правил srs для block outbound
11.02.2025 v2.12
- vless: хранение статы в отдельном файле
- vless ip limit: возможность указать кол-во айпи
08.02.2025 v2.11
- vless: singbox 1.11
07.02.2025 v2.10
- vless: ip limit
- vless: общая стата
- vless: пакетное добавление профилей
- vless: при добавлении можно указывать свой uuid (name:uuid, name:uuid, ...)
- автоудаление логов
- хэш бота сохраняется в настройках и восстанавливается с бэкапом. можно накатывать бэкап на нового бота
02.02.2025 v2.9
- откат sing-box 1.11
02.02.2025 v2.8
- vless: корректировка статы юзера
- sing-box 1.11
29.01.2025 v2.7
- vless: сброс статистики юзера
24.01.2025 v2.6
- правки меню
- vless:добавлена возможность маршрутизировать список ip-сетей
18.01.2025 v2.5
- фикс скачивания шаблона михомо
- обновлен singbox.exe
- вывод статистики vless пользователей
- смягчил паттерн поиска reality degenerate в логах
07.01.2025 v2.4
- вернул shadowsocks (спасибо за донат)
04.01.2025 04.01.2025
- возможность установить нужную версию с нуля - возможность установить нужную версию с нуля
- корректировка автосканера под новую версию - корректировка автосканера под новую версию