From efa11e17e331c09a6a000ffa36064a47730a1eef Mon Sep 17 00:00:00 2001 From: GeekQu Date: Mon, 6 Jan 2020 19:16:52 +0800 Subject: [PATCH] Bot +1 --- .../Telegram/Commands/SetuserCommand.php | 322 +++--------------- app/Utils/Telegram/TelegramTools.php | 220 ++++++++++++ config/.config.example.php | 30 +- 3 files changed, 301 insertions(+), 271 deletions(-) create mode 100644 app/Utils/Telegram/TelegramTools.php diff --git a/app/Utils/Telegram/Commands/SetuserCommand.php b/app/Utils/Telegram/Commands/SetuserCommand.php index 162f9138..701b6b79 100644 --- a/app/Utils/Telegram/Commands/SetuserCommand.php +++ b/app/Utils/Telegram/Commands/SetuserCommand.php @@ -5,7 +5,7 @@ namespace App\Utils\Telegram\Commands; use App\Models\User; use App\Services\Config; use App\Utils\Tools; -use App\Utils\Telegram\Process; +use App\Utils\Telegram\{Process, TelegramTools}; use Telegram\Bot\Actions; use Telegram\Bot\Commands\Command; @@ -71,6 +71,7 @@ class SetuserCommand extends Command { $User = null; $FindUser = null; + $arguments = trim($arguments); if ($Message->getReplyToMessage() != null) { // 回复源消息用户 $FindUser = [ @@ -82,19 +83,38 @@ class SetuserCommand extends Command if ($User == null) { return self::reply(Config::get('no_user_found'), $MessageID); } - if (trim($arguments) == '') { + if ($arguments == '') { // 无参数时回复用户信息 return self::reply('用户信息.', $MessageID); } } + if ($arguments == '') { + + $strArray = [ + '/setuser [用户识别] [操作字段] [操作参数]', + '', + '用户识别:[使用回复消息方式则无需填写]', + '- [' . implode(' | ', array_keys(TelegramTools::getUserSearchMethods())) . '],可省略,默认:email', + '- 例 1:/setuser admin@admin 操作字段 操作参数', + '- 例 2:/setuser port:10086 操作字段 操作参数', + '', + '操作字段:', + '[' . implode(' | ', array_keys(TelegramTools::getUserActionOption())) . ']', + '', + '操作参数:', + '- 请查看对应选项支持的写法.', + ]; + return $this->reply(TelegramTools::StrArrayToCode($strArray), $MessageID, 'HTML'); + } + // 命令格式: // - /setuser [用户识别码] 选项 操作值 // ############## 命令解析 ############## $UserCode = ''; if ($User == null) { - $Options = self::StrExplode($arguments, ' ', 3); + $Options = TelegramTools::StrExplode($arguments, ' ', 3); if (count($Options) < 3) { return self::reply('没有提供选项或操作值.', $MessageID); } @@ -105,7 +125,7 @@ class SetuserCommand extends Command // 操作值 $value = $Options[2]; } else { - $Options = self::StrExplode($arguments, ' ', 2); + $Options = TelegramTools::StrExplode($arguments, ' ', 2); if (count($Options) < 2) { return self::reply('没有提供选项或操作值.', $MessageID); } @@ -125,18 +145,8 @@ class SetuserCommand extends Command $UserCodeExplode = explode(':', $UserCode); $Search = $UserCodeExplode[0]; $UserCode = $UserCodeExplode[1]; - $SearchMethods = [ - 'id' => [ - 'ID' - ], - 'email' => [ - '邮箱' - ], - 'port' => [ - '端口' - ], - ]; - $useTempMethod = self::getOptionMethod($SearchMethods, $Search); + $SearchMethods = TelegramTools::getUserSearchMethods(); + $useTempMethod = TelegramTools::getOptionMethod($SearchMethods, $Search); if ($useTempMethod != '') { $useMethod = $useTempMethod; } @@ -149,76 +159,9 @@ class SetuserCommand extends Command // ############## 用户识别码处理 ############## // ############## 字段选项处理 ############## - $OptionMethods = [ - 'is_admin' => [ - '设置管理员', - '管理员', - ], - 'enable' => [ - '启用', - '用户启用', - ], - 'money' => [ - '钱', - '金钱', - '余额' - ], - 'port' => [ - '端口' - ], - 'transfer_enable' => [ - '流量', - '数据', - '数据流量' - ], - 'passwd' => [ - '连接密码' - ], - 'method' => [ - '加密', - '加密方式', - '加密方法' - ], - 'protocol' => [ - '协议' - ], - 'protocol_param' => [ - '协参', - '协议参数', - ], - 'obfs' => [ - '混淆' - ], - 'obfs_param' => [ - '混参', - '混淆参数', - ], - 'invite_num' => [ - '邀请数量' - ], - 'node_group' => [ - '用户组', - '用户分组', - ], - 'class' => [ - '等级' - ], - 'class_expire' => [ - '等级过期时间' - ], - 'expire_in' => [ - '账户过期时间', - '账号过期时间' - ], - 'node_speedlimit' => [ - '限速' - ], - 'node_connector' => [ - '客户端', - '连接数', - ], - ]; - $useOptionMethod = self::getOptionMethod($OptionMethods, $Option); + + $OptionMethods = TelegramTools::getUserActionOption(); + $useOptionMethod = TelegramTools::getOptionMethod($OptionMethods, $Option); if ($useOptionMethod == '') { return self::reply(Config::get('data_method_not_found'), $MessageID); } @@ -226,6 +169,7 @@ class SetuserCommand extends Command // ############## 字段数据增改值处理 ############## $old = $User->$useOptionMethod; + $useOptionMethodName = $OptionMethods[$useOptionMethod][0]; switch ($useOptionMethod) { // ############## case 'enable': @@ -235,7 +179,7 @@ class SetuserCommand extends Command '// [启用|是] —— 字面意思', '// [禁用|否] —— 字面意思', ]; - if (strpos($value, ' ') !== false) return self::reply('处理出错,不支持的写法.' . PHP_EOL . PHP_EOL . implode(PHP_EOL, $strArray), $MessageID); + if (strpos($value, ' ') !== false) return self::reply('处理出错,不支持的写法.' . PHP_EOL . PHP_EOL . TelegramTools::StrArrayToCode($strArray), $MessageID, 'HTML'); if (in_array($value, ['启用', '是'])) { $User->$useOptionMethod = 1; $new = '启用'; @@ -243,7 +187,7 @@ class SetuserCommand extends Command $User->$useOptionMethod = 0; $new = '禁用'; } else { - return self::reply('处理出错,不支持的写法.' . PHP_EOL . PHP_EOL . implode(PHP_EOL, $strArray), $MessageID); + return self::reply('处理出错,不支持的写法.' . PHP_EOL . PHP_EOL . TelegramTools::StrArrayToCode($strArray), $MessageID, 'HTML'); } $old = ($old ? '启用' : '禁用'); break; @@ -258,19 +202,14 @@ class SetuserCommand extends Command } $temp = $User->setPort($value); if ($temp['ok'] === false) { - $text = [ + $strArray = [ '目标用户:' . $User->email, - '欲修改项:' . $useOptionMethod, + '欲修改项:' . $useOptionMethodName . '[' . $useOptionMethod . ']', '当前值为:' . $old, '欲修改为:' . $value, '错误详情:' . $temp['msg'], ]; - return $this->replyWithMessage( - [ - 'text' => implode(PHP_EOL, $text), - 'reply_to_message_id' => $MessageID, - ] - ); + return self::reply(TelegramTools::StrArrayToCode($strArray), $MessageID, 'HTML'); } $new = $User->$useOptionMethod; $User->$useOptionMethod = $new; @@ -286,9 +225,9 @@ class SetuserCommand extends Command '// *2 —— 以当前流量做乘法,不支持填写单位', '// /2 —— 以当前流量做除法,不支持填写单位', ]; - if (strpos($value, ' ') !== false) return self::reply('处理出错,不支持的写法.' . PHP_EOL . PHP_EOL . implode(PHP_EOL, $strArray), $MessageID); - $new = self::TrafficMethod($User->$useOptionMethod, $value); - if ($new === null) return self::reply('处理出错,不支持的写法.' . PHP_EOL . PHP_EOL . implode(PHP_EOL, $strArray), $MessageID); + if (strpos($value, ' ') !== false) return self::reply('处理出错,不支持的写法.' . PHP_EOL . PHP_EOL . TelegramTools::StrArrayToCode($strArray), $MessageID, 'HTML'); + $new = TelegramTools::TrafficMethod($User->$useOptionMethod, $value); + if ($new === null) return self::reply('处理出错,不支持的写法.' . PHP_EOL . PHP_EOL . TelegramTools::StrArrayToCode($strArray), $MessageID, 'HTML'); $User->$useOptionMethod = $new; $old = Tools::flowAutoShow($old); $new = Tools::flowAutoShow($new); @@ -319,7 +258,7 @@ class SetuserCommand extends Command $new = ($operator == '+' ? $old_time + $number : $old_time - $number); $new = date('Y-m-d H:i:s', $new); } else { - if (strtotime($value) === false) return self::reply('处理出错,不支持的写法.' . PHP_EOL . PHP_EOL . implode(PHP_EOL, $strArray), $MessageID); + if (strtotime($value) === false) return self::reply('处理出错,不支持的写法.' . PHP_EOL . PHP_EOL . TelegramTools::StrArrayToCode($strArray), $MessageID, 'HTML'); $new = strtotime($value); $new = date('Y-m-d H:i:s', $new); } @@ -330,7 +269,7 @@ class SetuserCommand extends Command $new = time() + $number; $new = date('Y-m-d H:i:s', $new); } else { - if (strtotime($value) === false) return self::reply('处理出错,不支持的写法.' . PHP_EOL . PHP_EOL . implode(PHP_EOL, $strArray), $MessageID); + if (strtotime($value) === false) return self::reply('处理出错,不支持的写法.' . PHP_EOL . PHP_EOL . TelegramTools::StrArrayToCode($strArray), $MessageID, 'HTML'); $new = strtotime($value); $new = date('Y-m-d H:i:s', $new); } @@ -345,34 +284,23 @@ class SetuserCommand extends Command $MethodClass = 'set' . ucfirst($useOptionMethod); $temp = $User->$MethodClass($value); if ($temp['ok'] === true) { - $text = [ + $strArray = [ '目标用户:' . $User->email, - '被修改项:' . $useOptionMethod, + '被修改项:' . $useOptionMethodName . '[' . $useOptionMethod . ']', '修改前值:' . $old, '修改后值:' . $User->$useOptionMethod, '修改备注:' . $temp['msg'], ]; - return $this->replyWithMessage( - [ - 'text' => implode(PHP_EOL, $text), - 'reply_to_message_id' => $MessageID, - ] - ); } else { - $text = [ + $strArray = [ '目标用户:' . $User->email, - '欲修改项:' . $useOptionMethod, + '欲修改项:' . $useOptionMethodName . '[' . $useOptionMethod . ']', '当前值为:' . $old, '欲修改为:' . $value, '错误详情:' . $temp['msg'], ]; - return $this->replyWithMessage( - [ - 'text' => implode(PHP_EOL, $text), - 'reply_to_message_id' => $MessageID, - ] - ); } + return self::reply(TelegramTools::StrArrayToCode($strArray), $MessageID, 'HTML'); break; // ############## case 'passwd': @@ -393,8 +321,8 @@ class SetuserCommand extends Command '// /2 —— 以当前余额做除法', ]; $value = explode(' ', $value)[0]; - $new = self::ComputingMethod($User->$useOptionMethod, $value, true); - if ($new === null) return self::reply('处理出错,不支持的写法.' . PHP_EOL . PHP_EOL . implode(PHP_EOL, $strArray), $MessageID); + $new = TelegramTools::ComputingMethod($User->$useOptionMethod, $value, true); + if ($new === null) return self::reply('处理出错,不支持的写法.' . PHP_EOL . PHP_EOL . TelegramTools::StrArrayToCode($strArray), $MessageID, 'HTML'); $User->$useOptionMethod = $new; break; // ############## @@ -411,8 +339,8 @@ class SetuserCommand extends Command '// /2 —— 以当前值做除法', ]; $value = explode(' ', $value)[0]; - $new = self::ComputingMethod($User->$useOptionMethod, $value, false); - if ($new === null) return self::reply('处理出错,不支持的写法.' . PHP_EOL . PHP_EOL . implode(PHP_EOL, $strArray), $MessageID); + $new = TelegramTools::ComputingMethod($User->$useOptionMethod, $value, false); + if ($new === null) return self::reply('处理出错,不支持的写法.' . PHP_EOL . PHP_EOL . TelegramTools::StrArrayToCode($strArray), $MessageID, 'HTML'); $User->$useOptionMethod = $new; break; // ############## @@ -421,18 +349,13 @@ class SetuserCommand extends Command break; } if ($User->save()) { - $text = [ + $strArray = [ '目标用户:' . $User->email, - '被修改项:' . $useOptionMethod, + '被修改项:' . $useOptionMethodName . '[' . $useOptionMethod . ']', '修改前为:' . $old, '修改后为:' . $new, ]; - return $this->replyWithMessage( - [ - 'text' => implode(PHP_EOL, $text), - 'reply_to_message_id' => $MessageID, - ] - ); + return self::reply(TelegramTools::StrArrayToCode($strArray), $MessageID, 'HTML'); } else { return $this->replyWithMessage( [ @@ -454,151 +377,14 @@ class SetuserCommand extends Command ); } - public function reply($Message, $MessageID) + public function reply($Message, $MessageID, $ParseMode = '') { return $this->replyWithMessage( [ 'text' => $Message, + 'parse_mode' => $ParseMode, 'reply_to_message_id' => $MessageID, ] ); } - - /** - * 分割字符串 - * - * @param string $Str 源字符串 - * @param string $Delimiter 分割定界符 - * @param int $Quantity 最大返回数量 - * - * @return array - */ - public function StrExplode($Str, $Delimiter, $Quantity = 10) - { - $return = []; - $Str = trim($Str); - for ($x = 0; $x <= 10; $x++) { - if (strpos($Str, $Delimiter) !== false && count($return) < $Quantity - 1) { - $temp = substr($Str, 0, strpos($Str, $Delimiter)); - $return[] = $temp; - $Str = trim(substr($Str, strlen($temp))); - } else { - $return[] = $Str; - break; - } - } - return $return; - } - - /** - * 查找字符串是否是某个方法的别名 - * - * @param array $MethodGroup 方法别名的数组 - * @param string $Search 被搜索的字符串 - * - * @return string - */ - public function getOptionMethod($MethodGroup, $Search) - { - $useMethod = ''; - foreach ($MethodGroup as $MethodName => $Remarks) { - if (strlen($MethodName) === strlen($Search)) { - if (stripos($MethodName, $Search) === 0) { - $useMethod = $MethodName; - break; - } - } - if (count($Remarks) >= 1) { - foreach ($Remarks as $Remark) { - if (strlen($Remark) === strlen($Search) && stripos($Remark, $Search) === 0) { - $useMethod = $MethodName; - break 2; - } - } - } - } - return $useMethod; - } - - /** - * 使用 $Value 给定的运算式与 $Source 计算结果 - * - * @param string $Source 源数值 - * @param string $Value 运算式含增改数值 - * @param bool $FloatingNumber 是否格式化为浮点数 - * - * @return string|null - */ - public function ComputingMethod($Source, $Value, $FloatingNumber = false) - { - if ( - (strpos($Value, '+') === 0 - || - strpos($Value, '-') === 0 - || - strpos($Value, '*') === 0 - || - strpos($Value, '/') === 0) - && - is_numeric(substr($Value, 1)) - ) { - $Source = eval('return $Source ' . substr($Value, 0, 1) . '= ' . substr($Value, 1) . ';'); - } else { - if (is_numeric($Value)) { - $Source = $Value; - } else { - $Source = null; - } - } - if ($Source !== null) { - $Source = ($FloatingNumber === false - ? number_format($Source, 0, '.', '') - : number_format($Source, 2, '.', '')); - } - return $Source; - } - - /** - * 使用 $Value 给定的运算式及流量单位与 $Source 计算结果 - * - * @param string $Source 源数值 - * @param string $Value 运算式含增改数值 - * - * @return int|null - */ - public function TrafficMethod($Source, $Value) - { - if ( - strpos($Value, '+') === 0 - || - strpos($Value, '-') === 0 - || - strpos($Value, '*') === 0 - || - strpos($Value, '/') === 0 - ) { - $operator = substr($Value, 0, 1); - if (!in_array($operator, ['*', '/'])) { - $number = Tools::flowAutoShowZ(substr($Value, 1)); - } else { - $number = substr($Value, 1, strlen($Value) - 1); - if (!is_numeric($number)) return null; - } - if ($number === null) { - return null; - } - $Source = eval('return $Source ' . $operator . '= ' . $number . ';'); - } else { - if (is_numeric($Value)) { - if ((int) $Value === 0) { - $Source = 0; - } else { - $Source = Tools::flowAutoShowZ($Value . 'KB'); - } - } else { - $Source = Tools::flowAutoShowZ($Value); - } - } - return $Source; - } } diff --git a/app/Utils/Telegram/TelegramTools.php b/app/Utils/Telegram/TelegramTools.php new file mode 100644 index 00000000..77ae1cae --- /dev/null +++ b/app/Utils/Telegram/TelegramTools.php @@ -0,0 +1,220 @@ + [], + 'email' => Config::get('remark_user_search_email'), + 'port' => Config::get('remark_user_search_port'), + ]; + } + + /** + * 操作字段 + * + * @return array + */ + public static function getUserActionOption() + { + return [ + 'is_admin' => Config::get('remark_user_option_is_admin'), + 'enable' => Config::get('remark_user_option_enable'), + 'money' => Config::get('remark_user_option_money'), + 'port' => Config::get('remark_user_option_port'), + 'transfer_enable' => Config::get('remark_user_option_transfer_enable'), + 'passwd' => Config::get('remark_user_option_passwd'), + 'method' => Config::get('remark_user_option_method'), + 'protocol' => Config::get('remark_user_option_protocol'), + 'protocol_param' => Config::get('remark_user_option_protocol_param'), + 'obfs' => Config::get('remark_user_option_obfs'), + 'obfs_param' => Config::get('remark_user_option_obfs_param'), + 'invite_num' => Config::get('remark_user_option_invite_num'), + 'node_group' => Config::get('remark_user_option_node_group'), + 'class' => Config::get('remark_user_option_class'), + 'class_expire' => Config::get('remark_user_option_class_expire'), + 'expire_in' => Config::get('remark_user_option_expire_in'), + 'node_speedlimit' => Config::get('remark_user_option_node_speedlimit'), + 'node_connector' => Config::get('remark_user_option_node_connector'), + ]; + } + + /** + * 待定 + * + * @return mixed + */ + public static function getUserActionMethod() + { + } + + + /** + * 分割字符串 + * + * @param string $Str 源字符串 + * @param string $Delimiter 分割定界符 + * @param int $Quantity 最大返回数量 + * + * @return array + */ + public static function StrExplode($Str, $Delimiter, $Quantity = 10) + { + $return = []; + $Str = trim($Str); + for ($x = 0; $x <= 10; $x++) { + if (strpos($Str, $Delimiter) !== false && count($return) < $Quantity - 1) { + $temp = substr($Str, 0, strpos($Str, $Delimiter)); + $return[] = $temp; + $Str = trim(substr($Str, strlen($temp))); + } else { + $return[] = $Str; + break; + } + } + return $return; + } + + /** + * 查找字符串是否是某个方法的别名 + * + * @param array $MethodGroup 方法别名的数组 + * @param string $Search 被搜索的字符串 + * + * @return string + */ + public static function getOptionMethod($MethodGroup, $Search) + { + $useMethod = ''; + foreach ($MethodGroup as $MethodName => $Remarks) { + if (strlen($MethodName) === strlen($Search)) { + if (stripos($MethodName, $Search) === 0) { + $useMethod = $MethodName; + break; + } + } + if (count($Remarks) >= 1) { + foreach ($Remarks as $Remark) { + if (strlen($Remark) === strlen($Search) && stripos($Remark, $Search) === 0) { + $useMethod = $MethodName; + break 2; + } + } + } + } + return $useMethod; + } + + /** + * 使用 $Value 给定的运算式与 $Source 计算结果 + * + * @param string $Source 源数值 + * @param string $Value 运算式含增改数值 + * @param bool $FloatingNumber 是否格式化为浮点数 + * + * @return string|null + */ + public static function ComputingMethod($Source, $Value, $FloatingNumber = false) + { + if ( + (strpos($Value, '+') === 0 + || + strpos($Value, '-') === 0 + || + strpos($Value, '*') === 0 + || + strpos($Value, '/') === 0) + && + is_numeric(substr($Value, 1)) + ) { + $Source = eval('return $Source ' . substr($Value, 0, 1) . '= ' . substr($Value, 1) . ';'); + } else { + if (is_numeric($Value)) { + $Source = $Value; + } else { + $Source = null; + } + } + if ($Source !== null) { + $Source = ($FloatingNumber === false + ? number_format($Source, 0, '.', '') + : number_format($Source, 2, '.', '')); + } + return $Source; + } + + /** + * 使用 $Value 给定的运算式及流量单位与 $Source 计算结果 + * + * @param string $Source 源数值 + * @param string $Value 运算式含增改数值 + * + * @return int|null + */ + public static function TrafficMethod($Source, $Value) + { + if ( + strpos($Value, '+') === 0 + || + strpos($Value, '-') === 0 + || + strpos($Value, '*') === 0 + || + strpos($Value, '/') === 0 + ) { + $operator = substr($Value, 0, 1); + if (!in_array($operator, ['*', '/'])) { + $number = Tools::flowAutoShowZ(substr($Value, 1)); + } else { + $number = substr($Value, 1, strlen($Value) - 1); + if (!is_numeric($number)) return null; + } + if ($number === null) { + return null; + } + $Source = eval('return $Source ' . $operator . '= ' . $number . ';'); + } else { + if (is_numeric($Value)) { + if ((int) $Value === 0) { + $Source = 0; + } else { + $Source = Tools::flowAutoShowZ($Value . 'KB'); + } + } else { + $Source = Tools::flowAutoShowZ($Value); + } + } + return $Source; + } + + /** + * 字符串数组转 TG HTML 等宽字符串 + * + * @param array $strArray 字符串数组 + * + * @return string + */ + public static function StrArrayToCode($strArray) + { + return implode( + PHP_EOL, + array_map( + function ($item) { + return ('' . $item . ''); + }, + $strArray + ) + ); + } +} diff --git a/config/.config.example.php b/config/.config.example.php index 0c241813..afe5bea4 100644 --- a/config/.config.example.php +++ b/config/.config.example.php @@ -146,6 +146,12 @@ $_ENV['telegram_bot'] = ''; //Telegram Bot 用户名 $_ENV['telegram_group_quiet'] = true; //Telegram Bot 在群组中不回应 $_ENV['telegram_chatid'] = ''; //Telegram 群组会话 ID,把 Bot 拉进群里之后跟他 /ping 一下即可得到。 $_ENV['telegram_request_token'] = ''; //Telegram 机器人请求验证 Key,随意设置,由大小写英文和数字组成,更新这个参数之后请 php xcat setTelegram + +$_ENV['enable_tuling'] = true; //是否开启图灵机器人 +$_ENV['tuling_apikey'] = ''; //图灵机器人 API Key +$_ENV['tuling_apisecert'] = ''; //图灵机器人密钥 + +# 其他选项 $_ENV['group_bound_user'] = false; //仅允许已绑定 Telegram 账户的用户加入 telegram_chatid 设定的群组 $_ENV['allow_to_join_new_groups'] = true; //允许 Bot 加入下方配置之外的群组 $_ENV['group_id_allowed_to_join'] = []; //允许加入的群组 ID,格式为 PHP 数组 @@ -157,9 +163,27 @@ $_ENV['no_user_found'] = '!'; //管理员操作时,找 $_ENV['no_search_value_provided'] = '!'; //管理员操作时,没有提供用户搜索值的回复 $_ENV['data_method_not_found'] = '!'; //管理员操作时,修改数据的字段没有找到的回复 -$_ENV['enable_tuling'] = true; //是否开启图灵机器人 -$_ENV['tuling_apikey'] = ''; //图灵机器人 API Key -$_ENV['tuling_apisecert'] = ''; //图灵机器人密钥 +$_ENV['remark_user_search_email'] = ['邮箱']; //用户搜索字段 email 的别名,可多个,格式为 PHP 数组 +$_ENV['remark_user_search_port'] = ['端口']; //用户搜索字段 port 的别名,可多个,格式为 PHP 数组 + +$_ENV['remark_user_option_is_admin'] = ['管理员']; //用户搜索字段 is_admin 的别名,可多个,格式为 PHP 数组 +$_ENV['remark_user_option_enable'] = ['用户启用']; //用户搜索字段 enable 的别名,可多个,格式为 PHP 数组 +$_ENV['remark_user_option_money'] = ['金钱', '余额']; //用户搜索字段 money 的别名,可多个,格式为 PHP 数组 +$_ENV['remark_user_option_port'] = ['端口']; //用户搜索字段 port 的别名,可多个,格式为 PHP 数组 +$_ENV['remark_user_option_transfer_enable'] = ['流量']; //用户搜索字段 transfer_enable 的别名,可多个,格式为 PHP 数组 +$_ENV['remark_user_option_passwd'] = ['连接密码']; //用户搜索字段 passwd 的别名,可多个,格式为 PHP 数组 +$_ENV['remark_user_option_method'] = ['加密']; //用户搜索字段 method 的别名,可多个,格式为 PHP 数组 +$_ENV['remark_user_option_protocol'] = ['协议']; //用户搜索字段 protocol 的别名,可多个,格式为 PHP 数组 +$_ENV['remark_user_option_protocol_param'] = ['协参', '协议参数']; //用户搜索字段 protocol_param 的别名,可多个,格式为 PHP 数组 +$_ENV['remark_user_option_obfs'] = ['混淆']; //用户搜索字段 obfs 的别名,可多个,格式为 PHP 数组 +$_ENV['remark_user_option_obfs_param'] = ['混参', '混淆参数']; //用户搜索字段 obfs_param 的别名,可多个,格式为 PHP 数组 +$_ENV['remark_user_option_invite_num'] = ['邀请数量']; //用户搜索字段 invite_num 的别名,可多个,格式为 PHP 数组 +$_ENV['remark_user_option_node_group'] = ['用户组', '用户分组']; //用户搜索字段 node_group 的别名,可多个,格式为 PHP 数组 +$_ENV['remark_user_option_class'] = ['等级']; //用户搜索字段 class 的别名,可多个,格式为 PHP 数组 +$_ENV['remark_user_option_class_expire'] = ['等级过期时间']; //用户搜索字段 class_expire 的别名,可多个,格式为 PHP 数组 +$_ENV['remark_user_option_expire_in'] = ['账号过期时间']; //用户搜索字段 expire_in 的别名,可多个,格式为 PHP 数组 +$_ENV['remark_user_option_node_speedlimit'] = ['限速']; //用户搜索字段 node_speedlimit 的别名,可多个,格式为 PHP 数组 +$_ENV['remark_user_option_node_connector'] = ['连接数', '客户端']; //用户搜索字段 node_connector 的别名,可多个,格式为 PHP 数组 //沟通设置-------------------------------------------------------------------------------------------- #客服系统设置,注册地址 https://www.mylivechat.com