mirror of
https://github.com/6dylan6/jdpro.git
synced 2026-04-20 11:03:08 +08:00
Compare commits
298 Commits
6cdc1e1a53
...
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 |
@@ -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,17 +22,14 @@ ql repo https://github.com/6dylan6/jdpro.git "jd_|jx_|jddj_" "backUp" "^jd[^_]|U
|
||||
```
|
||||
|
||||
|
||||
线报监控类,[入口](https://github.com/6dylan6/jdm.git)
|
||||
|
||||
## 使用
|
||||
|
||||
|
||||
## 简要流程
|
||||
|
||||
1、部署青龙并登陆,版本不用追新,稳定才好,推荐whyour/qinglong:2.17.9镜像部署。
|
||||
1、部署青龙登陆,版本不用追新,稳定才好,推荐部署到内网(不要外网访问,2.20.2以下版本面板会被免密登录偷家,如果必须外网就用最新版本吧)。
|
||||
|
||||
2、到订阅管理创建订阅并运行;正确配置[参考](https://github.com/6dylan6/jdpro/issues/22)
|
||||
|
||||
3、订阅执行完,到定时任务搜索依赖安装(jd_indeps.sh)任务执行;
|
||||
3、订阅执行完,到定时任务搜索依赖安装(jd_indeps)任务执行;
|
||||
|
||||
4、到环境变量,创建变量,名称: JD_COOKIE,值:抓的CK(要安全就手抓),多个每行建一个,不要全写在一个;
|
||||
|
||||
@@ -71,32 +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数量调整。
|
||||
|
||||
6、如需禁止某些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)
|
||||
</code></pre>
|
||||
</details>
|
||||
6、ck掉线,不是常用地ip,短时间内连续获得豆可能就会会触发风控掉线
|
||||
|
||||
|
||||
## 通用环境变量(到配置管理-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都会走
|
||||
|
||||
@@ -104,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
|
||||
|
||||
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
+9
-4
@@ -7,10 +7,15 @@ const path = require('path');
|
||||
const fs = require('fs');
|
||||
const tokenFileList = ['/ql/data/db/keyv.sqlite', '/ql/data/config/auth.json', '/ql/config/auth.json'];
|
||||
let authFile = getLatestFile(tokenFileList);
|
||||
const api = got.extend({
|
||||
prefixUrl: 'http://127.0.0.1:5600',
|
||||
retry: { limit: 0 },
|
||||
});
|
||||
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;
|
||||
}
|
||||
function getLatestFile(files) {
|
||||
let latestFile = null;
|
||||
let latestMtime = 0;
|
||||
|
||||
+36
-4
@@ -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,18 +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:到客户服务-在线客服发'火爆',如出滑块就拼一下会解除一些活动火爆\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
+3
-3
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+3
-2608
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
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
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
+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
+1
-1
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
-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
+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,64 +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 i -g tunnel
|
||||
# pnpm install -g tough-cookie@4.1.4
|
||||
pnpm i -g https-proxy-agent@7.0.5
|
||||
pip3 install -i https://pypi.doubanio.com/simple/ jieba
|
||||
pip3 install -i https://pypi.doubanio.com/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所需依赖安装完成,请检查有没有报错,可尝试再次运行"
|
||||
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
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
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
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
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
+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
+29
-8
@@ -42,8 +42,29 @@ def randomuserAgent():
|
||||
|
||||
|
||||
def get_proxy_api(proxy_url, max_retries=5, timeout=60, retry_delay=1):
|
||||
session = requests.Session()
|
||||
for retry in range(max_retries):
|
||||
res = get(url=proxy_url)
|
||||
if '@' in proxy_url:
|
||||
# 解析认证信息
|
||||
auth_part, url_part = proxy_url.split('@')
|
||||
protocol = auth_part.split('://')[0]
|
||||
auth_part = auth_part.split('://')[1]
|
||||
host = url_part
|
||||
|
||||
# 处理只有 token 的情况
|
||||
if ':' in auth_part:
|
||||
username, password = auth_part.split(':')
|
||||
session.auth = (username, password)
|
||||
else:
|
||||
# 只有 token 的情况,需要 base64 编码
|
||||
token = auth_part
|
||||
token_b64 = base64.b64encode(token.encode()).decode()
|
||||
session.headers.update({'Authorization': f'Basic {token_b64}'})
|
||||
|
||||
res = session.get(f"{protocol}://{host}", verify=False, timeout=timeout)
|
||||
else:
|
||||
res = session.get(proxy_url, verify=False, timeout=timeout)
|
||||
|
||||
printf(f"本次获取到的代理:{res.text}")
|
||||
proxy_ip_port = res.text.strip()
|
||||
proxy_address = f"http://{proxy_ip_port}"
|
||||
@@ -242,7 +263,7 @@ def get_sign_diy(pin):
|
||||
|
||||
def getcookie_wskey(key):
|
||||
proxys = proxy_url
|
||||
if os.environ.get("WSKEY_PROXY_URL") is not None:
|
||||
if os.environ.get("DY_PROXY") is not None:
|
||||
proxys = get_proxy_api(proxy_url)
|
||||
|
||||
body = "body=%7B%22to%22%3A%22https%3A//plogin.m.jd.com/jd-mlogin/static/html/appjmp_blank.html%22%7D"
|
||||
@@ -270,7 +291,7 @@ def getcookie_wskey(key):
|
||||
printf(f"【错误】{unquote(pin)}在获取token时:\n{error}")
|
||||
return pin, "False"
|
||||
randomuserAgent()
|
||||
if os.environ.get("WSKEY_PROXY_URL") is not None:
|
||||
if os.environ.get("DY_PROXY") is not None:
|
||||
proxys = get_proxy_api(proxy_url)
|
||||
continue
|
||||
|
||||
@@ -280,7 +301,7 @@ def getcookie_wskey(key):
|
||||
printf(f"【警告】{unquote(pin)}在获取token时失败,等待5秒后重试")
|
||||
time.sleep(5)
|
||||
randomuserAgent()
|
||||
if os.environ.get("WSKEY_PROXY_URL") is not None:
|
||||
if os.environ.get("DY_PROXY") is not None:
|
||||
proxys = get_proxy_api(proxy_url)
|
||||
|
||||
if token=="xxx":
|
||||
@@ -307,7 +328,7 @@ def getcookie_wskey(key):
|
||||
printf(f"【错误】{unquote(pin)}在获取cookie时:\n{error}")
|
||||
return "Error"
|
||||
randomuserAgent()
|
||||
if os.environ.get("WSKEY_PROXY_URL") is not None:
|
||||
if os.environ.get("DY_PROXY") is not None:
|
||||
proxys = get_proxy_api(proxy_url)
|
||||
continue
|
||||
|
||||
@@ -442,13 +463,13 @@ def main():
|
||||
printf("版本: 20230602")
|
||||
printf("说明: 如果用Wxpusher通知需配置WP_APP_TOKEN_ONE和WP_APP_MAIN_UID,其中WP_APP_MAIN_UID是你的Wxpusher UID")
|
||||
printf("隧道型代理池接口:export WSKEY_PROXY_TUNNRL='http://127.0.0.1:123456'")
|
||||
printf("拉取型代理API接口(数据格式:txt;提取数量:每次一个):export WSKEY_PROXY_URL='http://xxx.com/apiUrl'")
|
||||
printf("拉取型代理API接口(数据格式:txt;提取数量:每次一个):export DY_PROXY='http://xxx.com/apiUrl'")
|
||||
printf("没有代理可以自行注册,比如携趣,巨量,每日免费1000IP,完全够用")
|
||||
printf("====================================")
|
||||
config=""
|
||||
envtype=""
|
||||
global proxy_url
|
||||
proxy_url=os.environ.get("WSKEY_PROXY_URL") or os.environ.get("WSKEY_PROXY_TUNNRL") or None
|
||||
proxy_url=os.environ.get("DY_PROXY") or os.environ.get("WSKEY_PROXY_TUNNRL") or None
|
||||
iswxpusher=False
|
||||
counttime=0
|
||||
|
||||
@@ -479,7 +500,7 @@ def main():
|
||||
iswxpusher=False
|
||||
|
||||
if proxy_url is None:
|
||||
printf("没有配置代理,无法使用代理!\n请配置环境变量WSKEY_PROXY_TUNNRL或WSKEY_PROXY_URL\n")
|
||||
printf("没有配置代理,无法使用代理!\n请配置环境变量WSKEY_PROXY_TUNNRL或DY_PROXY\n")
|
||||
printf("====================================")
|
||||
else:
|
||||
printf(f"已配置代理: {proxy_url}\n")
|
||||
|
||||
+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
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user