更新 'clash.js'
This commit is contained in:
parent
aa91f3903f
commit
57457bcfa0
3
clash.js
3
clash.js
@ -13,7 +13,7 @@ module.exports.parse = async(raw, utils, meta) => {
|
||||
|
||||
// 配置预先规则
|
||||
async function configPrependRules(utils, obj) {
|
||||
const { axios } = utils
|
||||
const { axios,console } = utils
|
||||
const proxyGroupName = getProxyGroupName(obj)
|
||||
const directGroupName = getDirectGroupName(obj)
|
||||
try {
|
||||
@ -22,6 +22,7 @@ async function configPrependRules(utils, obj) {
|
||||
const prependDirectRules = directs.split(`\n`).map(item => `DOMAIN-SUFFIX,${item},${directGroupName}`)
|
||||
const proxyResponse = await axios.get('https://git.yevpt.com/vpt/public-data/raw/branch/master/proxy')
|
||||
const proxys = proxyResponse.data
|
||||
console.log('proxys',proxys.split(`\n`))
|
||||
const prependProxyRules = proxys.split(`\n`).map(item => `DOMAIN-SUFFIX,${item},${proxyGroupName}`)
|
||||
const prependRules = [...prependDirectRules, ...prependProxyRules]
|
||||
obj.rules = [...prependRules, ...obj.rules]
|
||||
|
Loading…
Reference in New Issue
Block a user