# 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-01-13 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## VHosts 适用于安卓系统的主机,通过虚拟专用网络模式实现,支持通配符 DNS 记录。 Get it on F-Droid VHosts 是一款 Android 应用,允许开发者在无需 root 权限的情况下自定义 Android 设备上的 hosts 文件。该应用通过 VPN 模式运行,根据自定义的主机映射重定向网络流量,支持通配符 DNS 记录以实现灵活的域名匹配。 该应用特别适用于: - 使用自定义域名映射测试应用程序的开发者 - 想要阻止特定域名的用户 - 网络调试和测试 - 绕过区域限制 该应用支持通配符 DNS 记录。例如: ``` 127.0.0.1 a.com | 127.0.0.1 m.a.com | => 127.0.0.1 .a.com 127.0.0.1 w.m.a.com | ``` ### 功能特性 - 无需 root 权限的自定义 hosts 文件管理 - 基于 VPN 的可靠操作实现 - 支持通配符 DNS 记录 - 从远程 URL 下载网络 hosts 文件 - 自定义 DNS 服务器配置 - 开机启动配置 - 多语言支持(英文和简体中文) ### 使用的技术 - **Android SDK**: 核心移动应用开发 - **VPN 服务**: Android 的 VpnService 用于网络流量拦截 - **首选项框架**: AndroidX Preference 库用于设置 - **HTTP/HTTPS**: 用于下载远程 hosts 文件 - **文件 I/O**: 用于管理本地 hosts 文件 - **广播接收器**: 用于处理系统事件(如启动完成) - **本地化**: 多语言支持的资源文件 - **DNS 解析**: 支持通配符的自定义 DNS 记录处理 ### 软件截图 VHosts Screenshot VHosts Screenshot ### 开源许可证 #### 许可证 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. You should have received a copy of the GNU General Public License along with this program. If not, see . keytool -genkey -v -keystore /Users/xingyipeng/git/Virtual-Hosts/app/keystore/release-key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias vhosts-release-key -storepass vhosts2026 -keypass vhosts2026 -dname "CN=VHosts Developer, OU=VHosts, O=VHosts, L=Beijing, ST=Beijing, C=CN"