feat: Support V2RayNG to get obfs parameters in shadowsocks.

This commit is contained in:
ishkong 2024-07-21 17:29:12 +08:00 committed by GitHub
parent e46f2b3390
commit b8c2197e89
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -46,7 +46,11 @@ class V2rayNG
['-', '_', ''],
base64_encode("{$server['cipher']}:{$password}")
);
return "ss://{$str}@{$server['host']}:{$server['port']}#{$name}\r\n";
$uri = "ss://{$str}@{$server['host']}:{$server['port']}";
if ($server['obfs'] == 'http') {
$uri .= "?plugin=obfs-local;obfs=http;obfs-host={$server['obfs-host']};path={$server['obfs-path']}";
}
return $uri."#{$name}\r\n";
}
public static function buildVmess($uuid, $server)