diff --git a/app/Protocols/Shadowrocket.php b/app/Protocols/Shadowrocket.php index 57ab17f..c4cc8db 100644 --- a/app/Protocols/Shadowrocket.php +++ b/app/Protocols/Shadowrocket.php @@ -58,7 +58,11 @@ class Shadowrocket ['-', '_', ''], 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']};obfs-uri={$server['obfs-path']}"; + } + return $uri."#{$name}\r\n"; } public static function buildVmess($uuid, $server) @@ -283,4 +287,4 @@ class Shadowrocket } return $uri; } -} \ No newline at end of file +}