mirror of
https://github.com/amnezia-vpn/amneziawg-android.git
synced 2026-10-13 21:34:07 +00:00
[GH-ISSUE #33] Proposal for Hosts Override Functionality #21
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
amnezia-vpn/amneziawg-android#21
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @tizer7 on GitHub (May 26, 2025).
Original GitHub issue: https://github.com/amnezia-vpn/amneziawg-android/issues/33
1. Subject of Proposal
This proposal concerns the implementation of "Hosts Override" functionality within the AmneziaWG application. This feature will provide users with the ability to manually define the IP address corresponding to a specific domain name. Essentially, this is equivalent to integrating a local hosts file directly into the application, operating within the VPN tunnel.
2. Rationale (Motivation)
The introduction of this function will significantly enhance user control over the device's domain name resolution process. One of the key advantages is the potential for bypassing geo-restrictions. In situations involving regional limitations on access to certain online services (e.g., ChatGPT, Gemini, and similar platforms), users will be able to specify an alternative IP address of a proxy server or mirror for the relevant domain. This will ensure access to necessary resources without requiring complex system modifications to Android settings. Furthermore, this functionality will simplify the process of adding a large volume of entries when a pre-prepared list is available.
3. Principle of Operation (Brief Description)
The "Hosts Override" function will intercept DNS queries passing through the AmneziaWG VPN tunnel. Should an entry for the queried domain be found in the override list, the application will utilize the specified IP address, thereby bypassing external DNS servers. The capability for mass import and export of these entries is also envisioned.
4. Concept of Implementation
4.1. "Hosts Override" Interface within the Application
It is proposed to create a dedicated "Hosts override" section within the application's "Settings" menu. This section will display a list of all existing overrides in the format "Domain -> IP Address". Users will be provided with the ability to add new entries, edit existing ones, and delete them.
4.2. Bulk Import
A critically important aspect is the implementation of bulk import functionality for entries. This could be achieved, for instance, by copying and pasting a list of domains and IP addresses from a text file. The application must be capable of correctly processing such lists, performing their parsing, and informing the user of any incorrect entries or duplicates.
4.3. Configuration Saving and Export
The ability to export current "Hosts Override" settings for backup purposes or transfer to another device will be provided. Correspondingly, an import function for previously saved configurations will be implemented. Support for various file formats (e.g., plain text) is considered advisable.
4.4. User Feedback
The application must provide the user with clear and timely notifications regarding the status of operations performed, as well as any errors that may arise.
5. Conclusion
The "Hosts Override" function represents a significant enhancement to AmneziaWG, providing users with a powerful and flexible tool for managing network access, particularly in the context of overcoming geo-restrictions.