From 999bb3e57b2952f1f93ce443f3c56a40f070e5a3 Mon Sep 17 00:00:00 2001 From: Yu Steven <78414278+yu-steven@users.noreply.github.com> Date: Sun, 3 Jul 2022 09:53:35 +0800 Subject: [PATCH] Update index.js --- utils/rm/index.js | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/utils/rm/index.js b/utils/rm/index.js index 1d786cce0..c2bcda300 100755 --- a/utils/rm/index.js +++ b/utils/rm/index.js @@ -89,8 +89,11 @@ async function run(){ } switch (item.type){ case 'vmess': + try{ item.data.ps = (name).toString(); - urlCountryList[finalList[i].country].push('vmess://'+Buffer.from(JSON.stringify(item.data),'utf8').toString('base64')); + urlCountryList[finalList[i].country].push('vmess://'+Buffer.from(JSON.stringify(item.data),'utf8').toString('base64'))}catch(e){ + console.log('err') + } break case 'trojan': try{ @@ -99,13 +102,22 @@ async function run(){ } break case 'ss': - urlCountryList[finalList[i].country].push('ss://'+item.data+'#'+(name).toString()) + try{ + urlCountryList[finalList[i].country].push('ss://'+item.data+'#'+(name).toString())}catch(e){ + console.log('err') + } break case 'ssr': - urlCountryList[finalList[i].country].push('ssr://'+Buffer.from(item.data.replace('{name}',Buffer.from((name).toString(),'utf8').toString('base64')),'utf8').toString('base64')); + try{ + urlCountryList[finalList[i].country].push('ssr://'+Buffer.from(item.data.replace('{name}',Buffer.from((name).toString(),'utf8').toString('base64')),'utf8').toString('base64'))}catch(e){ + console.log('err') + } break case 'https': - urlCountryList[finalList[i].country].push('https://'+item.data+'#'+encodeURIComponent(name.toString())) + try{ + urlCountryList[finalList[i].country].push('https://'+item.data+'#'+encodeURIComponent(name.toString()))}catch(e){ + console.log('err') + } break default: break