Skip to main content

Swift-Block


Version:0.3.1(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 ✧・゚: ✧・゚: :・゚✧:・゚✧

Metadata

Release files for swift-block 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for swift-block 0.3.1
File Size Uploaded
swift_block-0.3.1.tar.gz 560.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for swift-block 0.3.1
File Interpreter ABI Platform
swift_block-0.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 1.1 MB

Release files / swift_block-0.3.1.tar.gz

Download URL swift_block-0.3.1.tar.gz
Size 560.3 kB
Tags Source
SHA-256 checksum
How to use checksums
ab4772505f841d7a053be6f0d55593d6b21059f64ef2ff99b42730c79c2ee065
BLAKE2b-256 checksum
How to use checksums
04cf7c0473da4b916ea72ab964fde7f319516e7232fbff450d4bfc6e287d0a7d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.5

Release files / swift_block-0.3.1-py3-none-any.whl

Download URL swift_block-0.3.1-py3-none-any.whl
Size 560.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
609a266ed3bf548e98ff02e8ab7aff61f71d9500131ce036c888eb0628ff1aa2
BLAKE2b-256 checksum
How to use checksums
5c1cfa69a1b75bfec851f8aa55d0145ba37a5d4c07996458ae26842c26f54d5b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.5

Release history Release notifications | RSS feed

This release

0.3.1 This release

2 release files

0.3

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page