Web Blocker is a desktop application developed using PyQt5 that enables users to block and unblock websites by modifying the hosts
file. This application provides a user-friendly interface for managing blocked websites, adjusting settings, and enforcing access control through simple math problems.
- Application Icon: The application now uses its own icon (
app.ico
) for the window and taskbar. - Customizable Removal Behavior: Added a new setting in the settings dialog to enable or disable the removal of all websites containing a specific phrase. This can be toggled via the "Remove all matching websites" checkbox.
- Duplicate Website Check: The application now prevents adding websites that are already in the blocked list, ensuring no duplicates are added.
- Settings Translation: Updated the settings to include translations for the new "Remove all matching websites" option in English, Polish, and German.
- None in this release.
- Modified the
main.py
to set the application icon during initialization. - Updated the
ui.py
to include the new checkbox in the settings dialog and align the checkboxes and labels to the left for better UI consistency. - Enhanced the
add_website
method to check for duplicates before adding new websites to the blocked list.
- Custum URL forwarder can sometimes cause websites unblocking.
- Pull the latest changes from the repository.
- Install any new dependencies using
pip install -r requirements.txt
. - Rebuild the application using the updated PyInstaller spec file if compiling to an executable.
- Block and Unblock Websites: Easily manage which websites are blocked or accessible.
- Manage Blocked Websites: Add or remove websites from the blocked list.
- Customizable Settings:
- Math Problems: Set the number of math problems required to access certain features.
- Redirect IP: Specify the IP address to which blocked websites will be redirected (default is
127.0.0.1
). - Language: Choose the interface language (English, Polish, or German).
- Restore Defaults: Restore the application to its default settings or retrieve blocked websites from the
hosts
file.
-
Navigate to the project directory:
cd web-blocker
-
Install the required dependencies:
pip install -r requirements.txt
Run the application:
python main.py
The application will prompt for administrative privileges to modify the hosts
file. Use the provided buttons to block or unblock websites, manage blocked websites, or access settings.
main.py
: Main application file.blocked_websites.txt
: File storing the list of blocked websites.style.qss
: Stylesheet for the application's UI.icons/shield_icon.png
: Icon for the application.
The application allows users to customize the following settings:
- Math Problems: Number of math problems required to access certain features.
- Redirect IP: IP address to redirect blocked websites to (default is
127.0.0.1
). - Language: Interface language (English, Polish, or German).
- Fork the repository.
- Create a new branch:
git checkout -b feature-branch
- Make your changes.
- Commit your changes:
git commit -m "Add feature"
- Push to the branch:
git push origin feature-branch
- Open a pull request.
This project is licensed under the MIT License.
- PyQt5: For providing the framework to build the UI.
- Contributors: And the open-source community for their support.
Ten opis zawiera wszystkie istotne informacje o projekcie, instrukcje instalacji i używania, oraz informacje o strukturze plików, co powinno być pomocne dla użytkowników i współtwórców projektu.