diff --git a/package/ctcgfw/luci-app-jd-dailybonus/Makefile b/package/ctcgfw/luci-app-jd-dailybonus/Makefile index 90f8597a14..6072b71d11 100644 --- a/package/ctcgfw/luci-app-jd-dailybonus/Makefile +++ b/package/ctcgfw/luci-app-jd-dailybonus/Makefile @@ -7,8 +7,8 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-jd-dailybonus LUCI_PKGARCH:=all -PKG_VERSION:=0.8.2 -PKG_RELEASE:=20200719 +PKG_VERSION:=0.8.3 +PKG_RELEASE:=20200804 include $(INCLUDE_DIR)/package.mk diff --git a/package/ctcgfw/luci-app-jd-dailybonus/root/etc/config/jd-dailybonus b/package/ctcgfw/luci-app-jd-dailybonus/root/etc/config/jd-dailybonus index a1cd8d6945..266cd79716 100644 --- a/package/ctcgfw/luci-app-jd-dailybonus/root/etc/config/jd-dailybonus +++ b/package/ctcgfw/luci-app-jd-dailybonus/root/etc/config/jd-dailybonus @@ -1,5 +1,5 @@ config global - option version '1.29' + option version '1.37' option auto_run_time '1' option auto_run '1' option auto_update_time '1' diff --git a/package/ctcgfw/luci-app-jd-dailybonus/root/usr/share/jd-dailybonus/JD_DailyBonus.js b/package/ctcgfw/luci-app-jd-dailybonus/root/usr/share/jd-dailybonus/JD_DailyBonus.js index 79ab738390..59e37bef03 100644 --- a/package/ctcgfw/luci-app-jd-dailybonus/root/usr/share/jd-dailybonus/JD_DailyBonus.js +++ b/package/ctcgfw/luci-app-jd-dailybonus/root/usr/share/jd-dailybonus/JD_DailyBonus.js @@ -2,7 +2,7 @@ 京东多合一签到脚本 -更新时间: 2020.7.18 17:20 v1.29 +更新时间: 2020.8.3 21:50 v1.37 (Beta) 有效接口: 24+ 脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js 电报频道: @NobyDa @@ -98,9 +98,9 @@ var out = 0; //接口超时退出, 用于可能发生的网络不稳定, 0则关 var $nobyda = nobyda(); async function all() { + await JingDongSpeedUp(stop); //京东天天加速 if (stop == 0) { await Promise.all([ - JingDongSpeedUp(stop), //京东天天加速 JingDongBean(stop), //京东京豆 JingRongBean(stop), //金融京豆 JingRongDoll(stop), //金融抓娃娃 @@ -115,6 +115,8 @@ async function all() { JingDongShake(stop) //京东摇一摇 ]); await Promise.all([ + JDUserSignPre(stop, 'JDClocks', '京东商城-钟表'), //京东钟表馆 + JDUserSignPre(stop, 'JDDrug', '京东商城-医药'), //京东医药馆 JDUserSignPre(stop, 'JDVege', '京东商城-菜场'), //京东菜场 JDUserSignPre(stop, 'JDFood', '京东商城-美食'), //京东美食馆 JDUserSignPre(stop, 'JDClean', '京东商城-清洁'), //京东清洁馆 @@ -128,12 +130,13 @@ async function all() { JDUserSignPre(stop, 'JDMakeup', '京东商城-美妆') //京东美妆馆 ]); } else { - await JingDongSpeedUp(stop); //京东天天加速 await JingDongBean(stop); //京东京豆 await JingRongBean(stop); //金融京豆 await JingRongDoll(stop); //金融抓娃娃 await JingRongSteel(stop); //金融钢镚 await JingDongTurn(stop); //京东转盘 + await JDUserSignPre(stop, 'JDClocks', '京东商城-钟表'); //京东钟表馆 + await JDUserSignPre(stop, 'JDDrug', '京东商城-医药'); //京东医药馆 await JDUserSignPre(stop, 'JDGStore', '京东商城-超市'); //京东超市 await JDUserSignPre(stop, 'JDPet', '京东商城-宠物'); //京东宠物馆 await JDFlashSale(stop); //京东闪购 @@ -194,6 +197,7 @@ function notify() { var DName = merge.JDShake.nickname ? merge.JDShake.nickname : "获取失败" var Name = add ? DualAccount ? "【签到号一】: " + DName + "\n" : "【签到号二】: " + DName + "\n" : "" console.log("\n" + Name + one + two + three + four + notify) + move(0, 0, 1) if ($nobyda.isJSBox) { if (add && DualAccount) { Shortcut = Name + one + two + three + "\n" @@ -379,11 +383,48 @@ function JingDongBean(s) { } function JingDongTurn(s) { + return new Promise((resolve, reject) => { + if (disable("JDTurn")) return reject() + const JDTUrl = { + url: 'https://api.m.jd.com/client.action?functionId=wheelSurfIndex&body=%7B%22actId%22%3A%22jgpqtzjhvaoym%22%2C%22appSource%22%3A%22jdhome%22%7D&appid=ld', + headers: { + Cookie: KEY, + } + }; + $nobyda.get(JDTUrl, async function(error, response, data) { + try { + if (error) { + merge.JDTurn.notify = "京东商城-转盘: 登录接口请求失败 ‼️‼️" + merge.JDTurn.fail = 1 + } else { + const cc = JSON.parse(data).data.lotteryCode + const Details = LogDetails ? "response:\n" + data : ''; + if (cc) { + console.log("\n" + "京东商城-转盘查询成功 " + Details) + return resolve(cc) + } else { + merge.JDTurn.notify = "京东商城-转盘: 失败, 原因: 查询错误 ⚠️" + merge.JDTurn.fail = 1 + console.log("\n" + "京东商城-转盘查询失败 " + Details) + } + } + } catch (eor) { + $nobyda.notify("京东转盘-登录" + eor.name + "‼️", JSON.stringify(eor), eor.message) + } finally { + reject() + } + }) + if (out) setTimeout(reject, out + s) + }).then(data => { + return JingDongTurnSign(s, data); + }, () => {}); +} + +function JingDongTurnSign(s, code) { return new Promise(resolve => { - if (disable("JDTurn")) return resolve() setTimeout(() => { const JDTUrl = { - url: 'https://api.m.jd.com/client.action?functionId=lotteryDraw&body=%7B%22actId%22%3A%22jgpqtzjhvaoym%22%2C%22appSource%22%3A%22jdhome%22%2C%22lotteryCode%22%3A%224wwzdq7wkqx2usx4g5i2nu5ho4auto4qxylblkxacm7jqdsltsepmgpn3b2hgyd7hiawzpccizuck%22%7D&appid=ld', + url: `https://api.m.jd.com/client.action?functionId=lotteryDraw&body=%7B%22actId%22%3A%22jgpqtzjhvaoym%22%2C%22appSource%22%3A%22jdhome%22%2C%22lotteryCode%22%3A%22${code}%22%7D&appid=ld`, headers: { Cookie: KEY, } @@ -411,7 +452,7 @@ function JingDongTurn(s) { merge.JDTurn.success += 1 merge.JDTurn.bean += Number(cc.data.prizeSendNumber) if (cc.data.chances != "0") { - await JingDongTurn(2000) + await JingDongTurnSign(2000, code) } } else { console.log("\n" + "京东商城-转盘签到失败 " + Details) @@ -419,7 +460,7 @@ function JingDongTurn(s) { merge.JDTurn.notify += merge.JDTurn.notify ? "\n京东商城-转盘: 成功, 状态: 未中奖 🐶 (多次)" : "京东商城-转盘: 成功, 状态: 未中奖 🐶" merge.JDTurn.success += 1 if (cc.data.chances != "0") { - await JingDongTurn(2000) + await JingDongTurnSign(2000, code) } } else if (data.match(/(T215|次数为0)/)) { merge.JDTurn.notify = "京东商城-转盘: 失败, 原因: 已转过 ⚠️" @@ -462,26 +503,26 @@ function JingRongBean(s) { $nobyda.post(login, async function(error, response, data) { try { if (error) { - merge.JRBean.notify = "京东金融-京豆: 登录接口请求失败 ‼️‼️" + merge.JRBean.notify = "京东金融-金贴: 登录接口请求失败 ‼️‼️" merge.JRBean.fail = 1 } else { const Details = LogDetails ? "response:\n" + data : ''; if (data.match(/\"login\":true/)) { - console.log("\n" + "京东金融-京豆登录成功 " + Details) + console.log("\n" + "京东金融-金贴登录成功 " + Details) await JRBeanCheckin(200) } else { - console.log("\n" + "京东金融-京豆登录失败 " + Details) + console.log("\n" + "京东金融-金贴登录失败 " + Details) if (data.match(/\"login\":false/)) { - merge.JRBean.notify = "京东金融-京豆: 失败, 原因: Cookie失效‼️" + merge.JRBean.notify = "京东金融-金贴: 失败, 原因: Cookie失效‼️" merge.JRBean.fail = 1 } else { - merge.JRBean.notify = "京东金融-京豆: 登录接口需修正 ‼️‼️" + merge.JRBean.notify = "京东金融-金贴: 登录接口需修正 ‼️‼️" merge.JRBean.fail = 1 } } } } catch (eor) { - $nobyda.notify("京东金融-京豆登录" + eor.name + "‼️", JSON.stringify(eor), eor.message) + $nobyda.notify("京东金融-金贴登录" + eor.name + "‼️", JSON.stringify(eor), eor.message) } finally { resolve() } @@ -506,39 +547,39 @@ function JRBeanCheckin(s) { $nobyda.post(JRBUrl, function(error, response, data) { try { if (error) { - merge.JRBean.notify = "京东金融-京豆: 签到接口请求失败 ‼️‼️" + merge.JRBean.notify = "京东金融-金贴: 签到接口请求失败 ‼️‼️" merge.JRBean.fail = 1 } else { const c = JSON.parse(data) const Details = LogDetails ? "response:\n" + data : ''; if (data.match(/\"resultCode\":\"00000\"/)) { - console.log("\n" + "京东金融-京豆签到成功 " + Details) + console.log("\n" + "京东金融-金贴签到成功 " + Details) if (c.resultData.data.rewardAmount != "0") { - merge.JRBean.notify = "京东金融-京豆: 成功, 明细: " + c.resultData.data.rewardAmount + "京豆 🐶" + merge.JRBean.notify = "京东金融-金贴: 成功, 明细: " + c.resultData.data.rewardAmount + "金贴 💰" merge.JRBean.success = 1 - merge.JRBean.bean = c.resultData.data.rewardAmount + //merge.JRBean.bean = c.resultData.data.rewardAmount } else { - merge.JRBean.notify = "京东金融-京豆: 成功, 明细: 无奖励 🐶" + merge.JRBean.notify = "京东金融-金贴: 成功, 明细: 无奖励 🐶" merge.JRBean.success = 1 } } else { - console.log("\n" + "京东金融-京豆签到失败 " + Details) + console.log("\n" + "京东金融-金贴签到失败 " + Details) if (data.match(/(发放失败|70111)/)) { - merge.JRBean.notify = "京东金融-京豆: 失败, 原因: 已签过 ⚠️" + merge.JRBean.notify = "京东金融-金贴: 失败, 原因: 已签过 ⚠️" merge.JRBean.fail = 1 } else { if (data.match(/(\"resultCode\":3|请先登录)/)) { - merge.JRBean.notify = "京东金融-京豆: 失败, 原因: Cookie失效‼️" + merge.JRBean.notify = "京东金融-金贴: 失败, 原因: Cookie失效‼️" merge.JRBean.fail = 1 } else { - merge.JRBean.notify = "京东金融-京豆: 失败, 原因: 未知 ⚠️" + merge.JRBean.notify = "京东金融-金贴: 失败, 原因: 未知 ⚠️" merge.JRBean.fail = 1 } } } } } catch (eor) { - $nobyda.notify("京东金融-京豆" + eor.name + "‼️", JSON.stringify(eor), eor.message) + $nobyda.notify("京东金融-金贴" + eor.name + "‼️", JSON.stringify(eor), eor.message) } finally { resolve() } @@ -750,7 +791,7 @@ function JDUserSignPre(s, key, title) { function JDUserSignPre1(s, key, title) { return new Promise((resolve, reject) => { - if (disable(key)) return reject() + if (disable(key, title, 1)) return reject() //setTimeout(() => { const JDUrl = { url: 'https://api.m.jd.com/?client=wh5&functionId=qryH5BabelFloors', @@ -766,6 +807,7 @@ function JDUserSignPre1(s, key, title) { merge[key].notify = `${title}: 签到活动获取失败 ‼️‼️` merge[key].fail = 1 } else { + const turnTableId = data.match(/\"turnTableId\":\"(\d+)\"/) if (data.match(/enActK/)) { // 含有签到活动数据 const od = JSON.parse(data); let params = (od.floatLayerList || []).filter(o => o.params && o.params.match(/enActK/)).map(o => o.params).pop(); @@ -790,41 +832,8 @@ function JDUserSignPre1(s, key, title) { }); // 执行签到处理 return; } - } - merge[key].notify = `${title}: 失败, 原因: 不含活动数据 ⚠️` - merge[key].fail = 1 - } - } catch (eor) { - $nobyda.notify(`${title}${eor.name} ‼️`, JSON.stringify(eor), eor.message) - } finally { - reject() - } - }) - //}, s) - if (out) setTimeout(reject, out + s) - }).then(data => { - return JDUserSign(s, key, title, encodeURIComponent(JSON.stringify(data))); - }, () => {}); -} - -function JDUserSignPre2(s, key, title) { - return new Promise((resolve, reject) => { - if (disable(key)) return reject() - //setTimeout(() => { - const JDUrl = { - url: `https://pro.m.jd.com/mall/active/${acData[key]}/index.html`, - headers: { - Cookie: KEY, - } - }; - $nobyda.get(JDUrl, function(error, response, data) { - try { - if (error) { - merge[key].notify = `${title}: 签到活动获取失败 ‼️‼️` - merge[key].fail = 1 - } else { - if (data.match(/"params":"{\\"enActK\\".*?\\"}"/)) { // 含有签到活动数据 - resolve(`{${data.match(/"params":"{\\"enActK\\".*?\\"}"/)}}`); // 执行签到处理 + } else if (turnTableId) { + reject(turnTableId[1]) return; } merge[key].notify = `${title}: 失败, 原因: 不含活动数据 ⚠️` @@ -839,11 +848,59 @@ function JDUserSignPre2(s, key, title) { //}, s) if (out) setTimeout(reject, out + s) }).then(data => { - return JDUserSign(s, key, title, encodeURIComponent(data)); - }, () => {}); + disable(key, title, 2) + return JDUserSign1(s, key, title, encodeURIComponent(JSON.stringify(data))); + }).catch(err => { + disable(key, title, 2) + if (err) return JDUserSign2(s, key, title, err) + }) } -function JDUserSign(s, key, title, body) { +function JDUserSignPre2(s, key, title) { + return new Promise((resolve, reject) => { + if (disable(key, title, 1)) return reject() + //setTimeout(() => { + const JDUrl = { + url: `https://pro.m.jd.com/mall/active/${acData[key]}/index.html`, + headers: { + Cookie: KEY, + } + }; + $nobyda.get(JDUrl, function(error, response, data) { + try { + if (error) { + merge[key].notify = `${title}: 签到活动获取失败 ‼️‼️` + merge[key].fail = 1 + } else { + const turnTable = data.match(/\"turnTableId\":\"(\d+)\"/) + if (data.match(/"params":"{\\"enActK\\".*?\\"}"/)) { // 含有签到活动数据 + resolve(`{${data.match(/"params":"{\\"enActK\\".*?\\"}"/)}}`); // 执行签到处理 + return; + } else if (turnTable) { + reject(turnTable[1]) + return; + } + merge[key].notify = `${title}: 失败, 原因: 不含活动数据 ⚠️` + merge[key].fail = 1 + } + } catch (eor) { + $nobyda.notify(`${title}${eor.name} ‼️`, JSON.stringify(eor), eor.message) + } finally { + reject() + } + }) + //}, s) + if (out) setTimeout(reject, out + s) + }).then(data => { + disable(key, title, 2) + return JDUserSign1(s, key, title, encodeURIComponent(data)); + }).catch(err => { + disable(key, title, 2) + if (err) return JDUserSign2(s, key, title, err) + }) +} + +function JDUserSign1(s, key, title, body) { return new Promise(resolve => { setTimeout(() => { const JDUrl = { @@ -863,7 +920,7 @@ function JDUserSign(s, key, title, body) { const Details = LogDetails ? `response:\n${data}` : ''; const cc = JSON.parse(data) if (data.match(/签到成功/)) { - console.log(`\n${title}签到成功${Details}`) + console.log(`\n${title}签到成功(1)${Details}`) if (data.match(/(\"text\":\"\d+京豆\")/)) { let beanQuantity = cc.awardList[0].text.match(/\d+/) merge[key].notify = `${title}: 成功, 明细: ${beanQuantity}京豆 🐶` @@ -874,7 +931,7 @@ function JDUserSign(s, key, title, body) { merge[key].success = 1 } } else { - console.log(`\n${title}签到失败 ${Details}`) + console.log(`\n${title}签到失败(1)${Details}`) if (data.match(/(已签到|已领取)/)) { merge[key].notify = `${title}: 失败, 原因: 已签过 ⚠️` merge[key].fail = 1 @@ -905,6 +962,59 @@ function JDUserSign(s, key, title, body) { }); } +function JDUserSign2(s, key, title, tid) { + return new Promise(resolve => { + setTimeout(() => { + const JDUrl = { + url: 'https://jdjoy.jd.com/api/turncard/channel/sign', + headers: { + "Content-Type": "application/x-www-form-urlencoded", + Cookie: KEY, + }, + body: `turnTableId=${tid}` + }; + $nobyda.post(JDUrl, function(error, response, data) { + try { + if (error) { + merge[key].notify = `${title}: 签到接口请求失败 ‼️‼️` + merge[key].fail = 1 + } else { + const Details = LogDetails ? `response:\n${data}` : ''; + const cc = JSON.parse(data) + if (cc.success == true) { + console.log(`\n${title}签到成功(2)${Details}`) + if (data.match(/\"jdBeanQuantity\":\d+/)) { + merge[key].notify = `${title}: 成功, 明细: ${cc.data.jdBeanQuantity}京豆 🐶` + merge[key].bean = cc.data.jdBeanQuantity + } else { + merge[key].notify = `${title}: 成功, 明细: 无京豆 🐶` + } + merge[key].success = 1 + } else { + console.log(`\n${title}签到失败(2)${Details}`) + if (data.match(/(已经签到|已经领取)/)) { + merge[key].notify = `${title}: 失败, 原因: 已签过 ⚠️` + } else if (data.match(/(不存在|已结束|未开始)/)) { + merge[key].notify = `${title}: 失败, 原因: 活动已结束 ⚠️` + } else if (data.match(/(没有登录|B0001)/)) { + merge[key].notify = `${title}: 失败, 原因: Cookie失效‼️` + } else { + merge[key].notify = `${title}: 失败, 原因: 未知 ⚠️` + } + merge[key].fail = 1 + } + } + } catch (eor) { + $nobyda.notify(`${title}${eor.name} ‼️`, JSON.stringify(eor), eor.message) + } finally { + resolve() + } + }) + }, s) + if (out) setTimeout(resolve, out + s) + }); +} + function JDFlashSale(s) { return new Promise(resolve => { if (disable("JDFSale")) return resolve() @@ -1092,11 +1202,40 @@ function JingDongCash(s) { } function JDMagicCube(s) { + return new Promise((resolve, reject) => { + if (disable("JDCube")) return reject() + const JDUrl = { + url: 'https://api.m.jd.com/client.action?functionId=getNewsInteractionInfo&appid=smfe', + headers: { + Cookie: KEY, + } + }; + $nobyda.get(JDUrl, function(error, response, data) { + try { + if (!error && data.match(/\"interactionId\":\d+/)) { + const Details = LogDetails ? "response:\n" + data : ''; + merge.JDCube.key = data.match(/\"interactionId\":(\d+)/)[1] + console.log("\n京东魔方-查询活动成功 " + Details) + } else { + console.log("\n京东魔方-查询活动失败 ") + } + } catch (eor) { + $nobyda.notify("京东魔方-查询" + eor.name + "‼️", JSON.stringify(eor), eor.message) + } finally { + resolve(merge.JDCube.key) + } + }) + if (out) setTimeout(reject, out + s) + }).then(data => { + return JDMagicCubeSign(s, data) + }, () => {}); +} + +function JDMagicCubeSign(s, id) { return new Promise(resolve => { - if (disable("JDCube")) return resolve() setTimeout(() => { const JDMCUrl = { - url: 'https://api.m.jd.com/client.action?functionId=getNewsInteractionLotteryInfo&appid=smfe', + url: `https://api.m.jd.com/client.action?functionId=getNewsInteractionLotteryInfo&appid=smfe${id ? `&body=%7B%22interactionId%22%3A${id}%7D` : ``}`, headers: { Cookie: KEY, } @@ -1400,9 +1539,9 @@ function JDReceiveTask(s, CID) { Cookie: KEY } }; - count += 1 $nobyda.get(TUrl, function(error, response, data) { try { + count++ if (error) { console.log("\n天天加速-领取道具请求失败 ‼️‼️") } else { @@ -1495,9 +1634,9 @@ function JDUseProps(s, PropID) { Cookie: KEY } }; - PropCount += 1 $nobyda.get(PropUrl, function(error, response, data) { try { + PropCount++ if (error) { console.log("\n天天加速-使用道具请求失败 ‼️‼️") } else { @@ -1804,17 +1943,66 @@ function TotalCash() { }); } -function disable(name) { - const read = $nobyda.read("JD_DailyBonusDisable") - if (read === "" || read && read.indexOf(name) == -1) { +function disable(Val, name, way) { + const read = $nobyda.read("JD_DailyBonusDisables") + const annal = $nobyda.read("JD_Crash_" + Val) + const boxds = $nobyda.read("JD_Crash_disable") === "false" ? false : true + const old = (Val == "JDDrug" || Val == "JDClocks" || way == 2) ? false : move(Val, read, 0) + if (annal && way == 1 && boxds) { + var Crash = $nobyda.write("", "JD_Crash_" + Val) + if (read) { + if (read.indexOf(Val) == -1) { + var Crash = $nobyda.write(`${read},${Val}`, "JD_DailyBonusDisables") + $nobyda.notify("京东签到 ⚠️", "", `检测到上次执行"${name}"意外崩溃\n已为您自动禁用该接口, 如需开启请前往BoxJs`) + } + } else { + var Crash = $nobyda.write(Val, "JD_DailyBonusDisables") + $nobyda.notify("京东签到 ⚠️", "", `检测到上次执行"${name}"意外崩溃\n已为您自动禁用该接口, 如需开启请前往BoxJs`) + } + return true + } else if (way == 1 && boxds) { + var Crash = $nobyda.write(name, "JD_Crash_" + Val) + } else if (way == 2 && annal) { + var Crash = $nobyda.write("", "JD_Crash_" + Val) + } + if (read && read.indexOf(Val) != -1 || old) { return true } else { return false } } + +function move(ValKey, NewKey, DelOld) { + const OldKey = $nobyda.read("JD_DailyBonusDisable") + if (DelOld && OldKey) { + if (OldKey.split(",").length != 28) { + $nobyda.notify("京东签到", "BoxJs禁用迁移成功", "请更新京东BoxJs订阅以适配新版本") + } + var Crash = $nobyda.write("", "JD_DailyBonusDisable") + return true + } + if (OldKey && OldKey.indexOf(ValKey) == -1) { + console.log(`\nBoxJs禁用迁移成功 (${ValKey})`) + if (NewKey) { + if (NewKey.indexOf(ValKey) == -1) { + var Crash = $nobyda.write(`${NewKey},${ValKey}`, "JD_DailyBonusDisables") + } + } else { + var Crash = $nobyda.write(ValKey, "JD_DailyBonusDisables") + } + return true + } else { + return false + } +} + function initial() { acData = { + // 京东商城-钟表 + JDClocks: '2BcJPCVVzMEtMUynXkPscCSsx68W', + // 京东商城-医药 + JDDrug: '3tqTG5sF1xCUyC6vgEF5CLCxGn7w', // 京东商城-超市 JDGStore: 'aNCM6yrzD6qp1Vvh5YTzeJtk7cM', // 京东商城-宠物 @@ -1843,11 +2031,12 @@ function initial() { SpeedUp: {}, JDBean: {}, JDTurn: {}, - JRBean: {}, JRDoll: {}, JRDSign: {}, JDGStore: {}, JDPet: {}, + JDDrug: {}, + JDClocks: {}, JDFSale: {}, JDBook: {}, JDShand: {}, @@ -1862,6 +2051,7 @@ function initial() { JDCube: {}, JDPrize: {}, JRSteel: {}, + JRBean: {}, subsidy: {}, JDCash: {}, JDShake: {} diff --git a/package/ctcgfw/luci-app-jd-dailybonus/root/usr/share/jd-dailybonus/newapp.sh b/package/ctcgfw/luci-app-jd-dailybonus/root/usr/share/jd-dailybonus/newapp.sh index 65116336da..c95116fc5f 100755 --- a/package/ctcgfw/luci-app-jd-dailybonus/root/usr/share/jd-dailybonus/newapp.sh +++ b/package/ctcgfw/luci-app-jd-dailybonus/root/usr/share/jd-dailybonus/newapp.sh @@ -77,7 +77,7 @@ fill_cookie() { fi } -remote_ver=$(cat $TEMP_SCRIPT | sed -n '/更新时间/p' | awk '{print $NF}' | sed 's/v//') +remote_ver=$(cat $TEMP_SCRIPT | sed -n '/更新时间/p' | awk '{for (i=1;i<=NF;i++){if ($i ~/v/) {print $i}}}' | sed 's/v//') local_ver=$(uci_get_by_type global version) add_cron() { diff --git a/package/lean/luci-app-softethervpn/Makefile b/package/lean/luci-app-softethervpn/Makefile index 236ed1e7ba..26b75d2daf 100644 --- a/package/lean/luci-app-softethervpn/Makefile +++ b/package/lean/luci-app-softethervpn/Makefile @@ -9,7 +9,7 @@ LUCI_TITLE:=LuCI support for SoftEtherVPN LUCI_DEPENDS:=+zlib +libpthread +librt +libreadline +libncurses +libiconv-full +kmod-tun +libopenssl +softethervpn5-bridge +softethervpn5-client +softethervpn5-server LUCI_PKGARCH:=all PKG_VERSION:=1.0 -PKG_RELEASE:=3 +PKG_RELEASE:=4 include $(TOPDIR)/feeds/luci/luci.mk diff --git a/package/lean/luci-app-softethervpn/root/etc/init.d/softethervpn b/package/lean/luci-app-softethervpn/root/etc/init.d/softethervpn index d724d5b8c5..479f00d1a7 100755 --- a/package/lean/luci-app-softethervpn/root/etc/init.d/softethervpn +++ b/package/lean/luci-app-softethervpn/root/etc/init.d/softethervpn @@ -32,6 +32,15 @@ start() config_load softethervpn config_foreach get_config softether [ $enable -ne 1 ] && exit 0 + + [ -d /var/softethervpn ] || mkdir -p -m 0775 /var/softethervpn + + [ -f /var/softethervpn/hamcore.se2 ] || ln -sf /usr/libexec/softethervpn/hamcore.se2 /var/softethervpn/ + [ -f /var/softethervpn/lang.config ] || ln -sf /usr/libexec/softethervpn/lang.config /var/softethervpn/ + + [ -f /var/softethervpn/vpnserver ] || ln -sf /usr/libexec/softethervpn/vpnserver /var/softethervpn/ + [ -f /var/softethervpn/vpn_server.config ] || ln -sf /usr/libexec/softethervpn/vpn_server.config /var/softethervpn/ + logger -t 'softethervpn' "Starting softether vpnserver service." /usr/bin/env LANG=en_US.UTF-8 /usr/libexec/softethervpn/vpnserver start > /dev/null 2>&1 fw3 reload diff --git a/package/lienol/luci-app-passwall/root/usr/share/passwall/rules/proxy_host b/package/lienol/luci-app-passwall/root/usr/share/passwall/rules/proxy_host index a59a361d67..2d26e3c029 100644 --- a/package/lienol/luci-app-passwall/root/usr/share/passwall/rules/proxy_host +++ b/package/lienol/luci-app-passwall/root/usr/share/passwall/rules/proxy_host @@ -47,19 +47,22 @@ footprint.net formyip.com fox.com gamer.com.tw +gandi.net ggpht.com github-production-release-asset-2e65be.s3.amazonaws.com -githubapp.com -githubassets.com github.com github.io +githubapp.com +githubassets.com githubusercontent.com +gnews.org go.com googleapis.com googletagmanager.com googleusercontent.com googlevideo.com gstatic.com +gvt2.com happyon.jp hbo.com hbogo.com @@ -73,6 +76,7 @@ hulustream.com ifconfig.co imrworldwide.com ip2location.com +justmysocks.net level3.net line.me llnwd.net @@ -83,6 +87,7 @@ movetv.com msi.com mtv.com mtvnservices.com +mytvsuper.com naver.com naver.jp nbc.com @@ -90,6 +95,7 @@ nbcuni.com netflix.com netflix.net nflxext.com +nflximg.com nflximg.net nflxso.net nflxvideo.net @@ -115,6 +121,7 @@ theplatform.com ttvnw.net turner.com turnin.com +tvb.com twitch.tv uplynk.com vudu.com @@ -122,5 +129,6 @@ warnerbros.com wdtvlive.com www.bbc.co.uk xboxlive.com +youtu.be youtube.com ytimg.com diff --git a/package/ntlf9t/smartdns/Makefile b/package/ntlf9t/smartdns/Makefile index be547b4888..40c6507055 100644 --- a/package/ntlf9t/smartdns/Makefile +++ b/package/ntlf9t/smartdns/Makefile @@ -16,12 +16,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=smartdns -PKG_VERSION:=5.2020.10 +PKG_VERSION:=8.2020.03 PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/pymumu/smartdns.git -PKG_SOURCE_VERSION:=ce46ac58a7a30e122566e75438d1ddbb0d569f9a +PKG_SOURCE_VERSION:=c23ec7ea8f6c075fef7d4f8c82c5771ca1bd3567 PKG_MAINTAINER:=Nick Peng PKG_LICENSE:=GPL-3.0-or-later diff --git a/scripts/dump-target-info.pl b/scripts/dump-target-info.pl new file mode 100755 index 0000000000..aa97f8d603 --- /dev/null +++ b/scripts/dump-target-info.pl @@ -0,0 +1,91 @@ +#!/usr/bin/env perl + +use strict; +use warnings; +use Cwd; + +my (%targets, %architectures); + +$ENV{'TOPDIR'} = Cwd::getcwd(); + + +sub parse_targetinfo { + my ($target_dir, $subtarget) = @_; + + if (open M, "make -C '$target_dir' --no-print-directory DUMP=1 TARGET_BUILD=1 SUBTARGET='$subtarget' |") { + my ($target_name, $target_arch, @target_features); + while (defined(my $line = readline M)) { + chomp $line; + + if ($line =~ /^Target: (.+)$/) { + $target_name = $1; + } + elsif ($line =~ /^Target-Arch-Packages: (.+)$/) { + $target_arch = $1; + } + elsif ($line =~ /^Target-Features: (.+)$/) { + @target_features = split /\s+/, $1; + } + elsif ($line =~ /^@\@$/) { + if ($target_name && $target_arch && + !grep { $_ eq 'broken' or $_ eq 'source-only' } @target_features) { + $targets{$target_name} = $target_arch; + $architectures{$target_arch} ||= []; + push @{$architectures{$target_arch}}, $target_name; + } + + undef $target_name; + undef $target_arch; + @target_features = (); + } + } + close M; + } +} + +sub get_targetinfo { + foreach my $target_makefile (glob "target/linux/*/Makefile") { + my ($target_dir) = $target_makefile =~ m!^(.+)/Makefile$!; + my @subtargets; + + if (open M, "make -C '$target_dir' --no-print-directory DUMP=1 TARGET_BUILD=1 val.FEATURES V=s 2>/dev/null |") { + if (defined(my $line = readline M)) { + chomp $line; + if (grep { $_ eq 'broken' or $_ eq 'source-only' } split /\s+/, $line) { + next; + } + } + } + + if (open M, "make -C '$target_dir' --no-print-directory DUMP=1 TARGET_BUILD=1 val.SUBTARGETS V=s 2>/dev/null |") { + if (defined(my $line = readline M)) { + chomp $line; + @subtargets = split /\s+/, $line; + } + close M; + } + + push @subtargets, 'generic' if @subtargets == 0; + + foreach my $subtarget (@subtargets) { + parse_targetinfo($target_dir, $subtarget); + } + } +} + +if (@ARGV == 1 && $ARGV[0] eq 'targets') { + get_targetinfo(); + foreach my $target_name (sort keys %targets) { + printf "%s %s\n", $target_name, $targets{$target_name}; + } +} +elsif (@ARGV == 1 && $ARGV[0] eq 'architectures') { + get_targetinfo(); + foreach my $target_arch (sort keys %architectures) { + printf "%s %s\n", $target_arch, join ' ', @{$architectures{$target_arch}}; + } +} +else { + print "Usage: $0 targets\n"; + print "Usage: $0 architectures\n"; +}