日度归档:2021年7月21日

基于Mozilla的send,搭建简单的文件资料分享平台,从此跟用微信发文件的行为告别 2021-7-21

需求描述

日常,需要发送文件,图片,压缩包,链接等内容给朋友,大家常用的肯定是QQ/Wechat,这其实如同吉利公司老板说的,其实很不具备隐私,而且,想用微信发送超过100MB的文件,就直接被拒绝,无奈。

那么有什么简单可靠的分享资料的方式呢,哈哈,Mozilla的send的项目正适合你。

需要的资源

  1. 云服务器 x1
  2. Node.js环境 x1
  3. Git可访问 x1

安装部署步骤如下

Mozilla的send是基于Node.js 12.x开发的,故而需要先安装Node.js

Node.js官方网站 https://nodejs.org/

安装Node.js相对简单,直接参考Node.js官方的Github页面,里面包含多平台的简单脚本安装方式,进行对应系统版本的安装 https://github.com/nodesource/distributions

# 我这里是Debian 9 系统,则对应安装Node.js 12.X的步骤为
root@debian:~# apt-get update
root@debian:~# apt-get install curl apt-transport-https ca-certificates gnupg2 software-properties-common git wget 
root@debian:~# curl -fsSL https://deb.nodesource.com/setup_12.x | bash -
root@debian:~# apt-get update
root@debian:~# apt-get install -y nodejs

root@debian:~# nodejs -v
v12.22.2
root@debian:~# 

在安装完成Node.js之后,部署Mozilla/send

项目地址https://github.com/mozilla/send

下载send的源包,https://github.com/mozilla/send/archive/refs/tags/v3.0.22.tar.gz

// 下载,解压,安装
root@debian:~# wget https://github.com/mozilla/send/archive/refs/tags/v3.0.22.tar.gz
root@debian:~# tar -zxvf v3.0.22.tar.gz
root@debian:~# cd /send-3.0.22
root@debian:~# npm install   // 需要比较久的时间
root@debian:~# npm audit fix   // 执行上一步,如果有失败,则运行该命令补充
// root@debian:~# npm run prod
root@debian:~# /usr/bin/node /usr/bin/npm run prod

困了,先睡觉,未完待续……

基于stairspeedtest-reborn的WEB页面方式,来进行代理检测 2021-7-21

需求描述
自己编写的编号P2FA项目的爬虫程序已经采集到三万多个V2ray代理了,循环检测,输出,使用的时候,需要检测一下代理的速度,手机客户端检测非常不便捷,这个时候,就可以使用到WEB页面的检测方式,来进行代理检测

采集的代理数量
采集的代理数量 2021-7-21

基于免费代理制作成的订阅,由于检测机制的不密集,常会出现,检测时候可用,实际想要用的时候,不可用,而且,手机上无法感知真实的服务器速度,这个时候,通过WEB方式检测线路,然后直接手机上使用即可。

本次,基于Github上的stairspeedtest-reborn项目,Linux环境,进行WEB部署。

本次部署到Debian 9 x64云主机上,下载对应到系统平台版本的 stairspeedtest-reborn-v0.7.1-release

# 下载
root@debian:~# wget https://github.com/tindy2013/stairspeedtest-reborn/releases/download/v0.7.1/stairspeedtest_reborn_linux64.tar.gz
# 解压
root@debian:~# tar -zxvf stairspeedtest_reborn_linux64.tar.gz
# 进入工作目录
root@debian:~# cd stairspeedtest
# 修改配置文件 pref.ini
修改test_file_urls项的内容为自定义的测速文件,一般3个不同地域的服务器,每个10MB左右的文件足够
# 修改启动项文件 webgui.sh 
修改默认端口到一个其他端口,一般不推荐用默认端口
# 启动
root@debian:~# nohup ./webgui.sh &

在上述的服务端启动后,在自己的本机的浏览器输入服务器的地址,即可访问

StairSpeedtes的页面

输入自己的订阅地址自定义组名,点击提交即可

执行完成后,页面自动刷新,输出一个表格,输出一个图片

完成测速的截图

可以看到,在自己修改了配置文件后,本次测速,只用了220MB的总流量,比较节约。免费节点的速度,也就如图,白嫖真快乐。

有了这样的神器,再也不用担心,手机上选择时候的困境了。

Dasmz的StairSpeedtest演示站点 http://125.3.8.244:1333/gui.html

备注1,一般不要使用别人提供的测速站点,会泄漏你自己的订阅地址

备注2,公网环境,诚挚建议把站点用HTTPS封装一下,保证数据安全

Donate
云乞讨