fix: correct obfs host parameter in subscription delivery for clash/clash-meta/shadowsocks/stash

This commit is contained in:
xboard
2025-05-18 03:58:14 +08:00
parent 24d9533dca
commit f839e8b3f0
4 changed files with 5 additions and 5 deletions

View File

@@ -148,7 +148,7 @@ class Clash implements ProtocolInterface
$array['plugin'] = 'obfs';
$array['plugin-opts'] = [
'mode' => 'http',
'host' => data_get($protocol_settings, 'obfs.host'),
'host' => data_get($protocol_settings, 'obfs_settings.host'),
];
}
return $array;

View File

@@ -166,7 +166,7 @@ class ClashMeta implements ProtocolInterface
$array['plugin'] = 'obfs';
$array['plugin-opts'] = [
'mode' => 'http',
'host' => data_get($protocol_settings, 'obfs.host'),
'host' => data_get($protocol_settings, 'obfs_settings.host'),
];
}
return $array;

View File

@@ -70,8 +70,8 @@ class Shadowrocket implements ProtocolInterface
$uri = "ss://{$str}@{$addr}:{$server['port']}";
if ($protocol_settings['obfs'] == 'http') {
$obfs_host = data_get($protocol_settings, 'obfs_settings.obfs-host');
$obfs_path = data_get($protocol_settings, 'obfs_settings.obfs-path');
$obfs_host = data_get($protocol_settings, 'obfs_settings.host');
$obfs_path = data_get($protocol_settings, 'obfs_settings.path');
$uri .= "?plugin=obfs-local;obfs=http;obfs-host={$obfs_host};obfs-uri={$obfs_path}";
}
return $uri . "#{$name}\r\n";

View File

@@ -141,7 +141,7 @@ class Stash implements ProtocolInterface
$array['plugin'] = 'obfs';
$array['plugin-opts'] = [
'mode' => 'http',
'host' => data_get($protocol_settings, 'obfs.host'),
'host' => data_get($protocol_settings, 'obfs_settings.host'),
];
}
return $array;