# VHosts **Repository Path**: moolan_user/vhosts ## Basic Information - **Project Name**: VHosts - **Description**: 适用于安卓系统的主机,通过虚拟专用网络模式实现,支持通配符 DNS 记录,通过VPN方式实现。可解决设备root权限问题、物联网卡限制等问题。 - **Primary Language**: Unknown - **License**: GPL-3.0 - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-01-13 - **Last Updated**: 2026-06-11 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # H+ 轻量级 Android Hosts 管理工具,通过本地 VPN 拦截 DNS 请求,无需 Root 即可实现自定义域名解析。 ## 功能 - 本地 VPN 代理,无需 Root 权限 - 支持本地文件、远程 URL、扫码加载 Hosts - 通配符 DNS 记录(如 `.a.com` 匹配所有子域名) - 自定义 DNS 服务器 - 开机自启,重启后自动恢复 - Hosts 内容实时预览与校验 - 一键检查版本更新 - 中英文双语 ## 下载 最新版本:[H+/stable](https://gitee.com/moolan_user/project/tree/master/H+/stable) ## 发版流程 ```bash # === 1. 打版本 tag === # versionName 由此 tag 决定(v2.2.7 → 2.2.7) git tag v2.2.7 # === 2. 构建 release === # 自动完成:生成 version.txt、更新 versions.json、拷贝 APK 到公开仓库 KEYSTORE_PASSWORD=vhosts2026 KEY_ALIAS=vhosts KEY_PASSWORD=vhosts2026 \ ./gradlew clean assembleGithubRelease # === 3. 查看生成的版本号 === ./gradlew versionInfo # === 4. 推送源码仓库(main + tag)=== # 同时推 GitLab + Gitee git push origin main && git push xing-origin main git push origin v2.2.7 && git push xing-origin v2.2.7 # === 5. 提交并推送公开仓库 === # version.txt、versions.json、APK 已在步骤 2 自动拷贝到 ../project/ cd ../project git add . git commit -m "v2.2.7" git push ``` > **说明:** 步骤 2 会检查 `../project/H+/stable/` 是否存在,仅在公开仓库已克隆到同级目录时生效。 ## 仓库说明 | 仓库 | 用途 | 地址 | |------|------|------| | `Vhosts` | 源码(私有) | [Gitee](https://gitee.com/moolan_user/vhosts) · [GitLab](https://gitlab.dev/sjz/tool/vhosts) | | `project` | 公开版本分发 | [Gitee](https://gitee.com/moolan_user/project) | 目录结构: ``` git/ ├── Vhosts/ ← 源码仓库(当前目录) └── project/ ← 公开仓库(../project/) └── H+/stable/ ``` ## 使用场景 - 开发调试:本地域名映射 - 内网环境:快速切换 Hosts 配置 - 临时屏蔽:阻止特定域名 ## 技术栈 - Android VPN Service 网络拦截 - zxing-android-embedded 二维码扫描 - AndroidX Preference 设置框架 - Gitee 版本分发 ## 许可证 Copyright (C) 2017 xfalcon This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.