mirror of
https://github.com/lkddi/Xboard.git
synced 2026-04-03 10:30:51 +08:00
fix: correct obfs host parameter in subscription delivery for clash/clash-meta/shadowsocks/stash
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user