Coder Social home page Coder Social logo

elecv2 / elecv2p Goto Github PK

View Code? Open in Web Editor NEW
1.4K 38.0 309.0 9.36 MB

一款基于 NodeJS,可通过 JS 修改网络请求,以及定时运行脚本或 SHELL 指令的网络工具。

Home Page: https://elecv2p.onrender.com

Dockerfile 0.04% JavaScript 46.55% Shell 0.09% Python 2.18% Vue 48.66% CSS 2.16% HTML 0.32%
mitm cron javascript anyproxy ifttt v2p nodejs vue

elecv2p's Issues

TypeError: Cannot read property 'code' of undefined

运行脚本 https://raw.githubusercontent.com/nzw9314/QuantumultX/master/Task/jd_fruit.js 时报错:
TypeError: Cannot read property 'code' of undefined
at step (evalmachine.:252:43)
at step.next ()
at Timeout._onTimeout (evalmachine.:596:14)
at listOnTimeout (internal/timers.js:549:17)
at processTimers (internal/timers.js:492:7)
error Command failed with exit code 7.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

加入自定义推送链接重启v2p就启动不了

日志错误如下:
[elecV2Proc error][2021-02-25 16:58:48.832] Caught exception TypeError: req.url.replaceAll is not a function
at custPush (D:\V2P\utils\feed.js:161:23)
at feedPush (D:\V2P\utils\feed.js:228:5)
at Object.push (D:\V2P\utils\feed.js:235:5)
at feedAddItem (D:\V2P\utils\feed.js:259:17)
at Task.start (D:\V2P\func\task.js:26:7)
at D:\V2P\func\task.js:65:25
at Object. (D:\V2P\func\task.js:68:2)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)

设置看截图
1234

不兼容

arm64又不兼容了,打不开了
image

能否在空闲之余增加一个企业微信推送接口?

感谢大佬辛苦付出,软件很好用,但是因为手机是安卓的,没有bark,sever酱常常没有响应,自从换了企业微信以来,非常稳定且样式好看,请大佬空闲之余,增加企业微信通知接口。

脚本通知有概率丢失

多账号的脚本,有时候只能收到其中一个账号的通知。查看日志,丢失的账号通知,是正常的。

但是手机没有正确收到推送。

Android下运行elecV2P的问题

准备工作:

目前使用Android上的Termux搭建了一个平台跑elecV2P,git clone整个项目到/sdcard/Github/Nodejs/文件夹下,wifi代理设置为手动127.0.0.1:8001./anyproxy/certificate下的证书已经复制到/sdcard/Github/Nodejs/elecV2P/rootCA/文件夹下,同时rootCA.crt已经安装到手机系统中。设置已经按照教程做好了,使用Nodejs方式运行(yarn start),因主页面端口80无法访问,自行修改了config.js配置文件中的webst: 8080。测试能够使用Chrome Canary浏览器正常访问后台管理页面(以下简称webui)、代理请求查看端口8002(以下简称AnyProxy)
image
image
image
image
image

具体操作

尝试使用elecV2P抓取企鹅阅读的cookie,webui中rewrite已按照脚本说明设置好,且对应的js能够正常访问。mitm中mitm host也已设置正确,cfilter中分流列表也做了设置。
访问QQ app中企鹅阅读小程序后,返回AnyProxy可以看到抓包情况
image
image
image
image

问题

目前出现以下几个问题,请开发者解答一下
1.AnyProxy中,抓包的网址code全部为200,是否正常?
2.AnyProxy中,选择查看抓取的url后,只有第一次可以在网页的右面看到详细信息,之后不管怎么重启elecV2P服务都不会再显示了,这个情况是什么原因?
image
3.已经完全按照TG频道中的教程做的,为什么cookie的解密信息依旧看不到?(rootCA.crt证书已安装,mitm中解密域名也设置了)
4.Termux日志中并不会出现类似抓取xxx cookie成功的提示
image

