Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ca92ca703f | |||
| f527888db8 | |||
| 0e47a771cc | |||
| ff10cbefc8 |
+7
-2
@@ -5406,9 +5406,14 @@ DNS-over-HTTPS with IP:
|
|||||||
|
|
||||||
public function resetXrStats()
|
public function resetXrStats()
|
||||||
{
|
{
|
||||||
$this->restartXray($this->getXray());
|
$x = $this->getXray();
|
||||||
$p = $this->getPacConf();
|
$p = $this->getPacConf();
|
||||||
unset($p['vlessstat']);
|
unset($p['vlessstat']);
|
||||||
|
foreach ($x['inbounds'][0]['settings']['clients'] as $k => $v) {
|
||||||
|
unset($x['inbounds'][0]['settings']['clients'][$k]['global']);
|
||||||
|
unset($x['inbounds'][0]['settings']['clients'][$k]['session']);
|
||||||
|
}
|
||||||
|
$this->restartXray($x);
|
||||||
$this->setPacConf($p);
|
$this->setPacConf($p);
|
||||||
$this->xray();
|
$this->xray();
|
||||||
}
|
}
|
||||||
@@ -6494,7 +6499,7 @@ DNS-over-HTTPS with IP:
|
|||||||
$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) == 1 && array_key_exists('outbound', $v)) {
|
||||||
unset($c['route']['rules'][$k]);
|
unset($c['route']['rules'][$k]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+20
-22
@@ -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,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "mixed",
|
"type": "mixed",
|
||||||
"tag": "mixed-in",
|
"tag": "in"
|
||||||
"domain_strategy": "prefer_ipv4",
|
|
||||||
"listen": "127.0.0.1",
|
|
||||||
"listen_port": 2080,
|
|
||||||
"tcp_fast_open": true,
|
|
||||||
"sniff": true,
|
|
||||||
"sniff_override_destination": false,
|
|
||||||
"users": []
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"dns": {
|
"dns": {
|
||||||
@@ -92,23 +85,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,
|
||||||
@@ -187,7 +185,7 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"outbound": "block"
|
"action": "reject"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"addruleset": true,
|
"addruleset": true,
|
||||||
@@ -207,4 +205,4 @@
|
|||||||
],
|
],
|
||||||
"final": "direct"
|
"final": "direct"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Binary file not shown.
Reference in New Issue
Block a user