首页
关于我们
友链链接
壁纸下载
更多
统计中心
热点搜索
图床上传
推荐
剩余价值
磁链清理
Search
1
[Win DD包] wes7-x86-cn-精简,安装后仅占用1.55G存储空间
25,509 阅读
2
保姆级教程!甲骨文ARM DD成Debian10并升级内核成5.10
6,206 阅读
3
v2rayN基础使用教程、配置说明、添加订阅、路由选择
5,419 阅读
4
N1教程:Openwrt安装docker webui界面(基于flippy openwrt n1固件)
5,235 阅读
5
ZFAKA小店Docker版之 数据的备份和迁移
5,088 阅读
Linux学堂
网站建设
网络资源
主题插件
固件工具
主机评测
登录
Search
标签搜索
vps
typecho
linux
bench
mysql
cloudflare
nginx
lnmp
ssl
empirecms
openwrt
centos
google
docker
n1
301
qbittorrent
telegram
free
onedrive
V+变量
累计撰写
277
篇文章
累计收到
214
条评论
首页
栏目
Linux学堂
网站建设
网络资源
主题插件
固件工具
主机评测
页面
关于我们
友链链接
壁纸下载
统计中心
热点搜索
图床上传
推荐
剩余价值
磁链清理
搜索到
89
篇与
的结果
2025-03-12
再谈网站状态监控利器-免费的网站运行状态监控工具——UptimeRobot
前言之前本站介绍过如何在VPS部署uptime kuma实现24小时网站状态监控:采用uptime kuma搭建开源网站运维,24小时自动监控你的网站状态。今天介绍的另外一款网站状态监测工具Uptime Robot。UptimeRobot是国外的一个网站监控服务,添加网站到监控列表之后,可以24小时监控网站的运行状态,当网站无法访问时会立即通知用户。该服务提供了免费和付费两个版本,免费版的服务是5分钟检测一次,这个频率对于我的个人网站来说已经足够,所以就不考虑付费了(白嫖怪嘤嘤嘤)。设置了监控服务之后,在UptimeRobot网站可以查看网站的监控状态,但是配置起来还挺麻烦的,访问速度也不快。因此不使用这种方式,而是基于官方提供的API,在本地搭建一个页面来显示网站的运行状态。要用到的是github上一个基于UptimeRobot API的项目。这是项目的github地址:https://github.com/yb/uptime-status将这个项目clone拉取到本地。一、将网站添加到监控列表进入UptimeRobot官网https://uptimerobot.com/,使用邮箱注册一个账号之后登陆,点击“Go to Dashboard”,进入监控仪表盘点击左上角“Add New Monitor”。按照如下设置给自己的网站添加监控:二、获取监控网站的api在仪表盘界面点击“My Setting”:往下找到“Read-only API Key”选项,点击最后一行的“Create the read-only API key”,创建一个API key,然后复制下这个API,后面会用到这个API key。三、修改项目文件打开刚才从github上拉取下来的项目文件夹,我们要修改其中的“config.js”这个文件,只需要修改“SiteName”、“SiteUrl”、“ApiKeys”这三项,,前两项就是网站名和网站链接,第三项改成上一步复制的Api Keys,最后还有一个项是“Navi”,是指页面右上角的导航栏菜单项,改不改都行,不影响前面的显示。这个具体的修改细则作者已经在注释中说的很详细了。整个修改完之后别忘了保存,然后打开 “index.html”,就能看到网站的运行状态了,大概是这样:接下来把整个项目文件扔到网站的目录下,就算是大功告成了。
2025年03月12日
53 阅读
3 评论
0 点赞
2025-03-11
采用uptime kuma搭建开源网站运维,24小时自动监控你的网站状态
一 前言作为网站站长,最担心的就是网站掉线不能访问,但个人站长没有那么多时间和精力时刻盯着网站,这个时候自动监控网站状态的程序就能让站长朋友解放出来。如果您像我一样在服务器上托管了多个网站,并且没有足够的时间来手动检查每个网站的在线状态,那么当出现问题时,您可能无法及时收到通知来处理这些问题。因此,搭建一个在线监控服务是很有必要的,它可以在状态异常时提醒您,以便您能够及时处理问题,确保网站的稳定性和可用性。更多网站监控可以查看[再谈网站状态监控利器-免费的网站运行状态监控工具——UptimeRobot](https://www.vvars.com/package-tool/Let-s-talk-about-the-website-status-monitoring-tool---the-free-website-operation-status-monitoring-tool---UptimeRobot.html)监控服务有很多,我最终选择了Uptime Kuma,因为Uptime Kuma是开源免费的,在GIthub上目前有65.7k Star! 它搭建非常方便,占用系统资源低。uptime kuma功能丰富:监控 HTTP(s) / TCP / HTTP(s) 关键字 / HTTP(s) Json 查询 / Ping / DNS 记录 / 推送 / Steam 游戏服务器 / Docker 容器的正常运行时间 精美、反应灵敏、快速的 UI/UX 通过 Telegram、Discord、Gotify、Slack、Pushover、电子邮件 (SMTP) 和90 多种通知服务发送通知,查看完整列表:https://github.com/louislam/uptime-kuma/tree/master/src/components/notifications 20 秒间隔 多语言 多个状态页面 将状态页面映射到特定域 Ping 图表 证书信息 代理支持 2FA 支持二 安装教程uptime kuma的安装较为简单,本节介绍如何在VPS上安装uptime kuma。1 条件准备uptime kuma支持windows和主流linux系统;✅ 主要 Linux 发行版,例如 Debian、Ubuntu、CentOS、Fedora 和 ArchLinux 等。 ✅ Windows 10 (x64)、Windows Server 2012 R2 (x64) 或更高版本 ❌ FreeBSD / OpenBSD / NetBSD ❌ Replit/Heroku运行需要的依赖:Node.js 18 / 20.4 npm 9 Git pm2-用于在后台运行 Uptime Kuma2 SSH登录VPS,安装依赖,依次执行下面代码apt update apt install npm -y apt install git -y3 Clone代码到VPSgit clone https://github.com/louislam/uptime-kuma.git4 打开uptime-kuma并安装启动程序cd uptime-kuma npm run setup5 安装pm2和pm2-logrotatenpm install pm2 -g pm2 install pm2-logrotate6 利用pm2启动后台服务pm2 start server/server.js --name uptime-kuma7 Uptime Kuma 现已在http://ip地址:3001上运行8 其他pm2命令# 查看当前控制输出 pm2 monit # 开机自启动 pm2 save && pm2 startup9 设置报警通知以tg为例:10添加需要监控的网站监控频率根据你的需要和服务器能力设置,我设置的是5分钟
2025年03月11日
41 阅读
1 评论
0 点赞
2025-03-09
在 Linux 上使用 WireGuard 协议设置 FastestVPN
一前言之前本站介绍过如何白嫖FastestVPN永久使用权:白嫖fastestvpn:免费为你的小鸡添加45+国家/100+地区落地永久出口,并解锁GPT/流媒体。本文介绍在 Linux 上设置 WireGuard 协议,本教程介绍如何通过命令行界面 (CLI) 在基于 Debian 的 Linux(Debian、Ubuntu、Mint、Kali 等)上设置 WireGuard 协议。二设置教程1 初始准备步骤通过运行sudo apt update && sudo apt upgrade命令来更新系统上的过时软件包。2 输入sudo -i切换到root用户并安装WireGuard。apt install wireguard -y3 在 WireGuard 目录中添加您的 WireGuard conf 文件。sudo nano /etc/wireguard/dallas.conf注意:在此示例中,配置文件名为“ dallas.conf ”,因为我们在文件中添加了达拉斯 VPN 服务器地址。您可以为配置文件选择任何名称,例如london.conf或任何您喜欢的名称。4 打开 FastestVPN 提供给您的 WireGuard 配置文件并复制其所有内容。如果没有 WireGuard .conf 文件,可以通过实时聊天联系或发送电子邮件给官方。5 现在将复制的文本粘贴到 /etc/wireguard/dallas.conf 中Linux WireGuard 设置6 按CTRL+O保存文件,然后按Ctrl+X关闭文件。7 最后,运行此命令以激活 WireGuard VPN。sudo wg-quick up dallas注意:在上面的命令中,添加你的 WireGuard 配置名称来代替dallas,并且不要在其后面添加.conf。8 要验证 VPN 连接,请输入:sudo wg您还可以访问theipinfo.com等网站来确认 VPN 是否正常运行。9 要断开 WireGuard VPN,请运行以下命令。sudo wg-quick down dallas10 在 Linux 上激活 WireGuard 后无法访问互联网如果连接到 WireGuard 隧道后失去互联网访问,请打开 .conf 文件并确保以“AllowedIPs”开头的行如下所示。(如下面的屏幕截图所示)AllowedIPs = 0.0.0.0/0如果仍然不起作用,请在文件的最后一行更改 VPN 服务器地址。
2025年03月09日
24 阅读
1 评论
0 点赞
2025-03-09
白嫖fastestvpn:免费为你的小鸡添加45+国家/100+地区落地永久出口,并解锁GPT/流媒体
一前言1 一次购买永久可用的软件fastestvpn搞推广了,白嫖软件不止,还能小赚。现价30美元,返利30.3美元。众所周知,MJJ们通常偏向于使用线路好的小鸡自建代理服务,享受小鸡带来的高可玩性、高拓展性与探索带来的乐趣,却又对机场提供的广泛的节点地域分布优势垂帘三尺,那么有没有一种可能,实现All in One,我全都要?偶然想到一个好活,国际传统VPN产品(例如Nord、Express、Surfshark等)一般均支持WireGuard协议,且不限流量、节点分布广、流媒体解锁优秀,正好Xray也支持WireGuard作为出站协议,那么能否购买传统VPN“套”到自己的VPS上,实现一拖全世界?基于此,发现一个极度合适的选择,fastestvpn在美国知名返利站TopCashback上提供返利101%,购买永久方案(送个1年密保软件,感觉用不上),全额返还白赚!fastestvpn的节点覆盖范围超过全球100个国家/地区,提供无限流量、15设备数、部分节点支持解锁GPT及流媒体等优势。且允许客户使用非官方客户端,非常适合作为小鸡代理出口使用。真不是fastestvpn广告,别家我都帮你们都看过了,返利比例都低.关于如何在linux配置wireguard可以参考:在 Linux 上使用 WireGuard 协议设置 FastestVPN。2 此方案可帮助解决的问题流媒体(Netflix/Disney+/动画疯等)、GPT的解锁及跨区问题 谷歌IP送中(具体表现为无法享受油管会员权益) 防止IP Abuse投诉造成的麻烦(例如跑BT容易吃DMCA等) 薅羊毛等特殊场景需要临时使用特定国家(地区)的节点 缓解IP太黑导致被部分网站封锁或频繁弹出验证码 突破机房或上游对特定网站进行的封锁(例如不少台湾商家会封锁.gov.tw站点、韩国会封锁部分色情网站) 更大限度保障互联网生活的隐私和安全性(机房和上游将无法知晓你访问过哪些网站) 为什么不选Warp? 有人说,为什么不选免费的Cloudflare Warp?虽说Warp也支持WireGuard作为Xray出口,但Warp的IP普遍太黑(部分IP甚至谷歌搜索都出验证码)、解锁需要靠刷IP、不支持指定其它国家/地区的节点出口。3关于风险 / 是不是灵车?TopCashback是美国知名返利网站(类似于国内的淘宝客),顾客通过其链接下单可获得现金返利奖励,不同品牌及类目的返利比例不同。TopCashback目前在TrustPilot上有1.2W条评价,评分为4.6分。4 关于返利周期和安全保障fastestvpn支持30天无理由退款、支持PayPal。TopCashback对于fastestvpn的101%返利需要等待约3个月后才能提现,但由于fastestvpn支持Paypal付款,而Paypal争议的保障期是六个月,综合考虑两个品牌的过往商誉,我个人认为风险并不算高,灵度较低。提现是绑定paypal就行了。二注册教程1注册TopCashback,并通过其入口下单注册链接注册完搜索fastestvpn即可看到101%返利活动,点击红色按钮会跳转到fastestvpn官网。注意:必须使用fastestvpn新账户下单,只有新账户才有返利!如果已经是老用户,建议更换浏览器下单,防止关联。建议找个可交易的邮箱注册,用不上这账号还可以卖给别人,纯赚。2 购买有中文界面,一路往下就可以。3 WINDOWS软件下载后,安装打开,登录后,这里改中文4 设置协议为WireGuard,这样就可以开始获取WireGuard的配置了。打开fastestvpn软件的安装目录,然后Resources\data子目录,连接自己需要的节点,然后在连接的时候,刚才打开的目录,会出现一个FastestVPNWireGuard.conf的配置文件,迅速打开它,在连接完成之后它会自动删除的。如果没打开前已经删除了也不要紧,可以直接问客服要一份WireGuard配置文件,这个VPN本来就支持的,可以用注册邮箱给
[email protected]
发邮件要求提供,正常客服看到后会尽快提供给你的。5 然后在你的X-UI面板添加出站设置再将你的某个已经创建好的线路指定出口,这样这条线路就是fastestvpn的IP了。6补充: 这软件国内能直连的节点较少,比较适合用于落地出口,如果想在本地使用的话,就不建议你入手了。7注意,过两天记得回返利网站看看,正常过6小时左右会显示返利30.3刀,如果返利过了三天还没生效,就去fastestvpn申请退款。
2025年03月09日
28 阅读
1 评论
0 点赞
2025-03-07
VPS流量用不完,利用webBenchmark做点有意义的事情——给垃圾VPS做压力测试
一前言1关于webBenchmarkGithub地址http 基准测试工具耗尽了您的服务器带宽。 用户在使用本工具前请先查看授权及免责声明,webBenchmark一个用于测试网页服务器性能的工具,启用其他用途,后果自负。 每次请求时随机使用 User-Agent 可自定义的 Referer Url, 可自定义的标题, 并发例程随您所愿,取决于您的服务器性能。 http post 模式 指定多目标ip,或者通过系统dns解析。 随机 X-Forwarded-For 和 X-Real-IP(默认开启)。2用途自动调整并发例程以获得最佳性能。 支持指定目标 IP 地址的非标准端口。 来自远程服务器的订阅基准测试任务。二 安装教程1 下载脚本wget https://github.com/maintell/webBenchmark/releases/download/0.5/webBenchmark_linux_x642 修改权限chmod +x webBenchmark_linux_x643 开启测试./webBenchmark_linux_x64 -c 32 -s https://target.url4 示例# send request to 10.0.0.1 and 10.0.0.2 for https://target.url with 32 concurrent threads # and refer is https://refer.url ./webBenchmark_linux_x64 -c 32 -s https://target.url -r https://refer.url -i 10.0.0.1 -i 10.0.0.2 # send request to https://target.url with header regid:123 and sign:Random10 ./webBenchmark_linux_x64 -s https://target.url -H 'regid:123' -H 'sign:QpXDYHdVzB'5 其他使用方法webBenchmark -c [COUNT] -s [URL] -r [REFERER] -c int concurrent routines for download (default 16) -r string referer url -s string target url (default "https://baidu.com") -i string custom ip address for that domain, multiple addresses automatically will be assigned randomly -H http header pattern http header pattern, use Random with number prefix will generate random string, same key will be overwritten -f string randomized X-Forwarded-For and X-Real-IP address -p string post content三 用途有收到诈骗短信的,可以抓一下他们的软件安装包,通过webBenchmark刷流量。(实测选用0.5或者0.6这种老版本的更好用)
2025年03月07日
27 阅读
0 评论
0 点赞
2025-03-07
端口敲门教程,防止端口被扫被爆破的简单方法
简介端口敲门通过关闭SSH端口,服务器监听预设的端口序列,当客户端按正确顺序敲门后,防火墙规则动态开放SSH端口,仅允许敲门成功的IP访问,阻止未授权访问。提示: 为了防止把自己关在门外,建议先测试再上生产环境,以下配置我是亲自测试过的能正常运行。正式开始1:安装iptables大部分常见的Linux发行版已经默认安装了,无需额外安装,并且你安装了Docker后也是肯定安装了iptables。可以运行iptables --version查看版本。如果没有安装,可以执行这个命令安装:sudo apt update && sudo apt install iptables -y2:安装端口敲门程序knockdsudo apt update && sudo apt install knockd -y3:配置knockdknockd的默认配置文件路径在/etc/knockd.conf[options] UseSyslog logfile = /var/log/knockd.log # 开启SSH访问 - 只允许敲门的IP访问 [openSSH] sequence = 5003,5001 seq_timeout = 15 start_command = /sbin/iptables -C INPUT -s %IP% -p tcp --dport 22 -j ACCEPT || /sbin/iptables -I INPUT 1 -s %IP% -p tcp --dport 22 -j ACCEPT tcpflags = syn cmd_timeout = 10 # 关闭所有SSH访问 - 阻止所有IP [closeSSH] sequence = 7001 seq_timeout = 15 start_command = /sbin/iptables -C INPUT -p tcp --dport 22 -j DROP || /sbin/iptables -I INPUT 1 -p tcp --dport 22 -j DROP && /sbin/iptables -D INPUT -s %IP% -p tcp --dport 22 -j ACCEPT 2>/dev/null tcpflags = syn cmd_timeout = 10可以将配置中的syn改成all,代表需要成功建立tcp三次握手才能触发敲门。也可以多增加几个敲门端口,也可以改成仅udp敲门,这样的话会加大触发敲门动作的难度4:启动knockdsudo systemctl enable knockd sudo systemctl start knockd5:关门网页访问7001端口关闭SSH服务,阻止所有IP访问SSH可以断开SSH连接,然后重新连接测试一下6:敲门按顺序网页访问5003和5001端口,即使网页返回无响应也能成功触发敲门,需要15秒内完成动作,敲门后会自动放行敲门的IP允许连接SSH。Liunx可以使用wget等命令敲门wget小提示:wget可以快速测试某个端口通不通,不通的话会直接返回拒绝连接(可选)关闭端口敲门停止并禁用knockdsudo systemctl stop knockd sudo systemctl disable knockd清除防火墙所有的自定义规则sudo iptables -F以上配置可以根据自己需求修改端口敲门不仅限于SSH端口,还能实现更多玩法。
2025年03月07日
32 阅读
0 评论
0 点赞
2025-03-07
LiNUX VPS上Server-Rust的手动安装教程
一 前言之前介绍了ServerStat在Linux VPS的安装配置、采用Vnstat来防止重启导致数据丢失的问题,以及如何在安装了openwrt的n1旁路由上安装Serverstat,需要的可以访问之前的博文:1)随时随地监控你的VPS状态——Serverstat部署折腾之路2)Serverstaus改用Vnstat统计VPS流量,避免服务器重启引起统计丢失3)N1折腾之openwrt安装ServerStatus_Rust客户端本文介绍下如何在LiNUX VPS上手动安装Server-Rust,包括client客户端和server服务器端的安装,client即发送流量信息的VPS,server即收集流量信息并汇总展示的VPS,一般1台服务器作为服务器端和客户端,其他VPS作为客户端。二 stat_client客户端安装教程1 /opt目录下创建ServerStat目录mkdir -p /opt/ServerStatus && cd /opt/ServerStatus2 下载stat_client客户端到官方地址下载根据自己的服务器内核选择合适的客户端版本,这里以x86 64位的Linux为例:wget --no-check-certificate -qO client-x86_64-unknown-linux-musl.zip https://github.com/zdz/ServerStatus-Rust/releases/download/v1.8.1/client-x86_64-unknown-linux-musl.zip3 解压缩unzip -o client-x86_64-unknown-linux-musl.zip4 修改stat_client的权限chmod +x stat_client5 复制stat_client.service到/etc/systemd/system/mv -v stat_client.service /etc/systemd/system/stat_client.service6 修改 /etc/systemd/system/stat_client.service 文件将IP改为你服务器的IP或你的域名,注意这里的-u后的用户名、-p后面的密码,与上面config.toml中的name、password必须一致,否则会通讯不成功。ExecStart=/opt/ServerStatus/stat_client -a "http://ss.vvars.com:8080/report" -u Server-alice -p vvars.com7 使用命令开机自启systemctl enable stat_client8 重新保存加载systemctl daemon-reload9 启动服务systemctl start stat_client10 查看状态,显示running即为成功systemctl status stat_client11 其他命令systemctl stop stat_client 停止客户端服务 systemctl restart stat_client 重启客户端服务三 stat_server服务器端安装教程部署stat_server的部分步骤与stat_client是一样的,具体如下1 /opt目录下创建ServerStat目录mkdir -p /opt/ServerStatus && cd /opt/ServerStatus2 下载stat_server服务器端到官方地址下载根据自己的服务器内核选择合适的客户端版本,这里以x86 64位的Linux为例:wget --no-check-certificate -qO server-x86_64-unknown-linux-musl.zip https://github.com/zdz/ServerStatus-Rust/releases/download/v1.8.1/server-x86_64-unknown-linux-musl.zip3 解压缩unzip -o server-1.8.1-unknown-linux-musl.zip4 修改stat_server的权限chmod +x stat_server5 复制stat_server.service到/etc/systemd/system/mv -v stat_server.service /etc/systemd/system/stat_server.service5修改/opt/ServerStatus/config.toml文件下面几个位置注意:1)管理用户名,用于查看 /detail, /map,建议设置,保护你的服务器安全。# 管理员账号,不设置默认随机生成,用于查看 /detail, /map jwt_secret = "" # 修改这个, 使用 openssl rand -base64 16 生成 secret admin_user = "vvars" admin_pass = "vvars.com"2) 修改host参数下的name和password参数这里的值将来作为服务器端和客户端通信的密码,需要配置准确。hosts = [ {name = "Server-alice", password = "vvars.com", alias = "alice 1刀落地机", location = "hk", type = "kvm", labels = "os=debian;ndd=2025/1/28;spec=1C/1G/5G;"}, {name = "h2", password = "p2", alias = "n2", location = "de", type = "kvm", disabled = false}, {name = "h3", password = "p3", alias = "n3", location = "hk", type = "kvm", monthstart = 1}, {name = "h4", password = "p4", alias = "n4", location = "cn", type = "kvm", notify = true, labels = "ndd=2022/11/25;spec=2C/4G/60G;"}, ]3 修改提醒机器人,以TG为例tg-bot-token网上教程很多,建议自行搜索。获取频道ID的办法可以参考 获取Telegram私人电报频道的ID的两种办法[tgbot] # 开关 true 打开 enabled = true bot_token = "tg-bot-token" #这里的Token通过TG的botFather创建和获取 chat_id = "-100xxxxxxx" #新建群聊,获取群聊id # host 可用字段见 payload.rs 文件 HostStat 结构, {{host.xxx}} 为占位变量 # 例如 host.name 可替换为 host.alias,大家根据自己的喜好来编写通知消息 # {{ip_info.query}} 主机 ip, {{sys_info.host_name}} 主机 hostname,见 server_status.proto title = "警告<b>Server Status</b>" online_tpl = "{{config.title}} \n哈哈 {{host.location}} {{host.name}} 主机恢复上线啦" offline_tpl = "{{config.title}} \n不好 {{host.location}} {{host.name}} 主机已经掉线啦" # custom 模板置空则停用自定义告警,只保留上下线通知 custom_tpl = """ {% if host.memory_used / host.memory_total > 0.5 %} <pre>不好 {{host.name}} 主机内存使用率超50%, 当前{{ (100 * host.memory_used / host.memory_total) | round }}% </pre> {% endif %} {% if host.hdd_used / host.hdd_total > 0.5 %} <pre>不好 {{host.name}} 主机硬盘使用率超50%, 当前{{ (100 * host.hdd_used / host.hdd_total) | round }}% </pre> {% endif %} """ ###################### tgbot end ############################6 测试配置文件是否正常systemctl daemon-reload #加载修改文件 ./stat_server -c config.toml -t #测试配置文件是否正常,没有问题的话会显示success字样 ./stat_server -c config.toml --notify-test #测试通知是否正常,正确的话会在相应的TG或者微信收到通知 ./stat_server -c config.toml #运行配置文件7 使用命令开机自启systemctl enable stat_server8 重新保存加载systemctl daemon-reload9 启动服务systemctl start stat_server10 查看状态,显示running即为成功systemctl status stat_server11 其他命令systemctl stop stat_server 停止服务器端服务 systemctl restart stat_server 重启服务器端服务参考文件ServerStatus-Rust安装脚本
2025年03月07日
34 阅读
0 评论
0 点赞
2025-03-06
解决电信运营商封禁80和443端口,修改openwrt路由器的web访问端口号
前言由于众所周知的原因,国内电信运营商宽带会封禁家用宽带的80/443端口号,但是有时候又需要远程访问路由器,除了桥接光猫外,今天介绍直接修改openwrt路由器的web访问端口号的方法。在OpenWrt路由器上,如何修改Web访问端口号,通常涉及到修改HTTP服务器的配置文件。默认情况下,OpenWrt使用的HTTP服务器是uHTTPd。以下是修改Web访问端口号的步骤:一、通过SSH登录路由器:使用SSH客户端连接到路由器。如果你的路由器上没有安装SSH服务器,你可能需要通过Web界面或其他方式启用SSH。二、编辑uHTTPd配置文件:执行命令vi /etc/config/uhttpd以编辑uHTTPd的配置文件。找到下面的代码:config uhttpd 'main' list listen_http '0.0.0.0:80' list listen_http '[::]:80'按键盘I进入编辑模式,将其修改为config uhttpd 'main' list listen_http '0.0.0.0:8080' list listen_http '[::]:8080'按下esc,然后输入:wq,并按Enter保存并退出:三、重新启动uHTTPd服务:为了使更改生效,需要重新启动uHTTPd服务。执行以下命令:/etc/init.d/uhttpd restart或者使用service命令:service uhttpd restart如果你使用了防火墙,你可能还需要更新防火墙规则以允许新的端口上的流量。
2025年03月06日
95 阅读
2 评论
0 点赞
2025-03-05
X-UI的手动安装教程,解救自动安装失败的VPS
X-UI是一款非常优秀的科学工具,关于X-UI的特点、自动安装和使用教程,可以查看本站之前的文章:3x-ui安装指南+搭建reality+申请ssl证书。很多网友反馈采用自动脚本安装会失败,包括检测VPS内核、系统识别等等各种原因,其实github自动脚本install.sh中已经有了安装过程,今天就基于该脚本的解读,介绍下如何手动安装X-UI脚本:1 用SSH软件登录你的VPS2 打开/usr/local目录cd /usr/local/3 下载对应系统的压缩包wget -N https://github.com/MHSanaei/3x-ui/releases/download/v2.5.3/x-ui-linux-amd64.tar.gz4 解压,正常解压会产生一个x-ui的文件夹tar zxvf x-ui-linux-amd64.tar.gz5 打开上一步解压产生的x-ui文件夹,查看目录下的文件是否解压正常cd x-ui ls -a6 变更x-ui程序的权限chmod +x x-ui7 安装x-uibash ./x-ui.sh输入上述命令后,正常会弹出3x-ui的安装界面,选择1就是安装,如果安装过可以输入10查看目前安装的信息,记住安装的信息,然后通过浏览器登录,地址为 http://ip地址:端口号/面板路径,用户名和密码见快捷键10提供的当前配置信息:╔────────────────────────────────────────────────╗ │ 3X-UI Panel Management Script │ │ 0. Exit Script │ │────────────────────────────────────────────────│ │ 1. Install │ │ 2. Update │ │ 3. Update Menu │ │ 4. Legacy Version │ │ 5. Uninstall │ │────────────────────────────────────────────────│ │ 6. Reset Username & Password & Secret Token │ │ 7. Reset Web Base Path │ │ 8. Reset Settings │ │ 9. Change Port │ │ 10. View Current Settings │ │────────────────────────────────────────────────│ │ 11. Start │ │ 12. Stop │ │ 13. Restart │ │ 14. Check Status │ │ 15. Logs Management │ │────────────────────────────────────────────────│ │ 16. Enable Autostart │ │ 17. Disable Autostart │ │────────────────────────────────────────────────│ │ 18. SSL Certificate Management │ │ 19. Cloudflare SSL Certificate │ │ 20. IP Limit Management │ │ 21. Firewall Management │ │ 22. SSH Port Forwarding Management │ │────────────────────────────────────────────────│ │ 23. Enable BBR │ │ 24. Update Geo Files │ │ 25. Speedtest by Ookla │ ╚────────────────────────────────────────────────╝ Panel state: Stop Start automatically: Yes xray state: Stop Please enter your selection [0-25]: 18 激活x-ui的Servicecp -f x-ui.service /etc/systemd/system/ systemctl daemon-reload systemctl enable x-ui逐行输入9 启动x-ui Servicesystemctl start x-ui正常这个时候就可以正常使用了10 其他快捷命令systemctl stop x-ui systemctl restart x-ui systemctl status x-ui参考源程序#!/bin/bash red='\033[0;31m' green='\033[0;32m' blue='\033[0;34m' yellow='\033[0;33m' plain='\033[0m' cur_dir=$(pwd) # check root [[ $EUID -ne 0 ]] && echo -e "${red}Fatal error: ${plain} Please run this script with root privilege \n " && exit 1 # Check OS and set release variable if [[ -f /etc/os-release ]]; then source /etc/os-release release=$ID elif [[ -f /usr/lib/os-release ]]; then source /usr/lib/os-release release=$ID else echo "Failed to check the system OS, please contact the author!" >&2 exit 1 fi echo "The OS release is: $release" arch() { case "$(uname -m)" in x86_64 | x64 | amd64) echo 'amd64' ;; i*86 | x86) echo '386' ;; armv8* | armv8 | arm64 | aarch64) echo 'arm64' ;; armv7* | armv7 | arm) echo 'armv7' ;; armv6* | armv6) echo 'armv6' ;; armv5* | armv5) echo 'armv5' ;; s390x) echo 's390x' ;; *) echo -e "${green}Unsupported CPU architecture! ${plain}" && rm -f install.sh && exit 1 ;; esac } echo "arch: $(arch)" os_version="" os_version=$(grep "^VERSION_ID" /etc/os-release | cut -d '=' -f2 | tr -d '"' | tr -d '.') if [[ "${release}" == "arch" ]]; then echo "Your OS is Arch Linux" elif [[ "${release}" == "parch" ]]; then echo "Your OS is Parch Linux" elif [[ "${release}" == "manjaro" ]]; then echo "Your OS is Manjaro" elif [[ "${release}" == "armbian" ]]; then echo "Your OS is Armbian" elif [[ "${release}" == "alpine" ]]; then echo "Your OS is Alpine Linux" elif [[ "${release}" == "opensuse-tumbleweed" ]]; then echo "Your OS is OpenSUSE Tumbleweed" elif [[ "${release}" == "openEuler" ]]; then if [[ ${os_version} -lt 2203 ]]; then echo -e "${red} Please use OpenEuler 22.03 or higher ${plain}\n" && exit 1 fi elif [[ "${release}" == "centos" ]]; then if [[ ${os_version} -lt 8 ]]; then echo -e "${red} Please use CentOS 8 or higher ${plain}\n" && exit 1 fi elif [[ "${release}" == "ubuntu" ]]; then if [[ ${os_version} -lt 2004 ]]; then echo -e "${red} Please use Ubuntu 20 or higher version!${plain}\n" && exit 1 fi elif [[ "${release}" == "fedora" ]]; then if [[ ${os_version} -lt 36 ]]; then echo -e "${red} Please use Fedora 36 or higher version!${plain}\n" && exit 1 fi elif [[ "${release}" == "amzn" ]]; then if [[ ${os_version} != "2023" ]]; then echo -e "${red} Please use Amazon Linux 2023!${plain}\n" && exit 1 fi elif [[ "${release}" == "debian" ]]; then if [[ ${os_version} -lt 11 ]]; then echo -e "${red} Please use Debian 11 or higher ${plain}\n" && exit 1 fi elif [[ "${release}" == "almalinux" ]]; then if [[ ${os_version} -lt 80 ]]; then echo -e "${red} Please use AlmaLinux 8.0 or higher ${plain}\n" && exit 1 fi elif [[ "${release}" == "rocky" ]]; then if [[ ${os_version} -lt 8 ]]; then echo -e "${red} Please use Rocky Linux 8 or higher ${plain}\n" && exit 1 fi elif [[ "${release}" == "ol" ]]; then if [[ ${os_version} -lt 8 ]]; then echo -e "${red} Please use Oracle Linux 8 or higher ${plain}\n" && exit 1 fi elif [[ "${release}" == "virtuozzo" ]]; then if [[ ${os_version} -lt 8 ]]; then echo -e "${red} Please use Virtuozzo Linux 8 or higher ${plain}\n" && exit 1 fi else echo -e "${red}Your operating system is not supported by this script.${plain}\n" echo "Please ensure you are using one of the following supported operating systems:" echo "- Ubuntu 20.04+" echo "- Debian 11+" echo "- CentOS 8+" echo "- OpenEuler 22.03+" echo "- Fedora 36+" echo "- Arch Linux" echo "- Parch Linux" echo "- Manjaro" echo "- Armbian" echo "- AlmaLinux 8.0+" echo "- Rocky Linux 8+" echo "- Oracle Linux 8+" echo "- OpenSUSE Tumbleweed" echo "- Amazon Linux 2023" echo "- Virtuozzo Linux 8+" exit 1 fi install_base() { case "${release}" in ubuntu | debian | armbian) apt-get update && apt-get install -y -q wget curl tar tzdata ;; centos | almalinux | rocky | ol) yum -y update && yum install -y -q wget curl tar tzdata ;; fedora | amzn | virtuozzo) dnf -y update && dnf install -y -q wget curl tar tzdata ;; arch | manjaro | parch) pacman -Syu && pacman -Syu --noconfirm wget curl tar tzdata ;; opensuse-tumbleweed) zypper refresh && zypper -q install -y wget curl tar timezone ;; *) apt-get update && apt install -y -q wget curl tar tzdata ;; esac } gen_random_string() { local length="$1" local random_string=$(LC_ALL=C tr -dc 'a-zA-Z0-9' </dev/urandom | fold -w "$length" | head -n 1) echo "$random_string" } config_after_install() { local existing_username=$(/usr/local/x-ui/x-ui setting -show true | grep -Eo 'username: .+' | awk '{print $2}') local existing_password=$(/usr/local/x-ui/x-ui setting -show true | grep -Eo 'password: .+' | awk '{print $2}') local existing_webBasePath=$(/usr/local/x-ui/x-ui setting -show true | grep -Eo 'webBasePath: .+' | awk '{print $2}') local existing_port=$(/usr/local/x-ui/x-ui setting -show true | grep -Eo 'port: .+' | awk '{print $2}') local server_ip=$(curl -s https://api.ipify.org) if [[ ${#existing_webBasePath} -lt 4 ]]; then if [[ "$existing_username" == "admin" && "$existing_password" == "admin" ]]; then local config_webBasePath=$(gen_random_string 15) local config_username=$(gen_random_string 10) local config_password=$(gen_random_string 10) read -p "Would you like to customize the Panel Port settings? (If not, a random port will be applied) [y/n]: " config_confirm if [[ "${config_confirm}" == "y" || "${config_confirm}" == "Y" ]]; then read -p "Please set up the panel port: " config_port echo -e "${yellow}Your Panel Port is: ${config_port}${plain}" else local config_port=$(shuf -i 1024-62000 -n 1) echo -e "${yellow}Generated random port: ${config_port}${plain}" fi /usr/local/x-ui/x-ui setting -username "${config_username}" -password "${config_password}" -port "${config_port}" -webBasePath "${config_webBasePath}" echo -e "This is a fresh installation, generating random login info for security concerns:" echo -e "###############################################" echo -e "${green}Username: ${config_username}${plain}" echo -e "${green}Password: ${config_password}${plain}" echo -e "${green}Port: ${config_port}${plain}" echo -e "${green}WebBasePath: ${config_webBasePath}${plain}" echo -e "${green}Access URL: http://${server_ip}:${config_port}/${config_webBasePath}${plain}" echo -e "###############################################" echo -e "${yellow}If you forgot your login info, you can type 'x-ui settings' to check${plain}" else local config_webBasePath=$(gen_random_string 15) echo -e "${yellow}WebBasePath is missing or too short. Generating a new one...${plain}" /usr/local/x-ui/x-ui setting -webBasePath "${config_webBasePath}" echo -e "${green}New WebBasePath: ${config_webBasePath}${plain}" echo -e "${green}Access URL: http://${server_ip}:${existing_port}/${config_webBasePath}${plain}" fi else if [[ "$existing_username" == "admin" && "$existing_password" == "admin" ]]; then local config_username=$(gen_random_string 10) local config_password=$(gen_random_string 10) echo -e "${yellow}Default credentials detected. Security update required...${plain}" /usr/local/x-ui/x-ui setting -username "${config_username}" -password "${config_password}" echo -e "Generated new random login credentials:" echo -e "###############################################" echo -e "${green}Username: ${config_username}${plain}" echo -e "${green}Password: ${config_password}${plain}" echo -e "###############################################" echo -e "${yellow}If you forgot your login info, you can type 'x-ui settings' to check${plain}" else echo -e "${green}Username, Password, and WebBasePath are properly set. Exiting...${plain}" fi fi /usr/local/x-ui/x-ui migrate } install_x-ui() { cd /usr/local/ if [ $# == 0 ]; then tag_version=$(curl -Ls "https://api.github.com/repos/MHSanaei/3x-ui/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/') if [[ ! -n "$tag_version" ]]; then echo -e "${red}Failed to fetch x-ui version, it may be due to GitHub API restrictions, please try it later${plain}" exit 1 fi echo -e "Got x-ui latest version: ${tag_version}, beginning the installation..." wget -N -O /usr/local/x-ui-linux-$(arch).tar.gz https://github.com/MHSanaei/3x-ui/releases/download/${tag_version}/x-ui-linux-$(arch).tar.gz if [[ $? -ne 0 ]]; then echo -e "${red}Downloading x-ui failed, please be sure that your server can access GitHub ${plain}" exit 1 fi else tag_version=$1 tag_version_numeric=${tag_version#v} min_version="2.3.5" if [[ "$(printf '%s\n' "$min_version" "$tag_version_numeric" | sort -V | head -n1)" != "$min_version" ]]; then echo -e "${red}Please use a newer version (at least v2.3.5). Exiting installation.${plain}" exit 1 fi url="https://github.com/MHSanaei/3x-ui/releases/download/${tag_version}/x-ui-linux-$(arch).tar.gz" echo -e "Beginning to install x-ui $1" wget -N -O /usr/local/x-ui-linux-$(arch).tar.gz ${url} if [[ $? -ne 0 ]]; then echo -e "${red}Download x-ui $1 failed, please check if the version exists ${plain}" exit 1 fi fi if [[ -e /usr/local/x-ui/ ]]; then systemctl stop x-ui rm /usr/local/x-ui/ -rf fi tar zxvf x-ui-linux-$(arch).tar.gz rm x-ui-linux-$(arch).tar.gz -f cd x-ui chmod +x x-ui # Check the system's architecture and rename the file accordingly if [[ $(arch) == "armv5" || $(arch) == "armv6" || $(arch) == "armv7" ]]; then mv bin/xray-linux-$(arch) bin/xray-linux-arm chmod +x bin/xray-linux-arm fi chmod +x x-ui bin/xray-linux-$(arch) cp -f x-ui.service /etc/systemd/system/ wget -O /usr/bin/x-ui https://raw.githubusercontent.com/MHSanaei/3x-ui/main/x-ui.sh chmod +x /usr/local/x-ui/x-ui.sh chmod +x /usr/bin/x-ui config_after_install systemctl daemon-reload systemctl enable x-ui systemctl start x-ui echo -e "${green}x-ui ${tag_version}${plain} installation finished, it is running now..." echo -e "" echo -e "┌───────────────────────────────────────────────────────┐ │ ${blue}x-ui control menu usages (subcommands):${plain} │ │ │ │ ${blue}x-ui${plain} - Admin Management Script │ │ ${blue}x-ui start${plain} - Start │ │ ${blue}x-ui stop${plain} - Stop │ │ ${blue}x-ui restart${plain} - Restart │ │ ${blue}x-ui status${plain} - Current Status │ │ ${blue}x-ui settings${plain} - Current Settings │ │ ${blue}x-ui enable${plain} - Enable Autostart on OS Startup │ │ ${blue}x-ui disable${plain} - Disable Autostart on OS Startup │ │ ${blue}x-ui log${plain} - Check logs │ │ ${blue}x-ui banlog${plain} - Check Fail2ban ban logs │ │ ${blue}x-ui update${plain} - Update │ │ ${blue}x-ui legacy${plain} - legacy version │ │ ${blue}x-ui install${plain} - Install │ │ ${blue}x-ui uninstall${plain} - Uninstall │ └───────────────────────────────────────────────────────┘" } echo -e "${green}Running...${plain}" install_base install_x-ui $1
2025年03月05日
85 阅读
1 评论
0 点赞
2025-03-03
大盘鸡VPS也能安装飞牛OS教程——新手5步实现Debian11安装飞牛OS教程
一 前言最近香港大盘鸡VPS卷起来了,像之前的Cnfaster,以及最近的VPS.town,都推出了仅收第一次硬盘配置费+每年固定240费用,5G带宽不要太快,折算下来非常划算,只要不跑路,这价格作为私人存储或者PT都是非常好的。配置费用明细 时长:年 HK$240.00 国家:中国香港 HK$0.00 CPU:2核 HK$0.00 内存:2048MB HK$0.00 系统盘:4000GB HK$480.00 流量:5000G HK$0.00 带宽:5000Mbps HK$0.00 IPv6数量:1个 HK$0.00 操作系统:Debian-12.0_x64 HK$0.00 合计费用: HK$720.00CNFaster的注册地址。进入地址后选择 云服务器-HKL Storage Special ,之后就可以自行配置需要的CPU、内存和硬盘容量了,我选择的是4t,大家可以按需选择。二 安装飞牛OS教程系统是基于Debian11 DD的系统第一步,打开你的SSH工具,连接你的Cnfaster的HK大盘鸡!第二步,使用bin456789大佬的DD脚本项目地址:https://github.com/bin456789/reinstall 不放心的可以去看一下项目,脚本如下:curl -O https://raw.githubusercontent.com/bin456789/reinstall/main/reinstall.sh || wget -O reinstall.sh $_第三步,看到完成提示后,输入如下命令运行脚本bash reinstall.sh fnos输入你需要设置的密码,和fnos系统盘的大小最小默认是8G,由于我的系统盘是40G,所以我设置得大一点,设置为20G第四步,回车执行后等待脚本跑完跑完会有提示,提示你可以输入命令:reboot开启重装脚本跑完会有类似界面第五步,访问FNOS后台输入访问FNOS后台 例如你的IP是123.123.123.123 那后台地址就是 http://123.123.123.123:5666成功安装!后续就是设置你的密码啦,教程到此结束!
2025年03月03日
42 阅读
1 评论
0 点赞
1
2
3
4
...
9