恳请开发者能够解答一下,非常希望在Android上通过Termux搭建平台使用上elec2V2P,通过elec2V2P抓包,非常方便

elecV2P 软更新失败 timeout of 5000ms exceeded

[softup...js info][2021-04-09 21:28:30.855] 开始获取最新版本号...
[softup...js info][2021-04-09 21:28:31.459] 当前版本: 3.2.8 最新版本: 3.2.9
[softup...js info][2021-04-09 21:28:31.459] 检测到有新的版本: 3.2.9
[softup...js info][2021-04-09 21:28:31.459] 向 webhook 端口发送保存当前任务列表的指令
[softup...js info][2021-04-09 21:28:31.460] 开始获取更新文件列表
[softup...js info][2021-04-09 21:28:31.466] You don't have permission to access.
IP: 127.0.0.1 is recorded.

Powered BY elecV2P: https://github.com/elecV2/elecV2P
[softu...js error][2021-04-09 21:28:36.462] elecV2P 软更新失败 timeout of 5000ms exceeded

第隔小时重启

Snipaste_2020-12-10_15-46-03
[elecV2Proc error][2020-12-10 15:42:39.032]: Caught exception line 741:12 error: notify.sendNotify is not a function
/usr/local/app/node_modules/brotli/build/encode.js:3
1<process.argv.length?process.argv[1].replace(/\/g,"/"):"unknown-program");b.arguments=process.argv.slice(2);"undefined"!==typeof module&&(module.exports=b);process.on("uncaughtException",function(a){if(!(a instanceof y))throw a;});b.inspect=function(){return"[Emscripten Module object]"}}else if(x)b.print||(b.print=print),"undefined"!=typeof printErr&&(b.printErr=printErr),b.read="undefined"!=typeof read?read:function(){throw"no read() available (jsc?)";},b.readBinary=function(a){if("function"===
^

TypeError: notify.sendNotify is not a function
at showmsg (evalmachine.:741:12)
at Timeout._onTimeout (evalmachine.:283:15)
at listOnTimeout (node:internal/timers:556:17)
at processTimers (node:internal/timers:499:7)
error Command failed with exit code 7.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
yarn run v1.22.5
$ node index.js

task

大佬,本来想提交个issue,后来发现是我自己的问题,issue不会删除,打扰了

task 任务保存无效

在task定时任务界面
修改了任务,点击保存当前任务列表,保存后刷新又复原成原来未修改前的了。
但是重启容器,又会变成修改后的。
2021.1.19更新镜像后还是有这个问题。

一个脚本无限弹通知

[utilsFeed notify][2020-12-11 10:15:16.356]: bark notify: 中青看点 获取Cookie: 成功🎉 a empty message.
没有任何通知内容。
[AnyProxy Log][2020-12-11 10:15:16]: received request to: POST kd.youth.cn/TaskCenter/sign
[AnyProxy Log][2020-12-11 10:15:16]: received request to: POST kd.youth.cn/TaskCenter/sign
[AnyProxy Log][2020-12-11 10:15:16]: received request to: POST kd.youth.cn/TaskCenter/sign
[runJSFile notify][2020-12-11 10:15:16.701]: run youth.js from rule
[youth.js notify][2020-12-11 10:15:16.716]: 中青看点 获取阅读请求: 成功🎉
[utilsFeed notify][2020-12-11 10:15:16.717]: bark notify: 中青看点 获取阅读请求: 成功🎉 a empty message.
没有任何通知内容。
[runJSFile notify][2020-12-11 10:15:16.732]: run youth.js from rule
[youth.js notify][2020-12-11 10:15:16.747]: 中青看点 获取Cookie: 成功🎉
[utilsFeed notify][2020-12-11 10:15:16.747]: bark notify: 中青看点 获取Cookie: 成功🎉 a empty message.
没有任何通知内容。
[AnyProxy Log][2020-12-11 10:15:16]: received request to: POST kd.youth.cn/TaskCenter/sign
[runJSFile notify][2020-12-11 10:15:16.897]: run youth.js from rule
[youth.js notify][2020-12-11 10:15:16.912]: 中青看点 获取阅读请求: 成功🎉
[utilsFeed notify][2020-12-11 10:15:16.914]: bark notify: 中青看点 获取阅读请求: 成功🎉 a empty message.
没有任何通知内容。
[AnyProxy ERROR][2020-12-11 10:15:17]: Error: connect ETIMEDOUT 198.18.0.196:80
[AnyProxy ERROR][2020-12-11 10:15:17]: Error: connect ETIMEDOUT 198.18.0.196:80
[AnyProxy ERROR][2020-12-11 10:15:17]: Error: connect ETIMEDOUT 198.18.0.196:80
[AnyProxy ERROR][2020-12-11 10:15:17]: Error: connect ETIMEDOUT 198.18.0.196:80
[AnyProxy ERROR][2020-12-11 10:15:17]: Error: connect ETIMEDOUT 198.18.0.196:80
[AnyProxy ERROR][2020-12-11 10:15:17]: Error: connect ETIMEDOUT 198.18.0.196:80
[AnyProxy ERROR][2020-12-11 10:15:17]: Error: connect ETIMEDOUT 198.18.0.196:80
[AnyProxy ERROR][2020-12-11 10:15:17]: Error: connect ETIMEDOUT 198.18.0.196:80
[AnyProxy ERROR][2020-12-11 10:15:17]: Error: connect ETIMEDOUT 198.18.0.196:80
[AnyProxy ERROR][2020-12-11 10:15:17]: Error: connect ETIMEDOUT 198.18.0.196:80
[AnyProxy ERROR][2020-12-11 10:15:17]: Error: connect ETIMEDOUT 198.18.0.196:80
[AnyProxy ERROR][2020-12-11 10:15:17]: Error: connect ETIMEDOUT 198.18.0.196:80
[AnyProxy ERROR][2020-12-11 10:15:17]: Error: connect ETIMEDOUT 198.18.0.196:80
[AnyProxy Log][2020-12-11 10:15:18]: received request to: POST kd.youth.cn/TaskCenter/sign
[AnyProxy Log][2020-12-11 10:15:18]: received request to: POST kd.youth.cn/TaskCenter/sign
[AnyProxy Log][2020-12-11 10:15:18]: received request to: POST kd.youth.cn/TaskCenter/sign
[AnyProxy Log][2020-12-11 10:15:18]: received request to: POST kd.youth.cn/TaskCenter/sign
[AnyProxy Log][2020-12-11 10:15:18]: received request to: POST kd.youth.cn/TaskCenter/sign
[AnyProxy Log][2020-12-11 10:15:18]: received request to: POST kd.youth.cn/TaskCenter/sign
[AnyProxy Log][2020-12-11 10:15:18]: received request to: POST kd.youth.cn/TaskCenter/sign
[AnyProxy Log][2020-12-11 10:15:18]: received request to: POST kd.youth.cn/TaskCenter/sign
[AnyProxy Log][2020-12-11 10:15:18]: received request to: POST kd.youth.cn/TaskCenter/sign
[AnyProxy Log][2020-12-11 10:15:18]: received request to: POST kd.youth.cn/TaskCenter/sign
[AnyProxy Log][2020-12-11 10:15:18]: received request to: POST kd.youth.cn/TaskCenter/sign
[AnyProxy Log][2020-12-11 10:15:18]: received request to: POST kd.youth.cn/TaskCenter/sig

docker-compose.yaml的小错误

ERROR: Version in "./docker-compose.yaml" is unsupported. You might be seeing this error because you're using the wrong Compose file version. Either specify a supported version (e.g "2.2" or "3.3") and place your service definitions under the `services` key, or omit the `version` key and place your service definitions at the root of the file to use version 1.
For more on the Compose file format versions, see https://docs.docker.com/compose/compose-file/

将docker-compose.yaml 里面version的 3.7 改成 3解决了

不懂是不是docker-compose 版本低的情况情况引起的

能否考虑容器内部自动同步github代码

非常感谢作者开发的工具
现在有这个小问题,比如现在容器安装的py环境和依赖库,下次更新镜像,更新容器后py环境和依赖是不是就会没有。那能不能请容器内改成自动同步github的代码。

提一个小问题

从订阅链接中添加任务时,使用替换功能,点击添加替换后,UI界面运行状态会变成停止,但实际还在运行,刷新后显示正在运行状态

安卓代理抓包

image
使用elecV2P(安卓)抓包聚看点,出现上面错误,不清楚是否是脚本的原因
image
这句话意思是这样嘛
image

有概率出现请求 timeout of 5000ms exceeded

task 会脚本出现

[jd_joy...js info][2020/12/3 08:00:01]: 
🔔宠汪汪积分兑换奖品, 开始!
[jd_joy...js info][2020/12/3 08:00:01]: 
开始【京东账号1】脱衣服

[jd_jo...js error][2020/12/3 08:00:07]: $httpClient {"url":"https://jdjoy.jd.com/gift/getHomeInfo","headers":{"Host":"jdjoy.jd.com","Cookie":"脱敏","reqSource":"h5","Connection":"keep-alive","Accept":"*/*","User-Agent":"jdapp;iPhone;9.2.5;14.2;%E4%BA%AC%E4%B8%9C/9.2.5 CFNetwork/1206 Darwin/20.1.0","Referer":"https://jdjoy.jd.com/pet/index","Accept-Language":"zh-cn","Accept-Encoding":"gzip, deflate, br","Content-Type":"application/x-www-form-urlencoded"}} timeout of 5000ms exceeded
[jd_joy...js info][2020/12/3 08:00:07]: "request config error"
[jd_joy...js info][2020/12/3 08:00:07]: 宠汪汪积分兑换奖品 API请求失败,请检查网路重试
[jd_joy...js info][2020/12/3 08:00:07]: 宠汪汪积分兑换奖品getExchangeRewards异常,undefined
[jd_joy...js info][2020/12/3 08:00:07]: 
开始【京东账号2】脱裤子

[jd_joy...js info][2020/12/3 08:00:10]: 当前积分 20243

[jd_joy...js info][2020/12/3 08:00:10]: 宠物等级 16

[jd_joy...js info][2020/12/3 08:00:10]: 京东昵称 幾米orz

[jd_joy...js info][2020/12/3 08:00:10]: 当前京豆库存:127
[jd_joy...js info][2020/12/3 08:00:10]: saleInfoId:192
[jd_joy...js info][2020/12/3 08:00:10]: 当前账户积分:20243
当前京豆库存:127
满足兑换条件,开始为您兑换京豆

[jd_joy...js info][2020/12/3 08:00:11]: 兑换500成功,【宠物等级】16
【消耗积分】8000个
【剩余积分】12243个

[jd_j...js notify][2020/12/3 08:00:11]: 宠汪汪积分兑换奖品 兑换500京豆成功 【京东账号2】脱裤子
【宠物等级】16
【积分详情】消耗积分 8000, 剩余积分 12243 
[jd_joy...js info][2020/12/3 08:00:11]: 
==============📣系统通知📣==============
宠汪汪积分兑换奖品
兑换500京豆成功
【京东账号2】脱裤子
【宠物等级】16
【积分详情】消耗积分 8000, 剩余积分 12243
[jd_joy...js info][2020/12/3 08:00:11]: 
🔔宠汪汪积分兑换奖品, 结束! 🕛 9.586 秒

rules 规则的脚本调用也会出现

[utilsFile  error][2020/12/3 09:53:56]: store key dd_autoCharge no exist.
[utilsFile  error][2020/12/3 09:53:56]: store key dd_notifyTime no exist.
[utilsFile  error][2020/12/3 09:53:56]: store key jx_showLog no exist.
[utilsFile  error][2020/12/3 09:53:56]: store key jx_autoCharge no exist.
[utilsFile  error][2020/12/3 09:53:56]: store key jx_notifyTime no exist.
[boxjs...js error][2020/12/3 09:53:59]: Error: Script execution timed out after 5000ms
    at Script.runInContext (node:vm:143:18)
    at Script.runInNewContext (node:vm:148:17)
    at Object.runInNewContext (node:vm:303:38)
    at runJS (/usr/local/app/script/runJSFile.js:118:23)
    at runJSFile (/usr/local/app/script/runJSFile.js:174:10)
    at requestDetail.requestOptions.headers.User-Agent (/usr/local/app/script/rule.js:231:21)
    at new Promise ()
    at Object.beforeSendRequest (/usr/local/app/script/rule.js:230:14)
    at beforeSendRequest.next ()
    at onFulfilled (/usr/local/app/node_modules/co/index.js:65:19)
[utilsFile  error][2020/12/3 09:39:20]: no list useragent.list
[utilsFile  error][2020/12/3 09:39:22]: no list rewrite.list
[utilsFile  error][2020/12/3 09:39:22]: no list useragent.list
[utilsFeed  error][2020/12/3 09:39:28]: Client network socket disconnected before secure TLS connection was established
[utilsFile  error][2020/12/3 10:17:15]: no list useragent.list
[utilsFile  error][2020/12/3 10:17:18]: no list rewrite.list
[utilsFile  error][2020/12/3 10:17:18]: no list useragent.list
[utilsFile  error][2020/12/3 10:36:41]: no list useragent.list

不知道 eAxios 相关设置 的 TIMEOUT: 5000 是否跟这个 5000有关联?
我修改这个5000为其他值(20000)也没用。依旧报 5000ms 错误。

rules 规则的脚本一般不会出现超时的情况吧?

Docker 启动直接退出

如题,系统是 Debian ,log信息如下:
yarn run v1.22.5
$ node index.js
[utilsFile error][2021-01-26 11:03:42.575] no list useragent.list
[elecV2Proc error][2021-01-26 11:03:42.625] Caught exception Error: Cannot find module '../script/runJSFile'
Require stack:

  • /usr/local/app/func/task.js
  • /usr/local/app/func/index.js
  • /usr/local/app/webser/wbcrt.js
  • /usr/local/app/webser/index.js
  • /usr/local/app/webmodule.js
  • /usr/local/app/index.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:925:15)
    at Function.Module._load (node:internal/modules/cjs/loader:769:27)
    at Module.require (node:internal/modules/cjs/loader:997:19)
    at require (node:internal/modules/cjs/helpers:92:18)
    at Object. (/usr/local/app/func/task.js:7:23)
    at Module._compile (node:internal/modules/cjs/loader:1108:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
    at Module.load (node:internal/modules/cjs/loader:973:32)
    at Function.Module._load (node:internal/modules/cjs/loader:813:14)
    at Module.require (node:internal/modules/cjs/loader:997:19)
    elecV2P exited.
    Done in 0.52s.

浏览器误访问anyproxy代理端口导致几秒内出现数万个访问,内存占用激增nas服务器卡死崩溃

如题,使用docker安装
80 -> 7080
8001 -> 7081
8002 -> 7082
在浏览器访问nas的ip:7081时,7082的anyproxy观测到了数万的nas的ip:7081 的访问请求
yJ7FiT.md.png
内存从75%瞬间上涨到85%,占用内存从几十M翻了10倍多到400多M,nas卡死
yJ7kJU.md.png
希望能在设置增加 屏蔽浏览器对代理端口的get请求,或者增加代理端口的get请求限制频率。

isnode无法判断环境

image

很多脚本都是用isNode判断环境的,发现$.isNode()无法正确判断环境 导致脚本不能正常使用,望修复。。

更新2.8.6后不能运行企鹅阅读脚本,日志报错退出。

Snipaste_2020-12-08_21-47-08
[runJSFile notify][2020-12-08 21:45:15.443]: run qqreads.js from task
[qqreads.js info][2020-12-08 21:45:15.454]:
🔔企鹅读书, 开始!
[schedule info][2020-12-08 21:45:15.464]: schedule task: test finished
/usr/local/app/node_modules/brotli/build/encode.js:3
1<process.argv.length?process.argv[1].replace(/\/g,"/"):"unknown-program");b.arguments=process.argv.slice(2);"undefined"!==typeof module&&(module.exports=b);process.on("uncaughtException",function(a){if(!(a instanceof y))throw a;});b.inspect=function(){return"[Emscripten Module object]"}}else if(x)b.print||(b.print=print),"undefined"!=typeof printErr&&(b.printErr=printErr),b.read="undefined"!=typeof read?read:function(){throw"no read() available (jsc?)";},b.readBinary=function(a){if("function"===
^

TypeError: Object.key is not a function
at Object.body (/usr/local/app/script/context.js:22:34)
at Object.uest (/usr/local/app/script/context.js:38:18)
at surgeContext.surgeRequest (/usr/local/app/script/context.js:88:20)
at Object.post (/usr/local/app/script/context.js:131:12)
at Object.post (evalmachine.:706:5235)
at evalmachine.:332:7
at new Promise ()
at qqreadtrack (evalmachine.:324:10)
at Timeout._onTimeout (evalmachine.:230:21)
at listOnTimeout (node:internal/timers:556:17)
at processTimers (node:internal/timers:499:7)
error Command failed with exit code 7.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

无法起动

用的ARM的镜像搭建成功后只要运行js就会断开,这个怎么解决啊
image
还会提示这个
ReferenceError: errStack is not defined
at /usr/local/app/utils/eaxios.js:105:7
at processTicksAndRejections (node:internal/process/task_queues:93:5)

获取端口数据失败 Error: Network Error

建立容器后访问80端口对应的映射端口出现“获取端口数据失败 Error: Network Error”,“websocket 连接数: 已断开”
换了多个映射端口也是一样,请问是不是还要设置什么?

是否能接入boxjs

首先感谢作者的无私奉献。
我一直把这个项目当成电脑版本的quanx来使用,主要是运行一些定时js脚本任务。
不知道能否接入boxjs
实现自动抓取部分cookie
boxjs项目地址:https://github.com/chavyleung/boxjs-doc

因为是行外人,不太清楚是否有可实现性

远程推了个tieba.cookie.js上去,保存规则的时候对应js字体变红,提示无对应规则或js

刚装好想用elecV2P抓包,于是就拿百度贴吧cookie开刀,JS是
https://raw.githubusercontent.com/chavyleung/scripts/master/tieba/tieba.cookie.js

推送到本地服务器之后(点眼睛图标还看了下),填写REWRITE规则,却遇到了保存不了改写规则的怪事
tieba.cookie.js 变成了大红色,提示要删除新增的这条规则,原因:无对应规则或js

[wbjsfile    info][2021-01-13 20:47:52.918]: ::ffff:192.168.1.161 put js file
[eAxios    notify][2021-01-13 20:47:56.917]: download: https://raw.githubusercontent.com/chavyleung/scripts/master/tieba/tieba.cookie.js to: /home/rock/elecV2P/script/JSFile/tieba.cookie.js
[wbjsfile    info][2021-01-13 20:48:52.120]: ::ffff:192.168.1.161 get js file tieba.cookie.js
[wblist      info][2021-01-13 20:48:58.362]: ::ffff:192.168.1.161 保存 rewrite 规则列表
[wbjsfile    info][2021-01-13 20:49:39.838]: ::ffff:192.168.1.161 get js file tieba.cookie.js
[wbjsfile    info][2021-01-13 20:50:13.794]: ::ffff:192.168.1.161 post js file tieba.cookie.js
[wbjsfile  notify][2021-01-13 20:50:13.794]: tieba.cookie.js success saved

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.