Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 09a0f77863 | |||
| 8c65f8e538 | |||
| 32e49088c2 | |||
| f666762dfa | |||
| a1778e6be8 | |||
| 4b61e38b6b | |||
| 270968e4ac | |||
| 3349e3b306 | |||
| 3e53000065 | |||
| 18ceb51f4e |
+44
-10
@@ -2554,6 +2554,7 @@ DNS-over-HTTPS with IP:
|
||||
$this->stopAd();
|
||||
$c = yaml_parse_file($this->adguard);
|
||||
unset($c['dns']['upstream_dns'][$k]);
|
||||
$c['dns']['upstream_dns'] = array_values($c['dns']['upstream_dns']);
|
||||
yaml_emit_file($this->adguard, $c);
|
||||
$this->startAd();
|
||||
$this->menu('adguard');
|
||||
@@ -6138,9 +6139,9 @@ DNS-over-HTTPS with IP:
|
||||
}
|
||||
break;
|
||||
case 'cl':
|
||||
$c = $this->clashRuleSet($c);
|
||||
$c = $this->addClashRuleSet($c);
|
||||
if (!empty($c['rules'])) {
|
||||
$c['rules'] = $this->clashRules($c['rules']);
|
||||
$c = $this->clashRules($c, $uid, $domain);
|
||||
if (count($c['rules']) == 1) {
|
||||
unset($c['rules']);
|
||||
}
|
||||
@@ -6158,7 +6159,7 @@ DNS-over-HTTPS with IP:
|
||||
echo json_encode($c);
|
||||
}
|
||||
|
||||
public function clashRuleSet($c)
|
||||
public function addClashRuleSet($c)
|
||||
{
|
||||
$p = $this->getPacConf();
|
||||
if (!empty($p['rulessetlist']) && $c['add-rule-providers']) {
|
||||
@@ -6198,20 +6199,53 @@ DNS-over-HTTPS with IP:
|
||||
return $c;
|
||||
}
|
||||
|
||||
public function clashRules($rules)
|
||||
public function clashRules($c, $uid, $domain)
|
||||
{
|
||||
foreach ($rules as $v) {
|
||||
if (isset($v['list'])) {
|
||||
if (!empty($v['list'])) {
|
||||
foreach ($v['list'] as $j) {
|
||||
$tmp[] = "{$v['type']}, $j, {$v['action']}";
|
||||
$scheme = empty($this->nginxGetTypeCert()) ? 'http' : 'https';
|
||||
$hash = substr(md5($this->key), 0, 8);
|
||||
foreach ($c['rules'] as $v) {
|
||||
if (array_key_exists('list', $v)) {
|
||||
if ($v['type'] == 'RULE-SET') {
|
||||
if (!empty($_GET['r']) && $v['name'] == $_GET['r']) {
|
||||
header("Content-Disposition: attachment; filename={$v['name']}.yaml");
|
||||
header('Content-Type: text/yaml');
|
||||
switch ($v['behavior']) {
|
||||
case 'domain':
|
||||
echo yaml_emit(['payload' => array_map(fn($e) => "+.$e", $v['list'])]);
|
||||
break;
|
||||
|
||||
default:
|
||||
echo yaml_emit(['payload' => array_map(fn($e) => "PROCESS-NAME,$e", $v['list'])]);
|
||||
break;
|
||||
}
|
||||
exit;
|
||||
}
|
||||
$c['rule-providers'][$v['name']] = [
|
||||
'type' => 'http',
|
||||
'url' => "$scheme://{$domain}/pac/" . base64_encode(serialize([
|
||||
'h' => $hash,
|
||||
't' => 'cl',
|
||||
's' => $uid,
|
||||
'r' => $v['name'],
|
||||
])),
|
||||
'interval' => $v['interval'],
|
||||
'behavior' => $v['behavior'],
|
||||
'format' => 'yaml',
|
||||
];
|
||||
$tmp[] = "{$v['type']}, {$v['name']}, {$v['action']}";
|
||||
} else {
|
||||
if (!empty($v['list'])) {
|
||||
foreach ($v['list'] as $j) {
|
||||
$tmp[] = "{$v['type']}, $j, {$v['action']}";
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$tmp[] = implode(', ', $v);
|
||||
}
|
||||
}
|
||||
return $tmp;
|
||||
$c['rules'] = $tmp;
|
||||
return $c;
|
||||
}
|
||||
|
||||
public function replaceTags($subject, $tags)
|
||||
|
||||
+26
-11
@@ -6,7 +6,7 @@
|
||||
"find-process-mode": "strict",
|
||||
"global-client-fingerprint": "chrome",
|
||||
"mode": "rule",
|
||||
"log-level": "debug",
|
||||
"log-level": "info",
|
||||
"ipv6": false,
|
||||
"keep-alive-interval": 30,
|
||||
"unified-delay": false,
|
||||
@@ -94,29 +94,44 @@
|
||||
"rule-providers": {},
|
||||
"rules": [
|
||||
{
|
||||
"type": "DOMAIN-SUFFIX",
|
||||
"type": "RULE-SET",
|
||||
"list": "~block~",
|
||||
"action": "REJECT"
|
||||
"action": "REJECT",
|
||||
"interval": 30,
|
||||
"behavior": "domain",
|
||||
"name": "block"
|
||||
},
|
||||
{
|
||||
"type": "PROCESS-NAME",
|
||||
"type": "RULE-SET",
|
||||
"list": "~process~",
|
||||
"action": "PROXY"
|
||||
"action": "PROXY",
|
||||
"interval": 30,
|
||||
"behavior": "classical",
|
||||
"name": "process"
|
||||
},
|
||||
{
|
||||
"type": "PROCESS-NAME",
|
||||
"type": "RULE-SET",
|
||||
"list": "~package~",
|
||||
"action": "PROXY"
|
||||
"action": "PROXY",
|
||||
"interval": 30,
|
||||
"behavior": "classical",
|
||||
"name": "package"
|
||||
},
|
||||
{
|
||||
"type": "DOMAIN-SUFFIX",
|
||||
"type": "RULE-SET",
|
||||
"list": "~warp~",
|
||||
"action": "PROXY"
|
||||
"action": "PROXY",
|
||||
"interval": 30,
|
||||
"behavior": "domain",
|
||||
"name": "warp"
|
||||
},
|
||||
{
|
||||
"type": "DOMAIN-SUFFIX",
|
||||
"type": "RULE-SET",
|
||||
"list": "~pac~",
|
||||
"action": "PROXY"
|
||||
"action": "PROXY",
|
||||
"interval": 30,
|
||||
"behavior": "domain",
|
||||
"name": "pac"
|
||||
},
|
||||
{
|
||||
"type": "MATCH",
|
||||
|
||||
+3
-3
@@ -96,7 +96,7 @@ services:
|
||||
ipv4_address: 10.10.1.2
|
||||
logging: *default-logging
|
||||
php:
|
||||
image: mercurykd/vpnbot-php:1.6
|
||||
image: mercurykd/vpnbot-php:1.7
|
||||
build:
|
||||
dockerfile: dockerfile/php.dockerfile
|
||||
args:
|
||||
@@ -307,7 +307,7 @@ services:
|
||||
ipv4_address: 10.10.0.14
|
||||
logging: *default-logging
|
||||
ad:
|
||||
image: mercurykd/vpnbot-ad:1.2
|
||||
image: mercurykd/vpnbot-ad:1.3
|
||||
build:
|
||||
dockerfile: dockerfile/adguard.dockerfile
|
||||
args:
|
||||
@@ -405,7 +405,7 @@ services:
|
||||
ipv4_address: 10.10.0.8
|
||||
logging: *default-logging
|
||||
xr:
|
||||
image: mercurykd/vpnbot-xr:1.3
|
||||
image: mercurykd/vpnbot-xr:1.4
|
||||
build:
|
||||
dockerfile: dockerfile/xray.dockerfile
|
||||
args:
|
||||
|
||||
+12
-11
@@ -22,16 +22,17 @@ RUN apk add --no-cache --update php81 \
|
||||
curl \
|
||||
git \
|
||||
py3-qt5 \
|
||||
&& wget https://github.com/ameshkov/dnslookup/releases/download/v1.9.1/dnslookup-linux-amd64-v1.9.1.tar.gz \
|
||||
&& tar -xf dnslookup-linux-amd64-v1.9.1.tar.gz \
|
||||
&& mkdir /root/.ssh \
|
||||
&& wget https://github.com/ameshkov/dnslookup/releases/download/v1.11.1/dnslookup-linux-amd64-v1.11.1.tar.gz \
|
||||
&& tar -xf dnslookup-linux-amd64-v1.11.1.tar.gz \
|
||||
&& mv linux-amd64/dnslookup /usr/bin \
|
||||
&& rm dnslookup-linux-amd64-v1.9.1.tar.gz \
|
||||
&& rm dnslookup-linux-amd64-v1.11.1.tar.gz \
|
||||
&& rm -rf /linux-amd64 \
|
||||
&& wget https://github.com/SagerNet/sing-box/releases/download/v1.8.11/sing-box-1.8.11-linux-amd64.tar.gz \
|
||||
&& tar -xf sing-box-1.8.11-linux-amd64.tar.gz \
|
||||
&& mv sing-box-1.8.11-linux-amd64/sing-box /usr/bin \
|
||||
&& rm sing-box-1.8.11-linux-amd64.tar.gz \
|
||||
&& rm -rf /sing-box-1.8.11-linux-amd64
|
||||
RUN apk add openssh \
|
||||
&& mkdir /root/.ssh
|
||||
ENV ENV="/root/.ashrc"
|
||||
&& wget https://github.com/SagerNet/sing-box/releases/download/v1.10.3/sing-box-1.10.3-linux-amd64.tar.gz \
|
||||
&& tar -xf sing-box-1.10.3-linux-amd64.tar.gz \
|
||||
&& mv sing-box-1.10.3-linux-amd64/sing-box /usr/bin \
|
||||
&& rm sing-box-1.10.3-linux-amd64.tar.gz \
|
||||
&& rm -rf /sing-box-1.10.3-linux-amd64 \
|
||||
&& wget https://github.com/MetaCubeX/mihomo/releases/download/v1.18.10/mihomo-linux-amd64-v1.18.10.gz \
|
||||
&& gunzip mihomo-linux-amd64-v1.18.10.gz \
|
||||
&& mv mihomo-linux-amd64-v1.18.10 /usr/bin/mihomo
|
||||
@@ -1,28 +1,37 @@
|
||||
telegram bot to manage servers (inside the bot)
|
||||
|
||||
<img src="https://github.com/mercurykd/vpnbot/assets/30900414/d5a81237-5215-41db-87e5-20734120cc9c" width="200">
|
||||
<img src="https://github.com/user-attachments/assets/ec5faa51-987c-461a-a973-d94c7edf7115" width="300">
|
||||
|
||||
### XTLS-Reality
|
||||
### VLESS (Reality OR Websocket)
|
||||
- change secret
|
||||
- qr/config
|
||||
- change fake domain
|
||||
- multiple users
|
||||
- subscriptions with routing
|
||||
- subscriptions with routing (xray, sing-box, mihomo)
|
||||
- routing templates per user
|
||||
- routing via rulesets (sing-box, mihomo)
|
||||
- steal from yourself
|
||||
<img src="https://github.com/mercurykd/vpnbot/assets/30900414/39bdf4e0-96a6-4257-b61e-30a14122e236" width="200">
|
||||
- add domains to warp
|
||||
|
||||
### Main menu VLESS:
|
||||
<img src="https://github.com/user-attachments/assets/80d2f671-fade-4819-a96a-efa253741ffd" width="300">
|
||||
|
||||
### User menu VLESS:
|
||||
<img src="https://github.com/user-attachments/assets/5c3c5b5e-1931-4e98-a472-d303bac61a4e" width="300">
|
||||
|
||||
### NaiveProxy
|
||||
- change login
|
||||
- change password
|
||||
<img src="https://github.com/mercurykd/vpnbot/assets/30900414/2127a4af-0436-452c-bfe2-c750dd5dbc06" width="200">
|
||||
<img src="https://github.com/mercurykd/vpnbot/assets/30900414/2127a4af-0436-452c-bfe2-c750dd5dbc06" width="300">
|
||||
|
||||
### OpenConnect
|
||||
- change secret
|
||||
- change password
|
||||
- change dns
|
||||
- add user
|
||||
<img src="https://github.com/mercurykd/vpnbot/assets/30900414/a4ffc04f-965a-439b-862b-210b98e1f87d" width="200">
|
||||
- add ip subnet
|
||||
- expose-iroutes (lan between users)
|
||||
<img src="https://github.com/user-attachments/assets/c3a8a78e-fe99-423c-a626-610b333a2a56" width="300">
|
||||
|
||||
### Wireguard / Amnezia
|
||||
- create
|
||||
@@ -31,31 +40,38 @@ telegram bot to manage servers (inside the bot)
|
||||
- timer
|
||||
- torrent blocking
|
||||
- qr/config
|
||||
- AmneziaVPN vpn:// link
|
||||
- statistics
|
||||
<img src="https://github.com/mercurykd/vpnbot/assets/30900414/51a79c93-8083-40ba-a14b-a6ef19f00531" width="200">
|
||||
<img src="https://github.com/mercurykd/vpnbot/assets/30900414/fd6ffd9f-bd75-479c-8dca-ea6c0b938b6c" width="200">
|
||||
<img src="https://github.com/mercurykd/vpnbot/assets/30900414/51a79c93-8083-40ba-a14b-a6ef19f00531" width="300">
|
||||
<img src="https://github.com/mercurykd/vpnbot/assets/30900414/fd6ffd9f-bd75-479c-8dca-ea6c0b938b6c" width="300">
|
||||
|
||||
### Shadowsocks + v2ray
|
||||
- change password
|
||||
- on/off v2ray
|
||||
- qr
|
||||
- short link
|
||||
<img src="https://github.com/mercurykd/vpnbot/assets/30900414/fbe39617-63ae-4536-8ab0-e4269ed8784a" width="200">
|
||||
<img src="https://github.com/mercurykd/vpnbot/assets/30900414/fbe39617-63ae-4536-8ab0-e4269ed8784a" width="300">
|
||||
|
||||
### AdguardHome
|
||||
- change password
|
||||
- change upstream dns
|
||||
- check dns
|
||||
<img src="https://github.com/mercurykd/vpnbot/assets/30900414/a7d4ba52-494b-429f-a3e2-08c68c8353c4" width="200">
|
||||
- check safesearch
|
||||
- add custom clientID for DNSoverTLS (DOT)
|
||||
- fill allowed clients (WG/AWG + OpenConnect + VLESS)
|
||||
- custom ID for each user VLESS
|
||||
<img src="https://github.com/user-attachments/assets/1dcdd9f9-f781-4ec2-8e32-01ce6095e0a3" width="300">
|
||||
|
||||
### PAC
|
||||
- the ability to create your own PAC available by url with the ability to substitute the final ip and port
|
||||
<img src="https://github.com/mercurykd/vpnbot/assets/30900414/5343e009-1b21-450f-918d-b811b98a0549" width="200">
|
||||
- Shadowsocks Android PAC
|
||||
- add [antifilter-community](https://community.antifilter.download/) or [ru-bundle](https://github.com/legiz-ru/sb-rule-sets/blob/main/ru-bundle.lst) domain lists
|
||||
<img src="https://github.com/user-attachments/assets/8d039dbb-6478-43a8-811a-4279e766c884" width="300">
|
||||
|
||||
### MTProto
|
||||
- change secret
|
||||
- qr/config
|
||||
<img src="https://github.com/mercurykd/vpnbot/assets/30900414/411696d8-172a-4dac-b6b7-4a6da3adfab2" width="200">
|
||||
<img src="https://github.com/user-attachments/assets/d37b2e1c-f991-4e1c-8060-1b547eea8fe2" width="300">
|
||||
|
||||
### Settings
|
||||
- add/change admin
|
||||
@@ -63,10 +79,12 @@ telegram bot to manage servers (inside the bot)
|
||||
- import/export all settings
|
||||
- domain binding
|
||||
- obtain ssl for domain
|
||||
<img src="https://github.com/mercurykd/vpnbot/assets/30900414/431ec09d-9c14-4c74-b8f6-e49c142132e8" width="200">
|
||||
- fake html for domain
|
||||
- ports block
|
||||
<img src="https://github.com/user-attachments/assets/82b78014-eaa2-4b4c-bc90-77f58d03d57c" width="300">
|
||||
|
||||
---
|
||||
environment: ubuntu 18.04/20.04/22.04, debian 11/12
|
||||
environment: ubuntu 22.04/24.04, debian 11/12
|
||||
|
||||
### Install:
|
||||
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
13.12.2024 v1.113
|
||||
- обновлен adguardHome
|
||||
- фикс краша adg при удалении dns-upstream из бота
|
||||
10.12.2024 v1.112
|
||||
- mihomo: встроенные списки теперь отдаются через rule-providers(т.е подгружаются ядром без обновления конфига)
|
||||
- обновлены ядра
|
||||
09.12.2024 v1.111
|
||||
- mihomo: фикс rule-providers format
|
||||
06.12.2024 v1.110
|
||||
|
||||
Reference in New Issue
Block a user