[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-80645":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":15,"forks30d":15,"starsTrendScore":19,"compositeScore":20,"rankGlobal":9,"rankLanguage":9,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":24,"hasPages":22,"topics":25,"createdAt":9,"pushedAt":9,"updatedAt":26,"readmeContent":27,"aiSummary":28,"trendingCount":15,"starSnapshotCount":15,"syncStatus":29,"lastSyncTime":30,"discoverSource":31},80645,"aimili-vpngate","baoweise-bot\u002Faimili-vpngate","baoweise-bot","aimili-vpngate是一个借助vpngate.net让Linux用干净ip出站的代理工具。",null,"Python",1023,351,1,13,0,14,197,969,76,105.64,"Other",false,"main",true,[],"2026-06-12 04:01:29","# AimiliVPN 🌐\n\nBilingual: [中文](#中文) | [English](#english)\n\n---\n\n## 中文\n\n[![Telegram](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FTG交流群-arestemple-2CA5E0?style=flat-square&logo=telegram&logoColor=white)](https:\u002F\u002Ft.me\u002Farestemple)\n[![Forum](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F交流论坛-339936.xyz-orange?style=flat-square&logo=discourse&logoColor=white)](https:\u002F\u002F339936.xyz)\n[![YouTube](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F视频教程-YouTube-red?style=flat-square&logo=youtube&logoColor=white)](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=s-ATfXR8BpI)\n[![Email](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FBug反馈-yaohunse7@gmail.com-red?style=flat-square&logo=gmail&logoColor=white)](mailto:yaohunse7@gmail.com)\n\n\n---\n\n**AimiliVPN** 是一个专为 Linux VPS（如 Ubuntu）设计的智能 VPN 代理网关管理器。它能够自动采集 VPNGate 开放节点，进行多线程可用性测试与延迟过滤，利用 OpenVPN 隧道与策略路由（Policy Routing）实现出站网络，并在本地提供高性能的 HTTP\u002FSOCKS5 代理网关服务，适合用作 Xray 的落地出站代理。\n\n---\n\n### 🚀 快速开始\n\n在您的 **Ubuntu** VPS 机器上，复制并运行以下一行指令即可完成自动安装部署：\n\n```bash\nbash \u003C(curl -Ls https:\u002F\u002Fraw.githubusercontent.com\u002Fbaoweise-bot\u002Faimili-vpngate\u002Fmain\u002Finstall.sh)\n```\n\n---\n\n### 🛠️ 快捷命令行 (CLI)\n\n安装成功后，系统会在全局注册 `ml` 快捷管理指令，直接运行 `ml` 可打开图形化交互终端，也可通过以下指令执行：\n* **`ml status`** 或 **`ml`**：查看当前运行状态（代理端口、活动 VPN 节点、直连延迟、网页后台登录地址等）。\n* **`ml start`**：启动 AimiliVPN 服务。\n* **`ml stop`**：停止 AimiliVPN 服务（并自动清理策略路由与 OpenVPN 进程）。\n* **`ml restart`**：重启服务。\n* **`ml logs`**：查看实时的 Systemd 服务运行日志。\n* **`ml web`**：切换网页绑定地址（127.0.0.1 仅本地，或 0.0.0.0 允许公网访问）与重置安全后缀。\n* **`ml port`**：修改网页管理控制台监听端口。\n* **`ml password`**：生成新的 12 位安全管理密码。\n* **`ml uninstall`**：完全卸载服务并清理相关环境。\n\n#### 💡 首次安装与常见报错解决（小白必看）\n\n##### 1. 极简系统缺少依赖（Ubuntu 18-26 \u002F Debian 首次安装）\n如果系统是全新纯净版，可能会因为缺少 `curl` 或 `ca-certificates` 导致一键安装脚本下载失败。请在安装前执行以下命令补充依赖：\n```bash\nsudo apt-get update && sudo apt-get install -y curl ca-certificates\n```\n\n##### 2. Debian 系统兼容运行方法\n本脚本一键包默认限制在 Ubuntu 系统运行。Debian 用户如需运行，可先下载并用 `sed` 临时将系统类型限制替换为 `\"ubuntu\"` 后再执行安装：\n```bash\ncurl -Ls https:\u002F\u002Fraw.githubusercontent.com\u002Fbaoweise-bot\u002Faimili-vpngate\u002Fmain\u002Finstall.sh -o install.sh\nsed -i 's\u002F\"${ID:-}\"\u002F\"ubuntu\"\u002Fg' install.sh\nsudo bash install.sh\n```\n\n##### 3. 包管理器被占用（Apt 锁冲突报错解决）\n若一键安装提示 `Could not get lock \u002Fvar\u002Flib\u002Fdpkg\u002Flock-frontend` 等“无法获得锁”的报错，可运行以下命令解除占用并重新安装：\n```bash\n# 1. 停止自动更新服务并终止相关进程\nsudo systemctl stop unattended-upgrades 2>\u002Fdev\u002Fnull\nsudo killall apt apt-get dpkg 2>\u002Fdev\u002Fnull\n\n# 2. 清理残留锁文件\nsudo rm -f \u002Fvar\u002Flib\u002Fdpkg\u002Flock* \u002Fvar\u002Flib\u002Fapt\u002Flists\u002Flock \u002Fvar\u002Fcache\u002Fapt\u002Farchives\u002Flock\n\n# 3. 修复受损包并重新更新源\nsudo dpkg --configure -a\nsudo apt-get update\n```\n执行完毕后，重新运行一键安装脚本即可。\n\n---\n\n### ⚙️ 系统架构\n\n```\n   [ 3x-ui \u002F Xray ] \n         │ (HTTP \u002F SOCKS5)\n         ▼\n   [ 本地代理服务器 ] (Port 7928) ──(强制绑定 SO_BINDTODEVICE)──► [ tun0 虚拟网卡 ]\n         │                                                            │\n         │ (SSH, Web UI, etc. 依然走物理路由)                           │ (策略路由表 100)\n         ▼                                                            ▼\n   [ 物理网卡 eth0 ] ◄───────────────────────────────────────── [ OpenVPN 加密隧道 ]\n         │                                                            │\n         ▼ (真实服务器 IP 出站)                                         ▼ (VPNGate 落地节点出站)\n    (国内直连流量)                                               (解锁流媒体、锁区网站)\n```\n\n---\n\n## English\n\n[![Telegram](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FTelegram-arestemple-2CA5E0?style=flat-square&logo=telegram&logoColor=white)](https:\u002F\u002Ft.me\u002Farestemple)\n[![Forum](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FForum-339936.xyz-orange?style=flat-square&logo=discourse&logoColor=white)](https:\u002F\u002F339936.xyz)\n[![Email](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FBug%20Report-yaohunse7@gmail.com-red?style=flat-square&logo=gmail&logoColor=white)](mailto:yaohunse7@gmail.com)\n\n---\n\n**AimiliVPN** is an intelligent VPN proxy gateway manager designed specifically for Linux VPS (e.g. Ubuntu). It automatically collects open VPNGate nodes, conducts multi-threaded availability testing and latency filtering, establishes secure out-of-band routing via OpenVPN and policy routing to **prevent VPS lockouts**, and hosts a high-performance local SOCKS5\u002FHTTP proxy gateway. It is highly optimized to serve as a residential\u002Funlocked egress node for upstream proxies like 3x-ui \u002F Xray.\n\n### ✨ Key Features\n\n1. ⚡ **Auto-Collection & Multi-Threaded Probing**:\n   * Periodically fetches candidate nodes from VPNGate.\n   * Performs concurrent ping latency and handshake tests to maintain a pool of high-quality nodes.\n2. 🔒 **Anti-Lockout Routing (Policy Routing)**:\n   * Directs traffic from the virtual adapter `tun0` to a customized routing table (Table 100) without altering the system's default gateway.\n   * Keeps SSH sessions and server administration panels unaffected by the active VPN.\n3. 🚫 **Fail-Safe Leak Protection**:\n   * Outbound socket connections inside the local proxy server are strictly bound to `tun0` via `SO_BINDTODEVICE`.\n   * If the VPN disconnects, proxy requests are instantly blocked with a `502 Bad Gateway` instead of falling back to the VPS physical IP address.\n4. 🖥️ **Modern Web UI Panel**:\n   * Sleek dark\u002Flight responsive console (default port `8787`).\n   * Provides real-time geolocation, ISP, ASN, latency, and IP-type (residential\u002Fdatacenter) detection.\n   * Enables manual node selection, blacklist resets, proxy speed-testing, and logs query.\n   * Secured by a random secret path suffix (e.g., `\u002FEJsW2EeBo9lY\u002F`) and password authentication.\n5. 🛠️ **CLI Utility (ml)**:\n   * Command-line helper tool `ml` with a menu-driven interface.\n   * Provides quick statuses, starts\u002Fstops the daemon, resets passwords, and changes bind hosts.\n\n---\n\n### 🚀 Quick Start\n\nTo install and deploy AimiliVPN on your **Ubuntu** server, copy and paste the following command:\n\n```bash\nbash \u003C(curl -Ls https:\u002F\u002Fraw.githubusercontent.com\u002Fbaoweise-bot\u002Faimili-vpngate\u002Fmain\u002Finstall.sh)\n```\n\n---\n\n### 🛠️ CLI Helper Commands\n\nOnce installed, use the global command `ml` to launch the interactive helper menu, or use the shortcuts below:\n* **`ml status`** or **`ml`**: Check running system status (active nodes, proxy ports, latency, URLs).\n* **`ml start`**: Start the gateway service.\n* **`ml stop`**: Stop the gateway service (and clean routing tables).\n* **`ml restart`**: Restart the service.\n* **`ml logs`**: View real-time Systemd output logs.\n* **`ml web`**: Toggle Web UI accessibility (127.0.0.1 or 0.0.0.0) and reset suffix paths.\n* **`ml port`**: Update the Web Console port.\n* **`ml password`**: Regenerate a secure 12-character administration password.\n* **`ml uninstall`**: Completely remove the service and repository files from your VPS.\n\n#### 💡 Troubleshooting & First-Time Installation Tips\n\n##### 1. Missing Dependencies on Minimal OS (Ubuntu \u002F Debian)\nIf you are using a brand new minimal OS, the installation might fail due to missing `curl` or `ca-certificates`. Run the following command to pre-install dependencies:\n```bash\nsudo apt-get update && sudo apt-get install -y curl ca-certificates\n```\n\n##### 2. Bypass OS Restrictions for Debian\nThe script is restricted to Ubuntu by default. For Debian systems, run the following commands to download, patch, and install:\n```bash\ncurl -Ls https:\u002F\u002Fraw.githubusercontent.com\u002Fbaoweise-bot\u002Faimili-vpngate\u002Fmain\u002Finstall.sh -o install.sh\nsed -i 's\u002F\"${ID:-}\"\u002F\"ubuntu\"\u002Fg' install.sh\nsudo bash install.sh\n```\n\n##### 3. Package Manager Locked (`apt`\u002F`dpkg` Lock Errors)\nIf you see `Could not get lock \u002Fvar\u002Flib\u002Fdpkg\u002Flock-frontend` or similar busy errors, run these commands to unlock and retry:\n```bash\n# 1. Stop automatic upgrades & kill active processes\nsudo systemctl stop unattended-upgrades 2>\u002Fdev\u002Fnull\nsudo killall apt apt-get dpkg 2>\u002Fdev\u002Fnull\n\n# 2. Remove lock files\nsudo rm -f \u002Fvar\u002Flib\u002Fdpkg\u002Flock* \u002Fvar\u002Flib\u002Fapt\u002Flists\u002Flock \u002Fvar\u002Fcache\u002Fapt\u002Farchives\u002Flock\n\n# 3. Repair package states & update\nsudo dpkg --configure -a\nsudo apt-get update\n```\nOnce done, re-run the installation script.\n","AimiliVPN 是一个专为 Linux VPS 设计的智能 VPN 代理网关管理器，旨在通过 vpngate.net 提供干净的 IP 出站服务。该项目利用 Python 编写，能够自动采集并测试 VPNGate 的开放节点，筛选出低延迟的节点，并通过 OpenVPN 隧道和策略路由实现网络出站。同时，它在本地提供了高性能的 HTTP\u002FSOCKS5 代理服务，非常适合用作 Xray 等工具的落地出站代理。AimiliVPN 支持一键安装部署，并提供了丰富的命令行工具来管理和监控服务状态，适合需要稳定、安全且易于管理的网络出站解决方案的用户。",2,"2026-06-11 04:01:30","CREATED_QUERY"]