fix: 修复上一个commit导致的shadowrocket的hy2节点订阅下发失败的问题

This commit is contained in:
xboard 2024-05-15 01:05:27 +08:00
parent 5a0e59b103
commit d1eef94e6b

View File

@ -272,7 +272,7 @@ class Shadowrocket
$params["obfsParam"] =$server['server_key'];
}
if($server['insecure']) $params['insecure'] = $server['insecure'];
if($server['ports']) $params['mport'] = $server['ports'];
if(isset($server['ports'])) $params['mport'] = $server['ports'];
$query = http_build_query($params);
$uri = "hysteria://{$server['host']}:{$server['port']}?{$query}#{$server['name']}";
$uri .= "\r\n";
@ -285,7 +285,7 @@ class Shadowrocket
];
if($server['is_obfs']) $params['obfs-password'] = $server['server_key'];
if($server['insecure']) $params['insecure'] = $server['insecure'];
if($server['ports']) $params['mport'] = $server['ports'];
if(isset($server['ports'])) $params['mport'] = $server['ports'];
$query = http_build_query($params);
$uri = "hysteria2://{$password}@{$server['host']}:{$server['port']}?{$query}#{$server['name']}";
$uri .= "\r\n";