From 17c359ffdb7cc4141756bb4035fbfeee67eec91a Mon Sep 17 00:00:00 2001 From: GeekQu Date: Tue, 4 Jun 2019 15:09:37 +0800 Subject: [PATCH] Update LinkController.php --- app/Controllers/LinkController.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/Controllers/LinkController.php b/app/Controllers/LinkController.php index c4f8b99d..9fbdb38d 100644 --- a/app/Controllers/LinkController.php +++ b/app/Controllers/LinkController.php @@ -249,12 +249,12 @@ class LinkController extends BaseController } $v2ray_obfs = ''; if ($v2ray['net'] == 'ws' || $v2ray['net'] == 'http') { - $v2ray_obfs = ', obfs=' . $v2ray['net'] . ', obfs-path=\"' . $v2ray['path'] . '\", obfs-header=\"Host: ' . $v2ray['add'] . '[Rr][Nn]User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 18_0_0 like Mac OS X) AppleWebKit/888.8.88 (KHTML, like Gecko) Mobile/6666666\"'; + $v2ray_obfs = ', obfs=' . $v2ray['net'] . ', obfs-path="' . $v2ray['path'] . '", obfs-header="Host: ' . $v2ray['add'] . '[Rr][Nn]User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 18_0_0 like Mac OS X) AppleWebKit/888.8.88 (KHTML, like Gecko) Mobile/6666666"'; } if ($quantumult == 1) { - $v2ray_group .= 'vmess://' . base64_encode($v2ray['ps'] . ' = vmess, ' . $v2ray['add'] . ', ' . $v2ray['port'] . ', chacha20-ietf-poly1305, \"' . $v2ray['id'] . '\", group=' . Config::get('appName') . '_v2' . $v2ray_tls . $v2ray_obfs) . PHP_EOL; + $v2ray_group .= 'vmess://' . base64_encode($v2ray['ps'] . ' = vmess, ' . $v2ray['add'] . ', ' . $v2ray['port'] . ', chacha20-ietf-poly1305, "' . $v2ray['id'] . '", group=' . Config::get('appName') . '_v2' . $v2ray_tls . $v2ray_obfs) . PHP_EOL; } else { - $v2ray_group .= $v2ray['ps'] . ' = vmess, ' . $v2ray['add'] . ', ' . $v2ray['port'] . ', chacha20-ietf-poly1305, \"' . $v2ray['id'] . '\", group=' . Config::get('appName') . '_v2' . $v2ray_tls . $v2ray_obfs . PHP_EOL; + $v2ray_group .= $v2ray['ps'] . ' = vmess, ' . $v2ray['add'] . ', ' . $v2ray['port'] . ', chacha20-ietf-poly1305, "' . $v2ray['id'] . '", group=' . Config::get('appName') . '_v2' . $v2ray_tls . $v2ray_obfs . PHP_EOL; } } if ($quantumult == 1) { @@ -267,7 +267,7 @@ class LinkController extends BaseController if ($item['obfs'] == 'v2ray') { continue; } - $ss_group .= $item['remark'] . ' = shadowsocks, ' . $item['address'] . ', ' . $item['port'] . ', ' . $item['method'] . ', \"' . $item['passwd'] . '\", upstream-proxy=false, upstream-proxy-auth=false' . URL::getSurgeObfs($item) . ', group=' . Config::get('appName') . PHP_EOL; + $ss_group .= $item['remark'] . ' = shadowsocks, ' . $item['address'] . ', ' . $item['port'] . ', ' . $item['method'] . ', "' . $item['passwd'] . '", upstream-proxy=false, upstream-proxy-auth=false' . URL::getSurgeObfs($item) . ', group=' . Config::get('appName') . PHP_EOL; if (strpos($item['remark'], '回国') or strpos($item['remark'], 'China')) { $back_china_name .= "\n". $item['remark']; } else { @@ -278,7 +278,7 @@ class LinkController extends BaseController $ssr_name = ''; $ssrs = array_merge(URL::getAllItems($user, 0, 0), URL::getAllItems($user, 1, 0)); foreach ($ssrs as $item) { - $ssr_group .= $item['remark'] . ' = shadowsocksr, ' . $item['address'] . ', ' . $item['port'] . ', ' . $item['method'] . ', \"' . $item['passwd'] . '\", protocol=' . $item['protocol'] . ', protocol_param=' . $item['protocol_param'] . ', obfs=' . $item['obfs'] . ', obfs_param=\"' . $item['obfs_param'] . '\", group=' . Config::get('appName') . PHP_EOL; + $ssr_group .= $item['remark'] . ' = shadowsocksr, ' . $item['address'] . ', ' . $item['port'] . ', ' . $item['method'] . ', "' . $item['passwd'] . '", protocol=' . $item['protocol'] . ', protocol_param=' . $item['protocol_param'] . ', obfs=' . $item['obfs'] . ', obfs_param="' . $item['obfs_param'] . '", group=' . Config::get('appName') . PHP_EOL; if (strpos($item['remark'], '回国') or strpos($item['remark'], 'China')) { $back_china_name .= "\n". $item['remark']; } else {