Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 24aaa8756c | |||
| 07e2beff9b | |||
| 86261e6b76 | |||
| d816582e6f | |||
| 6d1ab0cb3a | |||
| 284b025881 | |||
| 0ca93b56a3 |
+7
-2
@@ -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;
|
||||||
|
|||||||
+13
-17
@@ -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,
|
||||||
@@ -207,4 +203,4 @@
|
|||||||
],
|
],
|
||||||
"final": "direct"
|
"final": "direct"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Binary file not shown.
Reference in New Issue
Block a user