Skip to main content

Swiftblock is a free and open-source hosts file based ad,malware and tracker blocker

Project description

Swift-Block


Version:0.2-beta

About:

Swiftblock is a free and open-source hosts file based ad,malware and tracker blocker written in Python's Pyqt6 framework.

Features:

  • Free & Open Source(SwiftBlock is licensed under GPLv3)
  • Custom sources(You can easily add custom sources of hosts files)
  • Custom Rules(You can manually redirect,allow or block specific hostnames)
  • Easy access(Swift-Block will create a launcher/start menu shortcut on first run)

Supported Platforms:

Most linux distributions, Windows, FreeBSD and MacOS[Not tested on FreeBSD and MacOS]

Installation:

  • Open your terminal/command prompt and run the following command as superuser/administrator : python -m pip install swift_block
  • Now launch swift-block from your terminal/command-line by running this command(ensure you have internet first): swift-block
  • Swift-Block will pull hosts sources from the internet and create a launcher/start menu shortcut during the first run
  • Swift-Block can be accessed from your DE's menu/start menu like any normal application from this point onwards.

Uninstallation:

  • Open Swift-Block
  • Go to the About tab and click on the Uninstall button
  • It is not recommended to directly use pip to uninstall swift-block unless the above method fails
  • To uninstall Swift-Block directly using pip, run this as superuser/administrator from your terminal/cmd: python -m pip uninstall swift_block

Building from source(for contributors):

  • Clone this repo and open a terminal/cmd in the main project folder
  • Run the following command as superuser/administrator: python -m pip install .
  • Swift-Block will be built & installed

(IMPORTANT) SPECIAL INSTRUCTIONS FOR WINDOWS USERS:

Windows has issues with larger hosts files.The DNS Client service needs to be disabled to mitigate this. Recent changes in security within Windows 10 denies access to changing services via other tools except registry hacks. Use this bat file)(Obviously,run this file as an Administrator) to make proper changes to the Windows registry. You will need to reboot your device once that's done.

Why are my changes not applied?

Sometimes, to refresh the hosts file, a reboot is required. If you think your changes haven't been applied, either reboot or follow this guide.

Inspiration:

Swiftblock is inspired from Adaway and uses some UX concepts from it[No code from the project has been taken,however].

For Contributors:

  • I've used qt-designer to create all the GUI interfaces,kindly use the same/another compatible designer for making any modifications in GUI. All the ui files are in swift_block/ui
  • swift_block/__init__.py is the entry point/script executed to initialise everything
  • swift_block/main.py is the home page of swift-block - it offers users options to manage their hosts sources,update source files, enable/disable or uninstall swift-block, etc.
  • swift_block/Parser.py is the heart of swift-block, with low level functions for performing operations on hosts files and sources,first-start,restoring/replacing corrupt files,validation tasks,uninstall scripts, etc.[It is a non-GUI module]
  • swift_block/RuleManager.py is the GUI rule editor. It offers users options to block/redirect/allow custom/specific hostnames and also allow or redirect the hostnames being blocked by the source files
  • Images and icons used within the GUI are stored in the swift_block/assets directory.
  • swift_block/elevate is a sub-package that provides privilege escalation functionality(Required to read/write to the system hosts file). It is my modification of the original and currently broken elevate.

Attribution:


Made with ❤️ by Xploreinfinity

P.S:Yes,I am aware swift-block's logo is that of Swift lang, but there really aren't any better icons out there,sadly[None that suit the overall feel of swift-block,anyway].

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

swift_block-0.3.tar.gz (481.2 kB view details)

Uploaded Source

Built Distribution

swift_block-0.3-py3-none-any.whl (481.4 kB view details)

Uploaded Python 3

File details

Details for the file swift_block-0.3.tar.gz.

File metadata

  • Download URL: swift_block-0.3.tar.gz
  • Upload date:
  • Size: 481.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for swift_block-0.3.tar.gz
Algorithm Hash digest
SHA256 23255968e1af9779d9085159c97a9337e79879e65c22f37655b3b2b86df51063
MD5 dd5c210f67c8b151e065321078679c6d
BLAKE2b-256 2b8bac161da99407dfa77d8675021e3290d78f5bed34054e872da5e9d4f1d23b

See more details on using hashes here.

File details

Details for the file swift_block-0.3-py3-none-any.whl.

File metadata

  • Download URL: swift_block-0.3-py3-none-any.whl
  • Upload date:
  • Size: 481.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for swift_block-0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d8ac667bcb2d5ce3cd032c265110f084819792c497fcd96f43028c3bbf912f91
MD5 4807c3dad202d04795c91564e40e967d
BLAKE2b-256 b574803c2420e57c3d4d229ee7bf56f6628998d549a0fe637cd57e49b17cde2a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page