Compare commits

...

7 Commits

Author SHA1 Message Date
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
4 changed files with 23 additions and 19 deletions
+7 -2
View File
@@ -738,7 +738,9 @@ class Bot
public function collectSession($c) { public function collectSession($c) {
foreach ($c['inbounds'][0]['settings']['clients'] as $k => $v) { foreach ($c['inbounds'][0]['settings']['clients'] as $k => $v) {
$c['inbounds'][0]['settings']['clients'][$k]['global']['download'] += $v['session']['download']; $c['inbounds'][0]['settings']['clients'][$k]['global']['download'] += $v['session']['download'];
$c['inbounds'][0]['settings']['clients'][$k]['session']['download'] = 0;
$c['inbounds'][0]['settings']['clients'][$k]['global']['upload'] += $v['session']['upload']; $c['inbounds'][0]['settings']['clients'][$k]['global']['upload'] += $v['session']['upload'];
$c['inbounds'][0]['settings']['clients'][$k]['session']['upload'] = 0;
} }
return $c; return $c;
} }
@@ -5492,6 +5494,7 @@ DNS-over-HTTPS with IP:
<code>~pac~</code> <code>~pac~</code>
<code>~package~</code> <code>~package~</code>
<code>~process~</code> <code>~process~</code>
<code>~subnet~</code>
<code>~block~</code> <code>~block~</code>
<code>~warp~</code> <code>~warp~</code>
<code>~dns~</code> <code>~dns~</code>
@@ -5500,6 +5503,7 @@ DNS-over-HTTPS with IP:
<code>~directdomain~</code> <code>~directdomain~</code>
<code>~cdndomain~</code> <code>~cdndomain~</code>
<code>~short_id~</code> <code>~short_id~</code>
<code>~email~</code>
<code>~public_key~</code> <code>~public_key~</code>
<code>~server_name~</code> <code>~server_name~</code>
<code>~ip~</code> <code>~ip~</code>
@@ -6299,6 +6303,7 @@ DNS-over-HTTPS with IP:
'~directdomain~' => $pac['domain'], '~directdomain~' => $pac['domain'],
'~cdndomain~' => $pac['linkdomain'], '~cdndomain~' => $pac['linkdomain'],
'~short_id~' => $xr['inbounds'][0]['streamSettings']['realitySettings']['shortIds'][0], '~short_id~' => $xr['inbounds'][0]['streamSettings']['realitySettings']['shortIds'][0],
'~email~' => $email,
'~public_key~' => $pac['xray'], '~public_key~' => $pac['xray'],
'~server_name~' => $xr['inbounds'][0]['streamSettings']['realitySettings']['serverNames'][0], '~server_name~' => $xr['inbounds'][0]['streamSettings']['realitySettings']['serverNames'][0],
'~ip~' => $this->ip, '~ip~' => $this->ip,
@@ -6319,11 +6324,11 @@ DNS-over-HTTPS with IP:
$c['route'] = $this->addRuleSet($c['route']); $c['route'] = $this->addRuleSet($c['route']);
$c['route'] = $this->createRuleSet($c['route'], $uid, $domain); $c['route'] = $this->createRuleSet($c['route'], $uid, $domain);
if (!empty($c['route']['rules'])) { if (!empty($c['route']['rules'])) {
foreach ($c['route']['rules'] as $k => $v) { /* foreach ($c['route']['rules'] as $k => $v) {
if (count($v) < 2) { if (count($v) < 2) {
unset($c['route']['rules'][$k]); unset($c['route']['rules'][$k]);
} }
} } */
$c['route']['rules'] = array_values($c['route']['rules']); $c['route']['rules'] = array_values($c['route']['rules']);
} }
break; break;
+12 -16
View File
@@ -9,9 +9,10 @@
"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, "sniff": true,
@@ -48,7 +49,7 @@
}, },
{ {
"tag": "dns-remote", "tag": "dns-remote",
"address": "tcp:\/\/8.8.8.8", "address": "tcp://8.8.8.8",
"address_strategy": "prefer_ipv4", "address_strategy": "prefer_ipv4",
"strategy": "prefer_ipv4", "strategy": "prefer_ipv4",
"detour": "direct" "detour": "direct"
@@ -92,28 +93,23 @@
{ {
"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": [
{
"protocol": "dns",
"outbound": "dns-out"
},
{ {
"addruleset": true, "addruleset": true,
"outbound": "direct" "outbound": "direct"
}, },
{
"action": "sniff"
},
{
"protocol": "dns",
"action": "hijack-dns"
},
{ {
"addruleset": true, "addruleset": true,
"createruleset": [ "createruleset": [
@@ -187,7 +183,7 @@
] ]
} }
], ],
"outbound": "block" "action": "reject"
}, },
{ {
"addruleset": true, "addruleset": true,
Binary file not shown.
+3
View File
@@ -1,3 +1,6 @@
02.02.2025 v2.8
- vless: корректировка статы юзера
- sing-box 1.11
29.01.2025 v2.7 29.01.2025 v2.7
- vless: сброс статистики юзера - vless: сброс статистики юзера
24.01.2025 v2.6 24.01.2025 v2.6