From dd8267097ec000443f83997f68aa3a896cdd7bd8 Mon Sep 17 00:00:00 2001 From: ishkong <19740260+ishkong@users.noreply.github.com> Date: Sun, 21 Jul 2024 13:58:22 +0800 Subject: [PATCH] feat: Support Shadowsocks obfs config --- app/Services/ServerService.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/Services/ServerService.php b/app/Services/ServerService.php index 6973556..8da9a3f 100644 --- a/app/Services/ServerService.php +++ b/app/Services/ServerService.php @@ -161,6 +161,11 @@ class ServerService $userKey = Helper::uuidToBase64($user['uuid'], $config['userKeySize']); $shadowsocks[$key]['password'] = "{$serverKey}:{$userKey}"; } + if ($v['obfs'] === 'http') { + $shadowsocks[$key]['obfs'] = 'http'; + $shadowsocks[$key]['obfs-host'] = $v['obfs_settings']['host']; + $shadowsocks[$key]['obfs-path'] = $v['obfs_settings']['path']; + } $servers[] = $shadowsocks[$key]->toArray(); } return $servers;