diff --git a/app/Utils/TelegramProcess.php b/app/Utils/TelegramProcess.php index 81ba2b14..726f47dc 100644 --- a/app/Utils/TelegramProcess.php +++ b/app/Utils/TelegramProcess.php @@ -41,7 +41,7 @@ class TelegramProcess $bot->sendMessage($user->get_user_attributes("telegram_id"), "两种方法:\n 方法一:\n 1.点击打开以下配置文件\n 2. 选择分享->拷贝到\"Quantumult\"\n 3.选择更新配置\n 方法二:\n 1.长按配置文件\n 2. 选择更多->分享->拷贝\n 3.点击跳转APP,到Quan中保存" , $parseMode = null, $disablePreview = false, $replyToMessageId = null,$replyMarkup=$keyboard); $filepath ='/tmp/tg_'.$ssr_sub_token.'.txt'; $fh = fopen($filepath, 'w+'); - $string = LinkController::GetQuantumult($user,0,3); + $string = LinkController::GetQuantumult($user,3); fwrite($fh, $string); fclose($fh); $bot->sendDocument($user->get_user_attributes("telegram_id"), new \CURLFile($filepath,'','quantumult_'.$ssr_sub_token.'.conf')); diff --git a/app/Utils/URL.php b/app/Utils/URL.php index f9fdfa75..89b4d816 100644 --- a/app/Utils/URL.php +++ b/app/Utils/URL.php @@ -296,7 +296,11 @@ class URL ]; $item['ps'] = $node->name; $item['add'] = $node_explode[0]; - $item['port'] = $node_explode[1]; + if ($node_explode[1]=="0" or $node_explode[1]==""){ + $item['port'] = "443"; + }else{ + $item['port'] = $node_explode[1]; + } $item['id'] = $user->getUuid(); $item['aid'] = $node_explode[2]; $item['net'] = "tcp";