Skip to content

Commit

Permalink
feat: Support V2RayNG to get obfs parameters in shadowsocks.
Browse files Browse the repository at this point in the history
  • Loading branch information
ishkong authored Jul 21, 2024
1 parent e46f2b3 commit b8c2197
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/Protocols/V2rayNG.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ public static function buildShadowsocks($password, $server)
['-', '_', ''],
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)
Expand Down

0 comments on commit b8c2197

Please sign in to comment.