mirror of
https://github.com/6dylan6/jdpro.git
synced 2026-04-20 11:03:08 +08:00
Compare commits
564 Commits
ee67722bc6
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| d91c1ce6fe | |||
| 38fe4ad34d | |||
| e255d3706e | |||
| 5169401404 | |||
| 39cb92f545 | |||
| c439d2e77c | |||
| b852ab7489 | |||
| f2285065c0 | |||
| 361554024f | |||
| 13b6f80c1f | |||
| b1bb5d879f | |||
| 01b40d435a | |||
| 561e7aaf4a | |||
| db981492e1 | |||
| 4ee3c083df | |||
| 3144fe64a1 | |||
| c19e94df9e | |||
| 5e8850e81a | |||
| ada5c0dd51 | |||
| ea64567767 | |||
| 2ee30f3b84 | |||
| 7d4472a8ac | |||
| 6d5fe77c5e | |||
| e728927401 | |||
| f08a56079e | |||
| 951abf235a | |||
| 450c249063 | |||
| e89b3bc2fa | |||
| b2aa5ca3f3 | |||
| 7f31ff7aab | |||
| 72cc19a641 | |||
| 33f5903873 | |||
| 30c3a8cf67 | |||
| 1093ca3752 | |||
| 43ca0e135f | |||
| 5d6b5d8845 | |||
| 133ae840a1 | |||
| b05884a596 | |||
| 826b66f81e | |||
| a3c45e6b2a | |||
| d7403519a1 | |||
| 8d61fd7d16 | |||
| da58509aae | |||
| ce3a4c2118 | |||
| 6a640fd61d | |||
| e4593d5dc5 | |||
| 1eaaca4e89 | |||
| fea7f4eb75 | |||
| be7cd06310 | |||
| 95c3a84556 | |||
| 0c343bbda1 | |||
| 7ccda18c71 | |||
| 6a5b1360fa | |||
| 2551bd3ed9 | |||
| abe8059e08 | |||
| 077e0b94c1 | |||
| ab316c78e0 | |||
| 896c96109d | |||
| ece4f3db2b | |||
| ef291b8165 | |||
| 1dec37d56d | |||
| 1ab137bca9 | |||
| 8fa8783786 | |||
| 234131c797 | |||
| 26c47a7e35 | |||
| 3f37a3587a | |||
| 6f6262b49b | |||
| 32a033070e | |||
| 32208eae50 | |||
| ec99be4409 | |||
| bcfe4127a8 | |||
| c7a3d94606 | |||
| f7c9d1821a | |||
| 3131468e7d | |||
| 7eede3aa1f | |||
| 0ae8b920e2 | |||
| ad7a717da0 | |||
| 0c66ae3895 | |||
| 7087e80862 | |||
| 1119558463 | |||
| 52ca5ddc78 | |||
| af1523f08b | |||
| 2158937781 | |||
| 752dcfcb8b | |||
| 2939de229d | |||
| 2bd749047c | |||
| 808f560c95 | |||
| 71bb755217 | |||
| 3b768b8e1a | |||
| fc8c1fee10 | |||
| 55e86d7ee2 | |||
| 6ed1176de1 | |||
| 6b9a9583bd | |||
| 625c482688 | |||
| 5f4fac7555 | |||
| 2f715c1838 | |||
| 2db252130e | |||
| 4f49285c4b | |||
| 1b46ee8585 | |||
| 3661cd34bf | |||
| ad42d730f8 | |||
| 149f0bbb77 | |||
| 850f5f2c4e | |||
| eccd8760e9 | |||
| e31f3fbd9f | |||
| c01447900b | |||
| 5e838d8528 | |||
| d197aa4c6e | |||
| f5a98d374d | |||
| 00c006fd36 | |||
| 3a3f729d7b | |||
| d35d5278a5 | |||
| 90d8e31177 | |||
| a3abb73aa5 | |||
| 8eea7fb15d | |||
| e2f76413f9 | |||
| 80d505969f | |||
| 5d60cf1e5f | |||
| 8fbeb62052 | |||
| 513d620773 | |||
| bb3d7b2dca | |||
| 319d39a3cf | |||
| 14dc1e4db8 | |||
| ff044abe04 | |||
| 6911068357 | |||
| a128dece3e | |||
| 6067d9ca9d | |||
| 12eb51a092 | |||
| 509781642e | |||
| 8f837336bd | |||
| 0a4614d879 | |||
| 2bbc81d603 | |||
| 5ea6f0adf1 | |||
| dd454bcb36 | |||
| a120e4fbf6 | |||
| b39ae93762 | |||
| 3f212031fa | |||
| 86b67f88a7 | |||
| a755e08224 | |||
| ab19829c3a | |||
| 845b3f7ee3 | |||
| 611d895365 | |||
| 8bb35f5bc4 | |||
| 781d601cd5 | |||
| 9131aaf6ac | |||
| 17965ff444 | |||
| bbb61255c2 | |||
| a77910f822 | |||
| 55e3d76bb9 | |||
| bf569d705f | |||
| fa9a5e53a6 | |||
| 519dfc9be1 | |||
| a13b711475 | |||
| 077b62524e | |||
| 6f65c38050 | |||
| 253017407e | |||
| 19b7812eeb | |||
| c429dce94c | |||
| 7aed35acd1 | |||
| a7a6773d51 | |||
| 7ff1b50b82 | |||
| 2243de3e98 | |||
| 04b95add8b | |||
| 02150d7a3f | |||
| 126c811708 | |||
| bd44703b7d | |||
| c3e86ddcc0 | |||
| 40e02af4fe | |||
| 21dc6c7479 | |||
| bc0cc7cf12 | |||
| 86116a5ff9 | |||
| 362bf95746 | |||
| 4f782b1561 | |||
| 9f8dbb69fd | |||
| d78abb05ff | |||
| 700ceb9d60 | |||
| 857a8f993b | |||
| 7dd7759288 | |||
| 60100076d5 | |||
| 70fb59f462 | |||
| e2a71a6b1b | |||
| eeff7a7005 | |||
| a8f081dc49 | |||
| a86598aea7 | |||
| ad48e3f6db | |||
| 602925310e | |||
| c8c90c4441 | |||
| 4590a68a11 | |||
| 11d086800d | |||
| 44ab6fa442 | |||
| af3d0278dc | |||
| 6fd8b0b32a | |||
| e9f89bfc87 | |||
| 95170f91a8 | |||
| 3d7c7e3686 | |||
| 940d4249a0 | |||
| d9aece0564 | |||
| 02ee3de75f | |||
| e41c975623 | |||
| d0db51f28e | |||
| 779af40e29 | |||
| 8743f0fdfb | |||
| 93fbc993db | |||
| 99feaf2bc7 | |||
| 6d7301d4b0 | |||
| 6ed8ca9a89 | |||
| f3e425faae | |||
| db2eae259f | |||
| acb2c9b2ef | |||
| 850650bf9e | |||
| ba59809e8e | |||
| f78539f113 | |||
| cde88e2f50 | |||
| 4ed5f00729 | |||
| 0f975e7ef0 | |||
| b9966b2394 | |||
| 1a2916170a | |||
| 870d48f103 | |||
| 52661d917a | |||
| a73ad1fc90 | |||
| ababb44cfd | |||
| dad1917179 | |||
| 4654912023 | |||
| 76cd8e26ba | |||
| b7c55323a1 | |||
| 2e7e5e299d | |||
| 7105d8e10d | |||
| 8f589f6db2 | |||
| 13398b03b2 | |||
| 358299e7c3 | |||
| 8ff2e45f10 | |||
| 075cf5490d | |||
| b8931cad05 | |||
| 15b488d7b6 | |||
| c6d7221022 | |||
| a6bdb86e1a | |||
| d202b2f362 | |||
| 45f07bd8bc | |||
| 28cc667c93 | |||
| b8ba113b81 | |||
| 56e8abd083 | |||
| a4727e93ad | |||
| 145de23918 | |||
| 59ec40322a | |||
| 54b111bf9c | |||
| f4351ff139 | |||
| 68d715f21a | |||
| 33efa3da4b | |||
| 8ab839e627 | |||
| 4def8cf0a3 | |||
| fb4619fca2 | |||
| 9efcd2d970 | |||
| b124d8b788 | |||
| 794d39cd3a | |||
| 4d4e121286 | |||
| 5400d52b8c | |||
| 61cc62d89a | |||
| 0791380bf5 | |||
| 2897769d6a | |||
| de672bfec6 | |||
| bfc43e65d4 | |||
| 612c21af15 | |||
| 90c868c5f8 | |||
| 5c95630aeb | |||
| 779fd19c1e | |||
| b263ab9866 | |||
| 22a604b6be | |||
| ededfc983e | |||
| 28140e98d3 | |||
| 2861f778a4 | |||
| e4727e61e0 | |||
| a8961a894a | |||
| 16aab52d59 | |||
| 6e23023440 | |||
| 19ec79a779 | |||
| 6ecea8f15b | |||
| 8896f02222 | |||
| 88328f0f72 | |||
| 7da87d61da | |||
| 3f3ff2f134 | |||
| 8b585e7ca4 | |||
| 6d4d751d73 | |||
| 9b1b0d5321 | |||
| 2135ca0a1f | |||
| b58cd12106 | |||
| 785fd1dcd9 | |||
| 9a305ec1aa | |||
| 0fe33dd0c0 | |||
| c483ff28c5 | |||
| 1d9b6e9839 | |||
| 1821bbe2c5 | |||
| ccf3657cec | |||
| b0f7bba99f | |||
| 4107719ad6 | |||
| 3fd2acb987 | |||
| daf5bd8307 | |||
| ab08559902 | |||
| 235880cf99 | |||
| 6cdc1e1a53 | |||
| 340e19680f | |||
| 2055383dcb | |||
| ce48e18805 | |||
| d3a82dc8c3 | |||
| f75125d235 | |||
| 7bfd2139d9 | |||
| 90d18d4274 | |||
| 30cc6686f5 | |||
| 0440cd284a | |||
| 6dbe4e4d48 | |||
| 4146131e46 | |||
| 84186f7fd9 | |||
| 653f2e3cfe | |||
| d273dd677a | |||
| 51eb21b6eb | |||
| ed47f575e2 | |||
| 3389b045a9 | |||
| 7b5b3fdeb6 | |||
| df5fabbd68 | |||
| 275a0cced3 | |||
| 4dc2d93b2d | |||
| 50d544b184 | |||
| 9b16037a41 | |||
| aba534d241 | |||
| 1ec7ed2ad2 | |||
| bd29ff9791 | |||
| a30f6dc08d | |||
| 4567efa192 | |||
| 9db13cb2a2 | |||
| 486836265d | |||
| 7bda381285 | |||
| b168c9dd12 | |||
| f73866d2f5 | |||
| 7e1134f970 | |||
| 19b58aa88f | |||
| 78deac77fb | |||
| 2d48021a96 | |||
| 1783dba480 | |||
| adbcb95464 | |||
| 8d4a19bfec | |||
| ceb6b6db5f | |||
| b5de0c3eb6 | |||
| 26766cf1d9 | |||
| d939c9ce67 | |||
| 7b73425ac5 | |||
| b688b3dc7d | |||
| 5c8019a6fc | |||
| 1478a406a7 | |||
| 9fd2077714 | |||
| 19f9a91966 | |||
| 98726f1490 | |||
| 54834d9fd1 | |||
| d1d4594d36 | |||
| 968d5bb179 | |||
| 0f3965dc13 | |||
| 23b21979e1 | |||
| 89ef790a16 | |||
| f0e1434f4a | |||
| ec9bb44203 | |||
| f57d6cf072 | |||
| 427b55de3c | |||
| 50ed473beb | |||
| cbc30519f2 | |||
| 27eaa27547 | |||
| 72ce0cd738 | |||
| 2dfedbeb30 | |||
| a89053db89 | |||
| d25b7596ac | |||
| 197a241ada | |||
| 452adfdf22 | |||
| 5c8ae898ba | |||
| ae1ed6ab29 | |||
| a20d341077 | |||
| aafc5b5d51 | |||
| e42cb11181 | |||
| de388d3d22 | |||
| 3573f0368d | |||
| be904d69fb | |||
| 806db2c271 | |||
| 2f50371b34 | |||
| 92d081a1dc | |||
| 730b6f1ec1 | |||
| 200f6a21b8 | |||
| b1761bb71d | |||
| 9d7461f60d | |||
| 5f8f664a7e | |||
| a65bb28aff | |||
| bf58f9a3eb | |||
| b816584235 | |||
| 75efe57e17 | |||
| 4c43ab65c3 | |||
| d30e139140 | |||
| 8cbc17d31e | |||
| 50b5b4f6bd | |||
| dedaf4f08c | |||
| 5ff0d6be26 | |||
| 233481f3c0 | |||
| f8f888f913 | |||
| d42ddb2dc0 | |||
| 21796ede02 | |||
| 20332d0201 | |||
| 35117fa0e5 | |||
| 769bc9e7d2 | |||
| 968616d994 | |||
| 2194e9febc | |||
| b6fc2bb58b | |||
| 92d58d1ac4 | |||
| 76c7be3bfd | |||
| f653f3e572 | |||
| a9ac91f653 | |||
| 8b31edfac2 | |||
| 4e1cc23ccb | |||
| 2c165404ee | |||
| bbbc198157 | |||
| 78079624ca | |||
| 3df6a166dd | |||
| 5883643fd9 | |||
| fe7e023932 | |||
| c55e2b2ffd | |||
| 5f4559fdfc | |||
| 3f4ffeb78b | |||
| 93be6b13d7 | |||
| 978ca3bbea | |||
| 03169f0ede | |||
| cec1b17e9d | |||
| e5843bd7a2 | |||
| db149a4c79 | |||
| 0049713e19 | |||
| af15f00d42 | |||
| 9c3155eb75 | |||
| c3b2191b21 | |||
| 4716d5096d | |||
| 3a45595407 | |||
| f3dc9d5222 | |||
| eb662d1dc4 | |||
| 48672ed6fa | |||
| 5771065da6 | |||
| e3ad902632 | |||
| aa8fa54eaa | |||
| 6ef992873f | |||
| 49af0e2cc1 | |||
| b830839d6f | |||
| 0af184ec11 | |||
| 28bd10e089 | |||
| e31e67d483 | |||
| e51a220717 | |||
| db3593b172 | |||
| 0501805017 | |||
| eb8e532af4 | |||
| 976c65976e | |||
| a99f5f3372 | |||
| 8e5bfb1a6d | |||
| 987eeab917 | |||
| ce1af47cda | |||
| 4913856e1c | |||
| 52f0a67b43 | |||
| 9c56042952 | |||
| 56bc1324d8 | |||
| 0c6ebf0222 | |||
| 64163f0a41 | |||
| 9d2bbd086c | |||
| dc4c785de2 | |||
| fade4b93fc | |||
| 73d3b36fdf | |||
| 9fe58edc59 | |||
| f71f45ebb1 | |||
| 316954b3c4 | |||
| 799501178e | |||
| 1741f95e73 | |||
| 2c9d101e24 | |||
| e1b917b51c | |||
| 000079fb17 | |||
| b03df7c143 | |||
| bfec01b63a | |||
| 87b96ec064 | |||
| 68dd8154f4 | |||
| cde32052d2 | |||
| 236d2414c4 | |||
| db7524c938 | |||
| d04b66727e | |||
| 4d4aaccb22 | |||
| f4b4b0db7d | |||
| c108d23113 | |||
| 706db5e6c7 | |||
| 227eb92b0e | |||
| d507b07911 | |||
| 3fcfa5e7d9 | |||
| ba4b018953 | |||
| a069399a69 | |||
| 04c4fc06a3 | |||
| b3b1fca083 | |||
| d91b4dc822 | |||
| 0df3c134db | |||
| 026e025173 | |||
| f2a84f130a | |||
| e1d05eea8e | |||
| 4c9648be99 | |||
| 8c3cfa37fd | |||
| e4403cdfd8 | |||
| b09f0de143 | |||
| 0da473a08c | |||
| 3e4cfce4bd | |||
| f71a15a657 | |||
| 6ad4dce833 | |||
| b048de83b8 | |||
| 01610e0ae1 | |||
| 20e6026473 | |||
| b610cc2646 | |||
| 2009c0dbb1 | |||
| 87db7cb8db | |||
| d89e8d7712 | |||
| bc8b84a1b8 | |||
| a1515db74e | |||
| 2d852b8a1e | |||
| da36080d90 | |||
| 6817f3182e | |||
| 924c833cf8 | |||
| 97fd7c8c7a | |||
| 8f55dfd91b | |||
| 495d2980cd | |||
| b29f97c86f | |||
| c093e7f44a | |||
| 5a1cedfedf | |||
| 2bd82f1344 | |||
| 37a2675898 | |||
| 1c3f216650 | |||
| 8f44fcc171 | |||
| dacae636f7 | |||
| f7e1212564 | |||
| d3d5a23ce2 | |||
| aae1d5cf3d | |||
| 2222030baf | |||
| c5e4546e3e | |||
| b95096e976 | |||
| 4e8fdf3a40 | |||
| d5030c96d8 | |||
| 897d6166c0 | |||
| cfbe9b8c8e | |||
| 450e5c8ed9 | |||
| 63f1f33ff6 | |||
| 10fcabe7da | |||
| 166236edaa | |||
| 4ec1d7d8c7 | |||
| f36ade5fa6 | |||
| 6cfb82ec04 | |||
| 3ba3647aaf | |||
| b8b0ec95e5 | |||
| 14d270f147 | |||
| e0ac8cb6cf | |||
| 049313df16 | |||
| 1d11c02e24 | |||
| 96dbc820dd | |||
| 6157ca21c1 | |||
| 4720fe3127 | |||
| 3c08c70733 | |||
| 95502c307e | |||
| 752e75933f | |||
| 235b9d2fa4 | |||
| ef6c603b64 | |||
| e3f34e6f2e | |||
| 5b79619756 | |||
| 3574b95eea | |||
| 9c26c6114c | |||
| f3a75fc077 | |||
| e6f4e06736 |
@@ -0,0 +1,18 @@
|
||||
name: 问题反馈 🐞
|
||||
description: 有问题先更新订阅,不行才提
|
||||
body:
|
||||
- type: input
|
||||
id: version
|
||||
attributes:
|
||||
label: 青龙版本
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: description
|
||||
attributes:
|
||||
label: 问题描述
|
||||
description: 尽量详细描述问题,附上错误日志或截图。
|
||||
placeholder: 请描述
|
||||
validations:
|
||||
required: true
|
||||
@@ -0,0 +1,5 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: TG Chat
|
||||
url: https://t.me/dylan_jdpro
|
||||
about: 关注tg不迷路
|
||||
@@ -0,0 +1,9 @@
|
||||
name: "💡功能建议"
|
||||
description: 为项目提想法
|
||||
labels: ["pending","feature"]
|
||||
body:
|
||||
- type: textarea
|
||||
id: require
|
||||
attributes:
|
||||
label: 需求描述
|
||||
placeholder: 请描述
|
||||
@@ -6,15 +6,15 @@
|
||||
### [TG CHANEL](https://t.me/dylan_jdpro)
|
||||
|
||||
|
||||
国内机(带代理):
|
||||
国内机(带加速,也不太稳):
|
||||
|
||||
```
|
||||
ql repo https://js.okyago.com/https://github.com/6dylan6/jdpro.git "jd_|jx_|jddj_" "backUp" "^jd[^_]|USER|JD|function|sendNotify|utils"
|
||||
ql repo https://js.googo.win/https://github.com/6dylan6/jdpro.git "jd_|jx_|jddj_" "backUp" "^jd[^_]|USER|JD|function|sendNotify|utils"
|
||||
|
||||
```
|
||||
|
||||
|
||||
国外机:
|
||||
国外机(国外ip有限制可能有些任务不能正常运行):
|
||||
|
||||
```
|
||||
ql repo https://github.com/6dylan6/jdpro.git "jd_|jx_|jddj_" "backUp" "^jd[^_]|USER|JD|function|sendNotify|utils"
|
||||
@@ -22,23 +22,16 @@ ql repo https://github.com/6dylan6/jdpro.git "jd_|jx_|jddj_" "backUp" "^jd[^_]|U
|
||||
```
|
||||
|
||||
|
||||
线报监控类,[入口](https://github.com/6dylan6/jdm.git)
|
||||
|
||||
## 使用
|
||||
|
||||
1、部署青龙登陆,版本不用追新,稳定才好,推荐部署到内网(不要外网访问,2.20.2以下版本面板会被免密登录偷家,如果必须外网就用最新版本吧)。
|
||||
|
||||
## 简要流程
|
||||
2、到订阅管理创建订阅并运行;正确配置[参考](https://github.com/6dylan6/jdpro/issues/22)
|
||||
|
||||
1、部署青龙并登陆。
|
||||
3、订阅执行完,到定时任务搜索依赖安装(jd_indeps)任务执行;
|
||||
|
||||
2、到配置管理config.sh修改,差不多在17行(特别注意,没有修改此配置,sh类型任务拉不下来);
|
||||
|
||||
RepoFileExtensions="js py"修改为 RepoFileExtensions="js py sh" 保存;
|
||||
|
||||
3、到订阅管理创建订阅并运行;正确配置[参考](https://github.com/6dylan6/jdpro/issues/22)
|
||||
|
||||
4、订阅运行完毕,到定时任务搜索依赖安装(jd_indeps.sh)任务执行,步骤2未完成会拉不到该任务;
|
||||
|
||||
4、到环境变量,创建变量,名称: JD_COOKIE,值:抓的CK(要安全就手抓),多个每行建一个,不要写在一个里;
|
||||
4、到环境变量,创建变量,名称: JD_COOKIE,值:抓的CK(要安全就手抓),多个每行建一个,不要全写在一个;
|
||||
|
||||
5、配置通知,通知的key填写到配置管理config.sh文件;
|
||||
|
||||
@@ -75,33 +68,20 @@ export NOTIFY_SHOWNAMETYPE="4" 效果是 : 账号名称:备注
|
||||
|
||||
3、因为青龙有随机延时(可以在配置文件设置为0,默认300秒),所以涉及准点运行的任务,最后加now,如果是desi或conc不用加也会准时跑。
|
||||
|
||||
4、青龙系统通知(新增删除任务、登录等通知),需把通知变量写到config.sh文件,在环境变量里只发脚本运行通知哈。
|
||||
4、脚本的通知,需把通知key变量在config.sh文件配置。
|
||||
|
||||
5、建议调整任务运行超时时间,青龙默认1小时有些跑不完就被强制结束,config.sh里配置。CommandTimeoutTime="3h" 即改为3小时,根据自己ck数量调整。
|
||||
</code></pre>
|
||||
</details>
|
||||
|
||||
6、ck掉线,不是常用地ip,短时间内连续获得豆可能就会会触发风控掉线
|
||||
|
||||
|
||||
如需禁止某些CK参加所有活动或某些活动功能,实现重组CK顺序功能,包括随机、优先、轮换、组队、分段等功能,把[task_before](./docker/task_before.sh)文件内容复制到配置管理task_before.sh保存
|
||||
|
||||
常用变量举例:
|
||||
|
||||
Recombin_CK_Mode="1" 全部顺序随机
|
||||
|
||||
Recombin_CK_Mode="2" Recombin_CK_ARG1="15" 假设有100个CK,前15个CK按正常顺序靠前,其余CK随机乱序
|
||||
|
||||
Recombin_CK_Mode="3" Recombin_CK_ARG1="5" Recombin_CK_ARG2="5" 假设有100个CK,希望前5个账号始终保持在前部,剩余95个账号按照轮换模式每天轮换5个
|
||||
|
||||
其他用法具体参考[文档](https://docs.qq.com/doc/DTXh6QUVjRXJ1TFdN)
|
||||
|
||||
## 通用环境变量(到配置管理-config.sh里添加变量,export xxx='xxx'格式)
|
||||
|
||||
AUTOCFG='true' 自动配置sendNotify文件到deps目录
|
||||
|
||||
代理API模式部分支持
|
||||
代理API模式(API代理是通过url接得到随机可用代理ip,格式是:xxx.xxx.xxx.xxx:xxxx)
|
||||
|
||||
DY_PROXY='URL1@URL2' 多个@分割
|
||||
DY_PROXY='URL1#URL2' 多个#分割
|
||||
|
||||
PERMIT_API='test' 需要走API代理的js关键词,多个&分割,可不设置,支持的js都会走
|
||||
|
||||
@@ -109,20 +89,31 @@ DY_PROXY_RENUM='5' 获取IP失败重试次数
|
||||
|
||||
DY_PROXY_REDELAY='3' 获取失败重试间隔 单位秒
|
||||
|
||||
代理池模式支持全部js脚
|
||||
|
||||
|
||||
代理池模式(就是一个代理服务器的地址)
|
||||
|
||||
DP_POOL='http://xxx' 代理池url
|
||||
|
||||
PERMIT_JS='farm&plant&opencard' 需要走代理池的js关键词,多个&分割,必须设置
|
||||
PERMIT_JS='farm&plant&opencard' 需要走代理池的js关键词,多个&分割(可不设置,如果不设置就是所有的js都会走)
|
||||
|
||||
禁止指定的pin执行任务:
|
||||
|
||||
多个任务同pin:BANPIN='任务1|任务2@pin1,pin2'
|
||||
|
||||
多个任务不同pin:BANPIN='任务1@pin,pin2&任务2@pin2,pin3'
|
||||
BANPIN 禁止某pin执行任务
|
||||
|
||||
不指定任务只写pin 全部任务都不执行该pin:BANPIN='pin1,pin2'
|
||||
ALLOWPIN 只执行某pin执行任务
|
||||
|
||||
多个任务同pin:任务1|任务2@pin1,pin2
|
||||
|
||||
多个任务不同pin:任务1@pin,pin2&任务2@pin2,pin3
|
||||
|
||||
不指定任务只写pin:全部任务
|
||||
|
||||
示例
|
||||
|
||||
export BANPIN='draw@pin1,pin2'
|
||||
|
||||
export ALLOWPIN='draw@pin1,pin2'
|
||||
|
||||
## 支持的通知方式
|
||||
|
||||
|
||||
@@ -1,17 +1,12 @@
|
||||
version: '2'
|
||||
services:
|
||||
ql_web:
|
||||
image: whyour/qinglong:2.11.3
|
||||
image: whyour/qinglong:2.17.9
|
||||
container_name: ql
|
||||
volumes:
|
||||
- ./data/config:/ql/config
|
||||
- ./data/log:/ql/log
|
||||
- ./data/db:/ql/db
|
||||
- ./data/scripts:/ql/scripts
|
||||
- ./data/repo:/ql/repo
|
||||
- ./qinglong/data:/ql/data
|
||||
- ./qinglong/deps/pnpm:/root/.local/share/pnpm
|
||||
- ./qinglong/deps/pip3:/usr/local/lib/python3.11/site-packages
|
||||
ports:
|
||||
- "0.0.0.0:5700:5700"
|
||||
environment:
|
||||
- ENABLE_HANGUP=true
|
||||
- ENABLE_WEB_PANEL=true
|
||||
restart: always
|
||||
- "5700:5700"
|
||||
restart: unless-stopped
|
||||
|
||||
+8
-17
@@ -46,25 +46,16 @@ cd $ql_path
|
||||
cat > docker-compose.yml <<EOF
|
||||
version: '2'
|
||||
services:
|
||||
qinglong:
|
||||
image: whyour/qinglong:2.11.3
|
||||
container_name: qinglong
|
||||
ql_web:
|
||||
image: whyour/qinglong:2.17.9
|
||||
container_name: ql
|
||||
volumes:
|
||||
- ./data/config:/ql/config
|
||||
- ./data/log:/ql/log
|
||||
- ./data/db:/ql/db
|
||||
- ./data/scripts:/ql/scripts
|
||||
- ./data/repo:/ql/repo
|
||||
- ./qinglong/data:/ql/data
|
||||
- ./qinglong/deps/pnpm:/root/.local/share/pnpm
|
||||
- ./qinglong/deps/pip3:/usr/local/lib/python3.11/site-packages
|
||||
ports:
|
||||
- "0.0.0.0:5500:5700"
|
||||
networks:
|
||||
- net
|
||||
environment:
|
||||
- ENABLE_HANGUP=true
|
||||
- ENABLE_WEB_PANEL=true
|
||||
restart: always
|
||||
networks:
|
||||
net:
|
||||
- "5700:5700"
|
||||
restart: unless-stopped
|
||||
EOF
|
||||
docker-compose up -d
|
||||
if [ $? -ne 0 ] ; then
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
name_js=(
|
||||
jd_farm_help
|
||||
jd_farm_help_new
|
||||
jd_farmnew_code_help
|
||||
#jd_pet
|
||||
jd_plantBean_help
|
||||
#jd_dreamFactory
|
||||
|
||||
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+151
-138
@@ -4,147 +4,160 @@ const got = require('got');
|
||||
require('dotenv').config();
|
||||
const { readFile } = require('fs/promises');
|
||||
const path = require('path');
|
||||
|
||||
const qlDir = '/ql';
|
||||
const fs = require('fs');
|
||||
let Fileexists = fs.existsSync('/ql/data/config/auth.json');
|
||||
let authFile="";
|
||||
if (Fileexists)
|
||||
authFile="/ql/data/config/auth.json"
|
||||
else
|
||||
authFile="/ql/config/auth.json"
|
||||
//const authFile = path.join(qlDir, 'config/auth.json');
|
||||
|
||||
const api = got.extend({
|
||||
prefixUrl: 'http://127.0.0.1:5600',
|
||||
retry: { limit: 0 },
|
||||
});
|
||||
|
||||
async function getToken() {
|
||||
const authConfig = JSON.parse(await readFile(authFile));
|
||||
return authConfig.token;
|
||||
const tokenFileList = ['/ql/data/db/keyv.sqlite', '/ql/data/config/auth.json', '/ql/config/auth.json'];
|
||||
let authFile = getLatestFile(tokenFileList);
|
||||
const HOSTS = ['http://127.0.0.1:5600','http://127.0.0.1:5700'];
|
||||
function api(options){
|
||||
const req = got.extend({prefixUrl: HOSTS[0],retry:{limit:0},timeout:{request:5000}})(options);
|
||||
['json','text','buffer'].forEach(m=>{
|
||||
const orig=req[m].bind(req);
|
||||
req[m]=()=>orig().catch(e=>['ECONNREFUSED','ETIMEDOUT'].includes(e.code)?got.extend({prefixUrl:HOSTS[1],retry:{limit:0},timeout:{request:5000}})(options)[m]():Promise.reject(e));
|
||||
});
|
||||
return req;
|
||||
}
|
||||
|
||||
module.exports.getEnvs = async () => {
|
||||
const token = await getToken();
|
||||
const body = await api({
|
||||
url: 'api/envs',
|
||||
searchParams: {
|
||||
searchValue: 'JD_COOKIE',
|
||||
t: Date.now(),
|
||||
},
|
||||
headers: {
|
||||
Accept: 'application/json',
|
||||
authorization: `Bearer ${token}`,
|
||||
},
|
||||
}).json();
|
||||
return body.data;
|
||||
function getLatestFile(files) {
|
||||
let latestFile = null;
|
||||
let latestMtime = 0;
|
||||
for (const file of files) {
|
||||
try {
|
||||
const stats = fs.statSync(file);
|
||||
const mtime = stats.mtimeMs;
|
||||
if (mtime > latestMtime) {
|
||||
latestMtime = mtime;
|
||||
latestFile = file;
|
||||
}
|
||||
} catch (e) {
|
||||
}
|
||||
}
|
||||
return latestFile;
|
||||
}
|
||||
async function getToken() {
|
||||
const authConfig = await readFile(authFile);
|
||||
// console.log(authConfig.toString().match(/"token":"(.*?)",/)[1])
|
||||
return authConfig.toString().match(/"token":"([^"]*)"(?!.*"token":)/)[1];
|
||||
}
|
||||
// getToken()
|
||||
module.exports.getEnvs = async () => {
|
||||
const token = await getToken();
|
||||
const body = await api({
|
||||
url: 'api/envs',
|
||||
searchParams: {
|
||||
searchValue: 'JD_COOKIE',
|
||||
t: Date.now(),
|
||||
},
|
||||
headers: {
|
||||
Accept: 'application/json',
|
||||
authorization: `Bearer ${token}`,
|
||||
},
|
||||
}).json();
|
||||
return body.data;
|
||||
};
|
||||
|
||||
module.exports.getEnvsCount = async () => {
|
||||
const data = await this.getEnvs();
|
||||
return data.length;
|
||||
const data = await this.getEnvs();
|
||||
return data.length;
|
||||
};
|
||||
|
||||
module.exports.addEnv = async (cookie, remarks) => {
|
||||
const token = await getToken();
|
||||
const body = await api({
|
||||
method: 'post',
|
||||
url: 'api/envs',
|
||||
params: { t: Date.now() },
|
||||
json: [{
|
||||
name: 'JD_COOKIE',
|
||||
value: cookie,
|
||||
remarks,
|
||||
}],
|
||||
headers: {
|
||||
Accept: 'application/json',
|
||||
authorization: `Bearer ${token}`,
|
||||
'Content-Type': 'application/json;charset=UTF-8',
|
||||
},
|
||||
}).json();
|
||||
return body;
|
||||
const token = await getToken();
|
||||
const body = await api({
|
||||
method: 'post',
|
||||
url: 'api/envs',
|
||||
params: { t: Date.now() },
|
||||
json: [{
|
||||
name: 'JD_COOKIE',
|
||||
value: cookie,
|
||||
remarks,
|
||||
}],
|
||||
headers: {
|
||||
Accept: 'application/json',
|
||||
authorization: `Bearer ${token}`,
|
||||
'Content-Type': 'application/json;charset=UTF-8',
|
||||
},
|
||||
}).json();
|
||||
return body;
|
||||
};
|
||||
|
||||
module.exports.updateEnv = async (cookie, eid, remarks) => {
|
||||
const token = await getToken();
|
||||
const body = await api({
|
||||
method: 'put',
|
||||
url: 'api/envs',
|
||||
params: { t: Date.now() },
|
||||
json: {
|
||||
name: 'JD_COOKIE',
|
||||
value: cookie,
|
||||
_id: eid,
|
||||
remarks,
|
||||
},
|
||||
headers: {
|
||||
Accept: 'application/json',
|
||||
authorization: `Bearer ${token}`,
|
||||
'Content-Type': 'application/json;charset=UTF-8',
|
||||
},
|
||||
}).json();
|
||||
return body;
|
||||
const token = await getToken();
|
||||
const body = await api({
|
||||
method: 'put',
|
||||
url: 'api/envs',
|
||||
params: { t: Date.now() },
|
||||
json: {
|
||||
name: 'JD_COOKIE',
|
||||
value: cookie,
|
||||
_id: eid,
|
||||
remarks,
|
||||
},
|
||||
headers: {
|
||||
Accept: 'application/json',
|
||||
authorization: `Bearer ${token}`,
|
||||
'Content-Type': 'application/json;charset=UTF-8',
|
||||
},
|
||||
}).json();
|
||||
return body;
|
||||
};
|
||||
|
||||
module.exports.updateEnv11 = async (cookie, eid, remarks) => {
|
||||
const token = await getToken();
|
||||
const body = await api({
|
||||
method: 'put',
|
||||
url: 'api/envs',
|
||||
params: { t: Date.now() },
|
||||
json: {
|
||||
name: 'JD_COOKIE',
|
||||
value: cookie,
|
||||
id: eid,
|
||||
remarks,
|
||||
},
|
||||
headers: {
|
||||
Accept: 'application/json',
|
||||
authorization: `Bearer ${token}`,
|
||||
'Content-Type': 'application/json;charset=UTF-8',
|
||||
},
|
||||
}).json();
|
||||
return body;
|
||||
const token = await getToken();
|
||||
const body = await api({
|
||||
method: 'put',
|
||||
url: 'api/envs',
|
||||
params: { t: Date.now() },
|
||||
json: {
|
||||
name: 'JD_COOKIE',
|
||||
value: cookie,
|
||||
id: eid,
|
||||
remarks,
|
||||
},
|
||||
headers: {
|
||||
Accept: 'application/json',
|
||||
authorization: `Bearer ${token}`,
|
||||
'Content-Type': 'application/json;charset=UTF-8',
|
||||
},
|
||||
}).json();
|
||||
return body;
|
||||
};
|
||||
|
||||
module.exports.DisableCk = async (eid) => {
|
||||
const token = await getToken();
|
||||
const body = await api({
|
||||
method: 'put',
|
||||
url: 'api/envs/disable',
|
||||
params: { t: Date.now() },
|
||||
body: JSON.stringify([eid]),
|
||||
headers: {
|
||||
Accept: 'application/json',
|
||||
authorization: `Bearer ${token}`,
|
||||
'Content-Type': 'application/json;charset=UTF-8',
|
||||
},
|
||||
}).json();
|
||||
return body;
|
||||
const token = await getToken();
|
||||
const body = await api({
|
||||
method: 'put',
|
||||
url: 'api/envs/disable',
|
||||
params: { t: Date.now() },
|
||||
body: JSON.stringify([eid]),
|
||||
headers: {
|
||||
Accept: 'application/json',
|
||||
authorization: `Bearer ${token}`,
|
||||
'Content-Type': 'application/json;charset=UTF-8',
|
||||
},
|
||||
}).json();
|
||||
return body;
|
||||
};
|
||||
|
||||
module.exports.EnableCk = async (eid) => {
|
||||
const token = await getToken();
|
||||
const body = await api({
|
||||
method: 'put',
|
||||
url: 'api/envs/enable',
|
||||
params: { t: Date.now() },
|
||||
body: JSON.stringify([eid]),
|
||||
headers: {
|
||||
Accept: 'application/json',
|
||||
authorization: `Bearer ${token}`,
|
||||
'Content-Type': 'application/json;charset=UTF-8',
|
||||
},
|
||||
}).json();
|
||||
return body;
|
||||
const token = await getToken();
|
||||
const body = await api({
|
||||
method: 'put',
|
||||
url: 'api/envs/enable',
|
||||
params: { t: Date.now() },
|
||||
body: JSON.stringify([eid]),
|
||||
headers: {
|
||||
Accept: 'application/json',
|
||||
authorization: `Bearer ${token}`,
|
||||
'Content-Type': 'application/json;charset=UTF-8',
|
||||
},
|
||||
}).json();
|
||||
return body;
|
||||
};
|
||||
|
||||
module.exports.getstatus = async(eid) => {
|
||||
module.exports.getstatus = async (eid) => {
|
||||
const envs = await this.getEnvs();
|
||||
var tempid = 0;
|
||||
for (let i = 0; i < envs.length; i++) {
|
||||
tempid = 0;
|
||||
tempid = 0;
|
||||
if (envs[i]._id) {
|
||||
tempid = envs[i]._id;
|
||||
}
|
||||
@@ -158,7 +171,7 @@ module.exports.getstatus = async(eid) => {
|
||||
return 99;
|
||||
};
|
||||
|
||||
module.exports.getEnvById = async(eid) => {
|
||||
module.exports.getEnvById = async (eid) => {
|
||||
const envs = await this.getEnvs();
|
||||
var tempid = 0;
|
||||
for (let i = 0; i < envs.length; i++) {
|
||||
@@ -177,28 +190,28 @@ module.exports.getEnvById = async(eid) => {
|
||||
};
|
||||
|
||||
module.exports.getEnvByPtPin = async (Ptpin) => {
|
||||
const envs = await this.getEnvs();
|
||||
for (let i = 0; i < envs.length; i++) {
|
||||
var tempptpin = decodeURIComponent(envs[i].value.match(/pt_pin=([^; ]+)(?=;?)/) && envs[i].value.match(/pt_pin=([^; ]+)(?=;?)/)[1]);
|
||||
if(tempptpin==Ptpin){
|
||||
return envs[i];
|
||||
}
|
||||
}
|
||||
return "";
|
||||
const envs = await this.getEnvs();
|
||||
for (let i = 0; i < envs.length; i++) {
|
||||
var tempptpin = decodeURIComponent(envs[i].value.match(/pt_pin=([^; ]+)(?=;?)/) && envs[i].value.match(/pt_pin=([^; ]+)(?=;?)/)[1]);
|
||||
if (tempptpin == Ptpin) {
|
||||
return envs[i];
|
||||
}
|
||||
}
|
||||
return "";
|
||||
};
|
||||
|
||||
module.exports.delEnv = async (eid) => {
|
||||
const token = await getToken();
|
||||
const body = await api({
|
||||
method: 'delete',
|
||||
url: 'api/envs',
|
||||
params: { t: Date.now() },
|
||||
body: JSON.stringify([eid]),
|
||||
headers: {
|
||||
Accept: 'application/json',
|
||||
authorization: `Bearer ${token}`,
|
||||
'Content-Type': 'application/json;charset=UTF-8',
|
||||
},
|
||||
}).json();
|
||||
return body;
|
||||
const token = await getToken();
|
||||
const body = await api({
|
||||
method: 'delete',
|
||||
url: 'api/envs',
|
||||
params: { t: Date.now() },
|
||||
body: JSON.stringify([eid]),
|
||||
headers: {
|
||||
Accept: 'application/json',
|
||||
authorization: `Bearer ${token}`,
|
||||
'Content-Type': 'application/json;charset=UTF-8',
|
||||
},
|
||||
}).json();
|
||||
return body;
|
||||
};
|
||||
+43
-10
@@ -17,13 +17,13 @@ if (process.env.JD_COOKIE) {
|
||||
CookieJDs = [process.env.JD_COOKIE];
|
||||
}
|
||||
}
|
||||
if (JSON.stringify(process.env).indexOf('GITHUB') > -1) {
|
||||
console.log(`请勿使用github action运行此脚本,无论你是从你自己的私库还是其他哪里拉取的源代码,都会导致我被封号\n`);
|
||||
!(async () => {
|
||||
await require('./sendNotify').sendNotify('提醒', `请勿使用github action、滥用github资源会封我仓库以及账号`)
|
||||
await process.exit(0);
|
||||
})()
|
||||
}
|
||||
//if (JSON.stringify(process.env).indexOf('GITHUB') > -1) {
|
||||
// console.log(`请勿使用github action运行此脚本,无论你是从你自己的私库还是其他哪里拉取的源代码,都会导致我被封号\n`);
|
||||
// !(async () => {
|
||||
// await require('./sendNotify').sendNotify('提醒', `请勿使用github action、滥用github资源会封我仓库以及账号`)
|
||||
// await process.exit(0);
|
||||
// })()
|
||||
//}
|
||||
//!(async () => {
|
||||
// IP = await getIP();
|
||||
// try {
|
||||
@@ -42,7 +42,7 @@ if (process.env.BANPIN) {
|
||||
//if (process.mainModule.filename.includes(i.split('^')[0])) {
|
||||
if (i.split('@')[0].split('|').filter(x => process.argv[1].includes(x)).length != 0) {
|
||||
let pinarr = i.split('@')[1].split(',');
|
||||
console.log(`已配置该任务不执行pin: ${JSON.stringify(pinarr)}`);
|
||||
console.log(`\n❗已配置该任务不执行pin: ${JSON.stringify(pinarr)}`);
|
||||
for (let j of pinarr) {
|
||||
j = decodeURIComponent(j);
|
||||
CookieJDs = CookieJDs.filter(x => !x.includes(encodeURIComponent(j)));
|
||||
@@ -53,17 +53,50 @@ if (process.env.BANPIN) {
|
||||
|
||||
} else {
|
||||
let pinarr = banpin.split(',');
|
||||
console.log(`已配置全局不执行pin: ${JSON.stringify(pinarr)}`);
|
||||
console.log(`\n❗已配置全部任务不执行pin: ${JSON.stringify(pinarr)}`);
|
||||
for (let i of pinarr) {
|
||||
j = decodeURIComponent(j);
|
||||
i = decodeURIComponent(i);
|
||||
CookieJDs = CookieJDs.filter(x => !x.includes(encodeURIComponent(i)));
|
||||
}
|
||||
}
|
||||
} catch { }
|
||||
}
|
||||
if (process.env.ALLOWPIN) {
|
||||
try {
|
||||
const pin = process.env.ALLOWPIN;
|
||||
const runck = [];
|
||||
if (pin.includes('@')) {
|
||||
const arr = pin.split('&');
|
||||
|
||||
for (let i of arr) {
|
||||
//if (process.mainModule.filename.includes(i.split('^')[0])) {
|
||||
if (i.split('@')[0].split('|').filter(x => process.argv[1].includes(x)).length != 0) {
|
||||
let pinarr = i.split('@')[1].split(',');
|
||||
console.log(`\n❗已配置该任务只执行pin: ${JSON.stringify(pinarr)}`);
|
||||
for (let j of pinarr) {
|
||||
j = decodeURIComponent(j);
|
||||
runck.push(...CookieJDs.filter(x => x.includes(encodeURIComponent(j))));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
} else {
|
||||
let pinarr = pin.split(',');
|
||||
console.log(`\n❗已配置全部任务只执行pin: ${JSON.stringify(pinarr)}`);
|
||||
for (let i of pinarr) {
|
||||
i = decodeURIComponent(i);
|
||||
runck.push(...CookieJDs.filter(x => x.includes(encodeURIComponent(i))));
|
||||
}
|
||||
}
|
||||
if (runck.length > 0) {
|
||||
CookieJDs = runck
|
||||
}
|
||||
} catch { }
|
||||
}
|
||||
console.log(`\n====================共${CookieJDs.length}个京东账号Cookie=================`);
|
||||
console.log(`===========脚本执行时间:${formatdate(new Date(new Date().getTime() + new Date().getTimezoneOffset() * 60 * 1000 + 8 * 60 * 60 * 1000))}============`);
|
||||
console.log('>>>>>>>>>>>>6dylan6提醒您:有问题先更新不行在反馈>>>>>>>>>>>>>\n');
|
||||
console.log(`Tips:‼️青龙2.20.2以下版本不要外网访问,已被爆破可任意登录!必须要外网的就全新安装新版吧,升级不行\n`);
|
||||
|
||||
for (let i = 0; i < CookieJDs.length; i++) {
|
||||
if (!CookieJDs[i].match(/pt_pin=(.+?);/) || !CookieJDs[i].match(/pt_key=(.+?);/)) console.log(`\n提示:京东cookie 【${CookieJDs[i]}】填写不规范,可能会影响部分脚本正常使用。正确格式为: pt_key=xxx;pt_pin=xxx;(分号;不可少)\n`);
|
||||
|
||||
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+2
-2
File diff suppressed because one or more lines are too long
+3
-2610
File diff suppressed because one or more lines are too long
+2
-3
File diff suppressed because one or more lines are too long
+2
-2
File diff suppressed because one or more lines are too long
+2
-2
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+2
-2
File diff suppressed because one or more lines are too long
+2
-2
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
-18
File diff suppressed because one or more lines are too long
+2
-2
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
-10
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,63 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
#依赖安装
|
||||
#0 8 5 5 * jd_indeps.sh
|
||||
#new Env('依赖安装');
|
||||
#updatedate:20240903
|
||||
#
|
||||
|
||||
DIR="$( pwd )"
|
||||
dir_root=/ql
|
||||
dir_repo=$dir_root/repo
|
||||
dir_deps=$dir_root/deps
|
||||
|
||||
if [[ $AUTOCFG == 'true' ]];then
|
||||
if [[ -z "$(echo "$DIR"|grep 'main')" ]];then
|
||||
dir_code=$dir_log/6dylan6_jdpro_jd_sharecode
|
||||
repo='6dylan6_jdpro'
|
||||
else
|
||||
dir_code=$dir_log/6dylan6_jdpro_main_jd_sharecode
|
||||
repo='6dylan6_jdpro_main'
|
||||
fi
|
||||
[[ -d $dir_root/data ]] && dir_data=$dir_root/data
|
||||
[[ -d $dir_data/repo ]] && dir_repo=$dir_data/repo
|
||||
[[ -d $dir_data/deps ]] && dir_deps=$dir_data/deps
|
||||
cp $dir_repo/${repo}/sendNotify.js $dir_deps/ > /dev/null 2>&1
|
||||
echo -e "\n已配置sendNotify.js文件到deps目录下,再次执行订阅生效\n"
|
||||
else
|
||||
echo -e "\n如需自动配置sendNotify.js文件到desp目录下,请配置变量AUTOCFG='true'\n"
|
||||
fi
|
||||
|
||||
npm_ver=`pnpm -v|awk -F. '{print $1}'`
|
||||
if [[ $npm_ver -ge 7 ]];then
|
||||
export PNPM_HOME="/root/.local/share/pnpm"
|
||||
export PATH="$PNPM_HOME:$PATH"
|
||||
fi
|
||||
|
||||
echo -e "安装本库所需依赖,不一定一次全部安装成功,完成请检查\n"
|
||||
echo -e "开始安装............\n"
|
||||
|
||||
#apk add g++ make pixman-dev pango-dev cairo-dev pkgconf --no-cache
|
||||
#apk add g++ make --no-cache
|
||||
pnpm config set registry https://registry.npmmirror.com
|
||||
pnpm install -g
|
||||
pnpm i -g tough-cookie
|
||||
pnpm i -g ds@2.0.2
|
||||
pnpm i -g png-js@1.0.0
|
||||
pnpm i -g date-fns@3.6.0
|
||||
pnpm i -g axios@1.7.4
|
||||
pnpm i -g crypto-js@4.2.0
|
||||
# pnpm install -g ts-md5@1.3.1
|
||||
# pnpm install -g tslib@2.6.3
|
||||
# pnpm install -g @types/node@22.4.0
|
||||
pnpm i -g request@2.88.2
|
||||
pnpm i -g jsdom@24.1.1
|
||||
pnpm i -g moment@2.30.1
|
||||
pnpm i -g cheerio@1.0.0
|
||||
# pnpm install -g tough-cookie@4.1.4
|
||||
pnpm i -g https-proxy-agent@7.0.5
|
||||
pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple/ jieba
|
||||
pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple/ requests
|
||||
rm -rf /usr/local/pnpm-global/5/node_modules/.pnpm/canvas*
|
||||
rm -rf /root/.local/share/pnpm/global/5/.pnpm/canvas*
|
||||
pnpm i -g sharp@0.32.0
|
||||
echo -e "\n所需依赖安装完成,请检查有没有报错,可尝试再次运行"
|
||||
-328
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
-179
@@ -1,179 +0,0 @@
|
||||
/*
|
||||
京东快递
|
||||
@Leaf
|
||||
|
||||
*/
|
||||
const $ = new Env('京东快递');
|
||||
const got = require('got');
|
||||
|
||||
const envSplitor = ['&','\n','@']
|
||||
const ckNames = ['JD_COOKIE']
|
||||
|
||||
const MAX_THREAD = parseInt(process.env['jd_jdkd_thread']) || 5
|
||||
const DEFAULT_TIMEOUT=8000, DEFAULT_RETRY=3;
|
||||
|
||||
const default_UA = 'Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.31(0x18001f2f) NetType/WIFI Language/zh_CN miniProgram/wx73247c7819d61796'
|
||||
const Referer = 'https://jingcai-h5.jd.com/'
|
||||
const Origin = 'https://jingcai-h5.jd.com'
|
||||
|
||||
const client = got.extend({
|
||||
headers:{
|
||||
Connection:'keep-alive',
|
||||
'User-Agent': default_UA,
|
||||
Referer,
|
||||
Origin,
|
||||
AppParams: JSON.stringify({"appid":158,"ticket_type":"m"}),
|
||||
ClientInfo: JSON.stringify({"appName":"jingcai","client":"m"}),
|
||||
'LOP-DN': 'jingcai.jd.com',
|
||||
'X-Requested-With': 'XMLHttpRequest',
|
||||
},
|
||||
retry: {limit:0},
|
||||
timeout: DEFAULT_TIMEOUT,
|
||||
followRedirect: false,
|
||||
})
|
||||
|
||||
class BasicClass{constructor(){this.index=$.userIdx++;this.name='';} log(msg,opt={}){var m='',n=$.userCount.toString().length;;if(this.index)m+=`账号[${$.padStr(this.index,n)}]`;if(this.name)m+=`[${this.name}]`;$.log(m+msg,opt);} async request(opt){var resp=null,count=0;var fn=opt.fn||opt.url;opt.method=opt?.method?.toUpperCase()||'GET';while(count++<DEFAULT_RETRY){try{await client(opt).then(t=>{resp=t},e=>{resp=e.response});if(((resp?.statusCode/100)|0)<=4)break;}catch(e){if(e.name=='TimeoutError'){this.log(`[${fn}]请求超时,重试第${count}次`);}else{this.log(`[${fn}]请求错误(${e.message}),重试第${count}次`);}};} if(resp==null)return Promise.resolve({statusCode:-1,headers:null,result:null});let{statusCode,headers,body}=resp;if(body)try{body=JSON.parse(body);}catch{};return Promise.resolve({statusCode,headers,result:body})}}
|
||||
let http = new BasicClass();
|
||||
|
||||
class UserClass extends BasicClass {
|
||||
constructor(ck) {
|
||||
super()
|
||||
this.cookie = ck
|
||||
this.pt_pin = ck.match(/pin=([\w\-\%]+)/) ? ck.match(/pin=([\w\-\%]+)/)[1] : ''
|
||||
this.name = decodeURIComponent(this.pt_pin)
|
||||
}
|
||||
|
||||
async queryTaskList() {
|
||||
try {
|
||||
let options = {
|
||||
fn: 'queryTaskList',
|
||||
method: 'post',
|
||||
url: 'https://lop-proxy.jd.com/ESGApi/queryTaskList',
|
||||
headers: {Cookie:this.cookie,'event-id':$.randomPattern('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx')},
|
||||
json: [{"pin":"$cooMrdGatewayUid$"}],
|
||||
}
|
||||
let {result} = await this.request(options)
|
||||
let code = result?.code
|
||||
if(code == 1) {
|
||||
//console.log(JSON.stringify(result?.content?.taskInfoList))
|
||||
for(let task of (result?.content?.taskInfoList||[]).filter(x => x.taskReachNum < x.taskNeedReachNum && x.triggerType==1 && !x.taskTitle.includes('加购'))) {
|
||||
await this.reachTaskInfo(task);
|
||||
await $.wait(1000);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
let errCode = code || result?.error_response?.code
|
||||
let errMsg = result?.msg || result?.error_response?.zh_desc
|
||||
this.log(`查询任务列表出错[${errCode}]: ${errMsg}`)
|
||||
}
|
||||
} catch (e) {
|
||||
$.log(e)
|
||||
} finally {
|
||||
return Promise.resolve()
|
||||
}
|
||||
}
|
||||
|
||||
async reachTaskInfo(task) {
|
||||
try {
|
||||
let options = {
|
||||
fn: 'reachTaskInfo',
|
||||
method: 'post',
|
||||
url: 'https://lop-proxy.jd.com/ESGApi/reachTaskInfo',
|
||||
headers: {Cookie:this.cookie,'event-id':$.randomPattern('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx')},
|
||||
json: [{
|
||||
taskNo: task.taskNo,
|
||||
childTaskId: task.childTaskId,
|
||||
pin: "$cooMrdGatewayUid$",
|
||||
}],
|
||||
}
|
||||
let {result} = await this.request(options)
|
||||
let code = result?.code
|
||||
if(code == 1) {
|
||||
this.log(`完成任务[${task.taskTitle}]成功`);
|
||||
await $.wait(1000);
|
||||
await this.queryTaskList();
|
||||
} else {
|
||||
let errCode = code || result?.error_response?.code
|
||||
let errMsg = result?.msg || result?.error_response?.zh_desc
|
||||
this.log(`完成任务[${task.taskTitle}]失败[${errCode}]: ${errMsg}`)
|
||||
}
|
||||
} catch (e) {
|
||||
$.log(e)
|
||||
} finally {
|
||||
return Promise.resolve()
|
||||
}
|
||||
}
|
||||
|
||||
async queryCanGetRewardTaskList() {
|
||||
try {
|
||||
let options = {
|
||||
fn: 'queryCanGetRewardTaskList',
|
||||
method: 'post',
|
||||
url: 'https://lop-proxy.jd.com/ESGApi/queryCanGetRewardTaskList',
|
||||
headers: {Cookie:this.cookie,'event-id':$.randomPattern('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx')},
|
||||
json: [{"pin":"$cooMrdGatewayUid$"}],
|
||||
}
|
||||
let {result} = await this.request(options)
|
||||
let code = result?.code
|
||||
if(code == 1) {
|
||||
for(let item of (result?.content?.personalCarbonRewardRespDtoList||[])) {
|
||||
await this.operationPersonalCarbonIntegral(item)
|
||||
}
|
||||
} else {
|
||||
let errCode = code || result?.error_response?.code
|
||||
let errMsg = result?.msg || result?.error_response?.zh_desc
|
||||
this.log(`查询可领取奖励出错[${errCode}]: ${errMsg}`)
|
||||
}
|
||||
} catch (e) {
|
||||
$.log(e)
|
||||
} finally {
|
||||
return Promise.resolve()
|
||||
}
|
||||
}
|
||||
|
||||
async operationPersonalCarbonIntegral(item) {
|
||||
try {
|
||||
let options = {
|
||||
fn: 'operationPersonalCarbonIntegral',
|
||||
method: 'post',
|
||||
url: 'https://lop-proxy.jd.com/ESGApi/operationPersonalCarbonIntegral',
|
||||
headers: {Cookie:this.cookie,'event-id':$.randomPattern('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx')},
|
||||
json: [{
|
||||
type: 2,
|
||||
operationType: 1,
|
||||
rewardNo: item.rewardNo,
|
||||
taskNo: item.taskNo,
|
||||
pin: "$cooMrdGatewayUid$",
|
||||
}],
|
||||
}
|
||||
let {result} = await this.request(options)
|
||||
let code = result?.code
|
||||
if(code == 1) {
|
||||
this.log(`收取[${item.taskTitle}]奖励成功, 现在有${result?.content?.carbonIntegral}g能量`)
|
||||
} else {
|
||||
let errCode = code || result?.error_response?.code
|
||||
let errMsg = result?.msg || result?.error_response?.zh_desc
|
||||
this.log(`收取[${item.taskTitle}]奖励失败[${errCode}]: ${errMsg}`)
|
||||
}
|
||||
} catch (e) {
|
||||
$.log(e)
|
||||
} finally {
|
||||
return Promise.resolve()
|
||||
}
|
||||
}
|
||||
|
||||
async userTask() {
|
||||
await this.queryTaskList();
|
||||
await this.queryCanGetRewardTaskList();
|
||||
}
|
||||
}
|
||||
|
||||
!(async () => {
|
||||
$.read_env(UserClass);
|
||||
|
||||
await $.threadTask('userTask',MAX_THREAD)
|
||||
})()
|
||||
.catch((e) => $.log(e))
|
||||
.finally(() => $.exitNow())
|
||||
|
||||
function Env(name){return new class{constructor(name){this.name=name;this.startTime=Date.now();this.log(`[${this.name}]开始运行\n`,{time:true});this.notifyStr=[];this.notifyFlag=true;this.userIdx=0;this.userList=[];this.userCount=0;} log(msg,options={}){let opt={console:true};Object.assign(opt,options);if(opt.time){let fmt=opt.fmt||'hh:mm:ss';msg=`[${this.time(fmt)}]`+msg;} if(opt.notify)this.notifyStr.push(msg);if(opt.console)console.log(msg);} read_env(Class){let envStrList=ckNames.map(x=>process.env[x]);for(let env_str of envStrList.filter(x=>!!x)){let sp=envSplitor.filter(x=>env_str.includes(x));let splitor=sp.length>0?sp[0]:envSplitor[0];for(let ck of env_str.split(splitor).filter(x=>!!x)){this.userList.push(new Class(ck));}} this.userCount=this.userList.length;if(!this.userCount){this.log(`未找到变量,请检查变量${ckNames.map(x => '['+x+']').join('或')}`,{notify:true});return false;} this.log(`共找到${this.userCount}个账号`);return true;} async threads(taskName,conf,opt={}){while(conf.idx<$.userList.length){let user=$.userList[conf.idx++];await user[taskName](opt);}} async threadTask(taskName,thread){let taskAll=[];let taskConf={idx:0};while(thread--)taskAll.push(this.threads(taskName,taskConf));await Promise.all(taskAll);} time(t,x=null){let xt=x?new Date(x):new Date;let e={"M+":xt.getMonth()+1,"d+":xt.getDate(),"h+":xt.getHours(),"m+":xt.getMinutes(),"s+":xt.getSeconds(),"q+":Math.floor((xt.getMonth()+3)/3),S:this.padStr(xt.getMilliseconds(),3)};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(xt.getFullYear()+"").substr(4-RegExp.$1.length)));for(let s in e)new RegExp("("+s+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?e[s]:("00"+e[s]).substr((""+e[s]).length)));return t;} async showmsg(){if(!this.notifyFlag)return;if(!this.notifyStr.length)return;var notify=require('./sendNotify');this.log('\n============== 推送 ==============');await notify.sendNotify(this.name,this.notifyStr.join('\n'));} padStr(num,length,opt={}){let padding=opt.padding||'0';let mode=opt.mode||'l';let numStr=String(num);let numPad=(length>numStr.length)?(length-numStr.length):0;let pads='';for(let i=0;i<numPad;i++){pads+=padding;} if(mode=='r'){numStr=numStr+pads;}else{numStr=pads+numStr;} return numStr;} json2str(obj,c,encode=false){let ret=[];for(let keys of Object.keys(obj).sort()){let v=obj[keys];if(v&&encode)v=encodeURIComponent(v);ret.push(keys+'='+v);} return ret.join(c);} str2json(str,decode=false){let ret={};for(let item of str.split('&')){if(!item)continue;let idx=item.indexOf('=');if(idx==-1)continue;let k=item.substr(0,idx);let v=item.substr(idx+1);if(decode)v=decodeURIComponent(v);ret[k]=v;} return ret;} randomPattern(pattern,charset='abcdef0123456789'){let str='';for(let chars of pattern){if(chars=='x'){str+=charset.charAt(Math.floor(Math.random()*charset.length));}else if(chars=='X'){str+=charset.charAt(Math.floor(Math.random()*charset.length)).toUpperCase();}else{str+=chars;}} return str;} randomString(len,charset='abcdef0123456789'){let str='';for(let i=0;i<len;i++){str+=charset.charAt(Math.floor(Math.random()*charset.length));} return str;} randomList(a){let idx=Math.floor(Math.random()*a.length);return a[idx];} wait(t){return new Promise(e=>setTimeout(e,t));} async exitNow(){await this.showmsg();let e=Date.now();let s=(e-this.startTime)/1000;this.log('');this.log(`[${this.name}]运行结束,共运行了${s}秒`,{time:true});process.exit(0);}} (name)}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+3
-3
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+7
-19
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
-16
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+2
-2
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+2
-2
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user