diff --git a/app/Utils/URL.php b/app/Utils/URL.php index 6abcf884..65657343 100644 --- a/app/Utils/URL.php +++ b/app/Utils/URL.php @@ -326,7 +326,9 @@ class URL if ($is_ss == 2) { $personal_info = $item['method'] . ':' . $item['passwd'] . '@' . $item['address'] . ':' . $item['port']; $ssurl = 'ss://' . Tools::base64_url_encode($personal_info); - $ssurl .= '#' . rawurlencode(Config::get('appName') . ' - ' . $item['remark']); + $ssurl .= (Config::get('add_appName_to_ss_uri') == 'true' + ? '#' . rawurlencode(Config::get('appName') . ' - ' . $item['remark']) + : '#' . rawurlencode($item['remark'])); } else { $personal_info = $item['method'] . ':' . $item['passwd']; $ssurl = 'ss://' . Tools::base64_url_encode($personal_info) . '@' . $item['address'] . ':' . $item['port']; @@ -346,9 +348,9 @@ class URL } else { $ssurl .= '?group=' . Tools::base64_url_encode(Config::get('appName')); } - $ssurl .= '#' . rawurlencode( - Config::get('appName') . ' - ' . $item['remark'] - ); + $ssurl .= (Config::get('add_appName_to_ss_uri') == 'true' + ? '#' . rawurlencode(Config::get('appName') . ' - ' . $item['remark']) + : '#' . rawurlencode($item['remark'])); } return $ssurl; } diff --git a/config/.config.example.php b/config/.config.example.php index 88c69d6f..9762e5a8 100644 --- a/config/.config.example.php +++ b/config/.config.example.php @@ -298,6 +298,7 @@ $System_Config['muKeyList'] = [' ']; //多 key 列表 $System_Config['mu_port_migration'] = 'false'; //为后端直接下发偏移后的端口 $System_Config['relay_port_migration'] = 'false'; //为中转规则下发偏移后的端口,此项未经测试 $System_Config['add_emoji_to_node_name'] = 'false'; //为部分订阅中默认添加 emoji +$System_Config['add_appName_to_ss_uri'] = 'true'; //为 SS 节点名称中添加站点名 // 审计自动封禁开关 $System_Config['enable_auto_detect_ban'] = 'false';