You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 17, 2024. It is now read-only.
Copy file name to clipboardexpand all lines: README.md
+5-5
Original file line number
Diff line number
Diff line change
@@ -2,22 +2,22 @@
2
2
blocker is a useful tool for blocking certain websites on linux operating system. It allows you to block certain websites for all ips in `ifconfig`.
3
3
4
4
# Requirements
5
-
This script based on bash shell. You can check if you are using bash or not with this commend:
5
+
This script is based on bash shell. You can check if you are using bash or not with this commend:
6
6
> $ which bash
7
7
8
-
if output of commend is: `/usr/bin/bash` that means you are using bash.
8
+
if output of commend is: `/usr/bin/bash` that means you are using bash and you can run this script.
9
9
10
10
11
11
# How to setup
12
-
For adding a website for blocking , add `"www.website address"` to `websites` array in script. It will generate a block state for each ip and website in `websites` array. Each block state will add to `/etc/host/` file.
12
+
For adding a website for blocking , add `"www.website address"` to `websites` array in script. It will generate a block state for each ip and website in `websites` array. Each block state will add to `/etc/hosts/` file later.
13
13
14
14
For editing the script run this commend on terminal:
15
15
16
16
> $ nano blocker.sh
17
17
18
18
You can fill `nano` with your favourite text editor.
19
19
20
-
And then add your websites to
20
+
then you can add websites to `websites` array in script.
21
21
22
22
> [!WARNING]
23
23
> please don't insert websites with `https://` or `http://` prefixes. This method will not working with these prefixes.
@@ -39,5 +39,5 @@ This will add your blocked websites to `/etc/hosts`. For unblocking websites run
39
39
> $./blocker.sh web_unlock
40
40
41
41
> [!WARNING]
42
-
> The `web_unlock` commend will only remove the blocked from end of file.
42
+
> The `web_unlock` commend will only remove the blocked from end of file.If this commend not removing blocked states you must go to `/etc/hosts` file and remove them manually.
0 commit comments