The Amnezia Iran Domains Resolver is an automated tool designed to enhance the functionality of Amnezia VPN for users in Iran. It fetches a list of Iranian domains, resolves them to their corresponding IP addresses, and formats the data for use with Amnezia VPN's split tunneling feature. The tool is optimized to process only new or changed domains in each run, improving efficiency and reducing processing time.
- Automatically fetches the latest list of Iranian domains from bootmortis/iran-hosted-domains
- Processes only new or changed domains in each run
- Resolves domain names to IP addresses
- Merges new results with existing data
- Generates a JSON file compatible with Amnezia VPN's split tunneling feature
- Runs weekly via GitHub Actions to ensure up-to-date information
- Provides detailed error logs for troubleshooting
- A GitHub Actions workflow runs weekly at midnight UTC every Sunday.
- It fetches the latest
domains.txt
file from the bootmortis/iran-hosted-domains repository. - The workflow compares the new domains list with the previously processed list and identifies new or changed domains.
- The Python script
main.py
processes only the new or changed domains, resolving each to its IP address. - The script merges the new results with the existing data, updating any changed entries.
- A new release is created with the updated
results.json
anderror_log.txt
files as assets.
- Go to the Releases page of this repository.
- Download the
results.json
file from the latest release. - Import this file into your Amnezia VPN client for split tunneling configuration.
If you want to run the script on your local machine:
-
Clone this repository:
git clone https://github.com/yourusername/amnezia-iran-domains-resolver.git cd amnezia-iran-domains-resolver
-
Ensure you have Python 3.x installed.
-
Install the required dependencies:
pip install -r requirements.txt
-
Run the script:
python main.py input_domains.txt output_results.json
-
Check the
output_results.json
for the results anderror_log.txt
for any errors.
amnezia-iran-domains-resolver/
│
├── .github/
│ └── workflows/
│ └── weekly_update_and_release.yml
│
├── main.py
├── requirements.txt
├── .gitignore
├── LICENSE
└── README.md
Contributions to improve the project are welcome! Here's how you can contribute:
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Please make sure to update tests as appropriate and adhere to the existing coding style.
This project is licensed under the MIT License - see the LICENSE file for details.
- Amnezia VPN for their excellent VPN solution
- bootmortis/iran-hosted-domains for providing the list of Iranian domains
- All contributors who have helped to improve this project
This tool is provided for educational and informational purposes only. Please ensure you comply with all relevant laws and regulations when using VPNs or any other privacy-enhancing technologies.
If you have any questions, feel free to open an issue or contact the repository owner.
Made with ❤️ for freedom and privacy