anyproxy centos安装
很多网站的反爬,对Linux做了拦截,建议使用Windows或Mac。
参考:https://blog.csdn.net/baidu_27032161/article/details/105529100
先安装node环境,命令行中输入npm,未找到的话,系统会提示安装。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | # anyproxy install npm install anyproxy -g --registry=http: //registry .npm.taobao.org # 检查 anyproxy 是否安装成功 anyproxy --version # pm2 install (pm2对 anyproxy管理) npm install pm2 -g --registry=http: //registry .npm.taobao.org # 检查 pm2是否安装成功 pm2 --version # anyproxy CA证书生成 (for https) anyproxy-ca # anyproxy 开启多个实例 # 修改anyproxy 安装路径下的 rule_default.js,并创建多个 (rule_default.js 如:rule_default_1.js、rule_default_2.js) # 注释 beforeDealHttpsRequest()方法 // *beforeDealHttpsRequest(requestDetail) { // return null; // }, # 启用多个anyproxy实例 pm2 start anyproxy --name anyproxy1 -- -i -p 8001 -w 8002 -r /usr/local/lib/node_modules/anyproxy/lib/rule_default .js pm2 start anyproxy --name anyproxy2 -- -i -p 8003 -w 8004 -r /usr/local/lib/node_modules/anyproxy/lib/rule_default .js # 查看当前 anyproxy运行状态 pm2 list # pm2 启动?停止 anyproxy pm2 start anyproxy pm2 stop anyproxy pm2 restart anyproxy # 开启自启动 pm2 save # 保存当前pm2运行的各个应用,重启时就会启动保存的各个应用。再执行命令 pm2 startup |
CentOS 8 添加根证书信任:
localhost:8002 打开anyproxy的WEB UI,在最左侧菜单找到RootCA,下载证书,之后执行
1 2 3 | cp rootCA.crt /etc/pki/ca-trust/source/anchors update-ca-trust extract |
node中操作mysql:https://www.runoob.com/nodejs/nodejs-mysql.html
node中buffer对象:https://www.cnblogs.com/xuxiaozhi/p/7844673.html
1 | JSON.parse(buffer.toString()) |
node时间相关操作:https://blog.csdn.net/u011146511/article/details/81146336
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步