diff --git a/app/Protocols/V2rayNG.php b/app/Protocols/V2rayNG.php index c758cfb..7b1ba53 100644 --- a/app/Protocols/V2rayNG.php +++ b/app/Protocols/V2rayNG.php @@ -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)