Update index.js

This commit is contained in:
Yu Steven
2022-07-24 22:23:27 +08:00
committed by GitHub
parent 66bc738a0d
commit 9d6625da35

View File

@@ -86,37 +86,28 @@ async function run(){
try{
item.data.ps = (name).toString();
urlCountryList[finalList[i].country].push('vmess://'+Buffer.from(JSON.stringify(item.data),'utf8').toString('base64'))
}catch(e){
console.log('vmess node err')
}
}catch(e){console.log('vmess node err')}
break
case 'trojan':
try{
urlCountryList[finalList[i].country].push('trojan://'+item.data+'#'+(name).toString())
}catch(e){
console.log('trojan node err')
}catch(e){console.log('trojan node err')
}
break
case 'ss':
try{
urlCountryList[finalList[i].country].push('ss://'+item.data+'#'+(name).toString())
}catch(e){
console.log('ss node err')
}
}catch(e){console.log('ss node err')}
break
case 'ssr':
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('ssr node err')
}
}catch(e){console.log('ssr node err')}
break
case 'https':
try{
urlCountryList[finalList[i].country].push('https://'+item.data+'#'+encodeURIComponent(name.toString()))
}catch(e){
console.log('https node err')
}
}catch(e){console.log('https node err')}
break
default:
break