mirror of
https://github.com/v2board/v2board.git
synced 2025-01-25 15:39:10 +08:00
update: support stash
This commit is contained in:
parent
333611da48
commit
6718a61890
@ -53,12 +53,12 @@ class Clash
|
||||
foreach ($config['proxy-groups'] as $k => $v) {
|
||||
if (!is_array($config['proxy-groups'][$k]['proxies'])) continue;
|
||||
$isFilter = false;
|
||||
foreach ($config['proxy-groups'][$k]['proxies'] as $srcProxie) {
|
||||
foreach ($proxies as $dstProxie) {
|
||||
if ($this->isMatch($srcProxie, $dstProxie)) {
|
||||
foreach ($config['proxy-groups'][$k]['proxies'] as $src) {
|
||||
foreach ($proxies as $dst) {
|
||||
if ($this->isMatch($src, $dst)) {
|
||||
$isFilter = true;
|
||||
$config['proxy-groups'][$k]['proxies'] = array_diff($config['proxy-groups'][$k]['proxies'], [$srcProxie]);
|
||||
array_push($config['proxy-groups'][$k]['proxies'], $dstProxie);
|
||||
$config['proxy-groups'][$k]['proxies'] = array_diff($config['proxy-groups'][$k]['proxies'], [$src]);
|
||||
array_push($config['proxy-groups'][$k]['proxies'], $dst);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -54,12 +54,12 @@ class Stash
|
||||
foreach ($config['proxy-groups'] as $k => $v) {
|
||||
if (!is_array($config['proxy-groups'][$k]['proxies'])) continue;
|
||||
$isFilter = false;
|
||||
foreach ($config['proxy-groups'][$k]['proxies'] as $srcProxie) {
|
||||
foreach ($proxies as $dstProxie) {
|
||||
if ($this->isMatch($srcProxie, $dstProxie)) {
|
||||
foreach ($config['proxy-groups'][$k]['proxies'] as $src) {
|
||||
foreach ($proxies as $dst) {
|
||||
if ($this->isMatch($src, $dst)) {
|
||||
$isFilter = true;
|
||||
$config['proxy-groups'][$k]['proxies'] = array_diff($config['proxy-groups'][$k]['proxies'], [$srcProxie]);
|
||||
array_push($config['proxy-groups'][$k]['proxies'], $dstProxie);
|
||||
$config['proxy-groups'][$k]['proxies'] = array_diff($config['proxy-groups'][$k]['proxies'], [$src]);
|
||||
array_push($config['proxy-groups'][$k]['proxies'], $dst);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user