alamin655 commited on
Commit
2824d9e
β€’
2 Parent(s): 35d5976 0263046

Merge pull request #284 from neon-mmd/docs-revision

Browse files

πŸ“ Revise the `docs` to remain in sync with the current changes

Files changed (6) hide show
  1. Cargo.lock +38 -38
  2. Cargo.toml +1 -1
  3. docs/README.md +1 -1
  4. docs/building.md +0 -59
  5. docs/features.md +42 -0
  6. docs/installation.md +231 -35
Cargo.lock CHANGED
@@ -290,9 +290,9 @@ checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299"
290
 
291
  [[package]]
292
  name = "anstyle"
293
- version = "1.0.3"
294
  source = "registry+https://github.com/rust-lang/crates.io-index"
295
- checksum = "b84bf0a05bbb2a83e5eb6fa36bb6e87baa08193c35ff52bbf6b38d8af2890e46"
296
 
297
  [[package]]
298
  name = "anyhow"
@@ -412,9 +412,9 @@ dependencies = [
412
 
413
  [[package]]
414
  name = "brotli"
415
- version = "3.3.4"
416
  source = "registry+https://github.com/rust-lang/crates.io-index"
417
- checksum = "a1a0b1dbcc8ae29329621f8d4f0d835787c1c38bb1401979b49d13b0b305ff68"
418
  dependencies = [
419
  "alloc-no-stdlib",
420
  "alloc-stdlib",
@@ -423,9 +423,9 @@ dependencies = [
423
 
424
  [[package]]
425
  name = "brotli-decompressor"
426
- version = "2.3.4"
427
  source = "registry+https://github.com/rust-lang/crates.io-index"
428
- checksum = "4b6561fd3f895a11e8f72af2cb7d22e08366bebc2b6b57f7744c4bda27034744"
429
  dependencies = [
430
  "alloc-no-stdlib",
431
  "alloc-stdlib",
@@ -581,18 +581,18 @@ dependencies = [
581
 
582
  [[package]]
583
  name = "clap"
584
- version = "4.4.4"
585
  source = "registry+https://github.com/rust-lang/crates.io-index"
586
- checksum = "b1d7b8d5ec32af0fadc644bf1fd509a688c2103b185644bb1e29d164e0703136"
587
  dependencies = [
588
  "clap_builder",
589
  ]
590
 
591
  [[package]]
592
  name = "clap_builder"
593
- version = "4.4.4"
594
  source = "registry+https://github.com/rust-lang/crates.io-index"
595
- checksum = "5179bb514e4d7c2051749d8fcefa2ed6d06a9f4e6d69faf3805f5d80b8cf8d56"
596
  dependencies = [
597
  "anstyle",
598
  "clap_lex",
@@ -873,7 +873,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
873
  checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856"
874
  dependencies = [
875
  "cfg-if 1.0.0",
876
- "hashbrown 0.14.0",
877
  "lock_api 0.4.10",
878
  "once_cell",
879
  "parking_lot_core 0.9.8",
@@ -1064,9 +1064,9 @@ dependencies = [
1064
 
1065
  [[package]]
1066
  name = "fastrand"
1067
- version = "2.0.0"
1068
  source = "registry+https://github.com/rust-lang/crates.io-index"
1069
- checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764"
1070
 
1071
  [[package]]
1072
  name = "flate2"
@@ -1392,9 +1392,9 @@ checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
1392
 
1393
  [[package]]
1394
  name = "hashbrown"
1395
- version = "0.14.0"
1396
  source = "registry+https://github.com/rust-lang/crates.io-index"
1397
- checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a"
1398
 
1399
  [[package]]
1400
  name = "hermit-abi"
@@ -1735,9 +1735,9 @@ dependencies = [
1735
 
1736
  [[package]]
1737
  name = "linux-raw-sys"
1738
- version = "0.4.7"
1739
  source = "registry+https://github.com/rust-lang/crates.io-index"
1740
- checksum = "1a9bad9f94746442c783ca431b22403b519cd7fbeed0533fdd6328b2f2212128"
1741
 
1742
  [[package]]
1743
  name = "local-channel"
@@ -2212,9 +2212,9 @@ checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94"
2212
 
2213
  [[package]]
2214
  name = "pest"
2215
- version = "2.7.3"
2216
  source = "registry+https://github.com/rust-lang/crates.io-index"
2217
- checksum = "d7a4d085fd991ac8d5b05a147b437791b4260b76326baf0fc60cf7c9c27ecd33"
2218
  dependencies = [
2219
  "memchr",
2220
  "thiserror",
@@ -2223,9 +2223,9 @@ dependencies = [
2223
 
2224
  [[package]]
2225
  name = "pest_derive"
2226
- version = "2.7.3"
2227
  source = "registry+https://github.com/rust-lang/crates.io-index"
2228
- checksum = "a2bee7be22ce7918f641a33f08e3f43388c7656772244e2bbb2477f44cc9021a"
2229
  dependencies = [
2230
  "pest",
2231
  "pest_generator",
@@ -2233,9 +2233,9 @@ dependencies = [
2233
 
2234
  [[package]]
2235
  name = "pest_generator"
2236
- version = "2.7.3"
2237
  source = "registry+https://github.com/rust-lang/crates.io-index"
2238
- checksum = "d1511785c5e98d79a05e8a6bc34b4ac2168a0e3e92161862030ad84daa223141"
2239
  dependencies = [
2240
  "pest",
2241
  "pest_meta",
@@ -2246,9 +2246,9 @@ dependencies = [
2246
 
2247
  [[package]]
2248
  name = "pest_meta"
2249
- version = "2.7.3"
2250
  source = "registry+https://github.com/rust-lang/crates.io-index"
2251
- checksum = "b42f0394d3123e33353ca5e1e89092e533d2cc490389f2bd6131c43c634ebc5f"
2252
  dependencies = [
2253
  "once_cell",
2254
  "pest",
@@ -2739,9 +2739,9 @@ dependencies = [
2739
 
2740
  [[package]]
2741
  name = "regex"
2742
- version = "1.9.5"
2743
  source = "registry+https://github.com/rust-lang/crates.io-index"
2744
- checksum = "697061221ea1b4a94a624f67d0ae2bfe4e22b8a17b6a192afb11046542cc8c47"
2745
  dependencies = [
2746
  "aho-corasick",
2747
  "memchr",
@@ -2751,9 +2751,9 @@ dependencies = [
2751
 
2752
  [[package]]
2753
  name = "regex-automata"
2754
- version = "0.3.8"
2755
  source = "registry+https://github.com/rust-lang/crates.io-index"
2756
- checksum = "c2f401f4955220693b56f8ec66ee9c78abffd8d1c4f23dc41a23839eb88f0795"
2757
  dependencies = [
2758
  "aho-corasick",
2759
  "memchr",
@@ -2869,9 +2869,9 @@ dependencies = [
2869
 
2870
  [[package]]
2871
  name = "rustix"
2872
- version = "0.38.14"
2873
  source = "registry+https://github.com/rust-lang/crates.io-index"
2874
- checksum = "747c788e9ce8e92b12cd485c49ddf90723550b654b32508f979b71a7b1ecda4f"
2875
  dependencies = [
2876
  "bitflags 2.4.0",
2877
  "errno",
@@ -3098,9 +3098,9 @@ checksum = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012"
3098
 
3099
  [[package]]
3100
  name = "sha2"
3101
- version = "0.10.7"
3102
  source = "registry+https://github.com/rust-lang/crates.io-index"
3103
- checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8"
3104
  dependencies = [
3105
  "cfg-if 1.0.0",
3106
  "cpufeatures",
@@ -3361,18 +3361,18 @@ dependencies = [
3361
 
3362
  [[package]]
3363
  name = "thiserror"
3364
- version = "1.0.48"
3365
  source = "registry+https://github.com/rust-lang/crates.io-index"
3366
- checksum = "9d6d7a740b8a666a7e828dd00da9c0dc290dff53154ea77ac109281de90589b7"
3367
  dependencies = [
3368
  "thiserror-impl",
3369
  ]
3370
 
3371
  [[package]]
3372
  name = "thiserror-impl"
3373
- version = "1.0.48"
3374
  source = "registry+https://github.com/rust-lang/crates.io-index"
3375
- checksum = "49922ecae66cc8a249b77e68d1d0623c1b2c514f0060c27cdc68bd62a1219d35"
3376
  dependencies = [
3377
  "proc-macro2 1.0.67",
3378
  "quote 1.0.33",
@@ -3932,7 +3932,7 @@ dependencies = [
3932
 
3933
  [[package]]
3934
  name = "websurfx"
3935
- version = "0.23.5"
3936
  dependencies = [
3937
  "actix-cors",
3938
  "actix-files",
 
290
 
291
  [[package]]
292
  name = "anstyle"
293
+ version = "1.0.4"
294
  source = "registry+https://github.com/rust-lang/crates.io-index"
295
+ checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87"
296
 
297
  [[package]]
298
  name = "anyhow"
 
412
 
413
  [[package]]
414
  name = "brotli"
415
+ version = "3.4.0"
416
  source = "registry+https://github.com/rust-lang/crates.io-index"
417
+ checksum = "516074a47ef4bce09577a3b379392300159ce5b1ba2e501ff1c819950066100f"
418
  dependencies = [
419
  "alloc-no-stdlib",
420
  "alloc-stdlib",
 
423
 
424
  [[package]]
425
  name = "brotli-decompressor"
426
+ version = "2.5.0"
427
  source = "registry+https://github.com/rust-lang/crates.io-index"
428
+ checksum = "da74e2b81409b1b743f8f0c62cc6254afefb8b8e50bbfe3735550f7aeefa3448"
429
  dependencies = [
430
  "alloc-no-stdlib",
431
  "alloc-stdlib",
 
581
 
582
  [[package]]
583
  name = "clap"
584
+ version = "4.4.6"
585
  source = "registry+https://github.com/rust-lang/crates.io-index"
586
+ checksum = "d04704f56c2cde07f43e8e2c154b43f216dc5c92fc98ada720177362f953b956"
587
  dependencies = [
588
  "clap_builder",
589
  ]
590
 
591
  [[package]]
592
  name = "clap_builder"
593
+ version = "4.4.6"
594
  source = "registry+https://github.com/rust-lang/crates.io-index"
595
+ checksum = "0e231faeaca65ebd1ea3c737966bf858971cd38c3849107aa3ea7de90a804e45"
596
  dependencies = [
597
  "anstyle",
598
  "clap_lex",
 
873
  checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856"
874
  dependencies = [
875
  "cfg-if 1.0.0",
876
+ "hashbrown 0.14.1",
877
  "lock_api 0.4.10",
878
  "once_cell",
879
  "parking_lot_core 0.9.8",
 
1064
 
1065
  [[package]]
1066
  name = "fastrand"
1067
+ version = "2.0.1"
1068
  source = "registry+https://github.com/rust-lang/crates.io-index"
1069
+ checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5"
1070
 
1071
  [[package]]
1072
  name = "flate2"
 
1392
 
1393
  [[package]]
1394
  name = "hashbrown"
1395
+ version = "0.14.1"
1396
  source = "registry+https://github.com/rust-lang/crates.io-index"
1397
+ checksum = "7dfda62a12f55daeae5015f81b0baea145391cb4520f86c248fc615d72640d12"
1398
 
1399
  [[package]]
1400
  name = "hermit-abi"
 
1735
 
1736
  [[package]]
1737
  name = "linux-raw-sys"
1738
+ version = "0.4.8"
1739
  source = "registry+https://github.com/rust-lang/crates.io-index"
1740
+ checksum = "3852614a3bd9ca9804678ba6be5e3b8ce76dfc902cae004e3e0c44051b6e88db"
1741
 
1742
  [[package]]
1743
  name = "local-channel"
 
2212
 
2213
  [[package]]
2214
  name = "pest"
2215
+ version = "2.7.4"
2216
  source = "registry+https://github.com/rust-lang/crates.io-index"
2217
+ checksum = "c022f1e7b65d6a24c0dbbd5fb344c66881bc01f3e5ae74a1c8100f2f985d98a4"
2218
  dependencies = [
2219
  "memchr",
2220
  "thiserror",
 
2223
 
2224
  [[package]]
2225
  name = "pest_derive"
2226
+ version = "2.7.4"
2227
  source = "registry+https://github.com/rust-lang/crates.io-index"
2228
+ checksum = "35513f630d46400a977c4cb58f78e1bfbe01434316e60c37d27b9ad6139c66d8"
2229
  dependencies = [
2230
  "pest",
2231
  "pest_generator",
 
2233
 
2234
  [[package]]
2235
  name = "pest_generator"
2236
+ version = "2.7.4"
2237
  source = "registry+https://github.com/rust-lang/crates.io-index"
2238
+ checksum = "bc9fc1b9e7057baba189b5c626e2d6f40681ae5b6eb064dc7c7834101ec8123a"
2239
  dependencies = [
2240
  "pest",
2241
  "pest_meta",
 
2246
 
2247
  [[package]]
2248
  name = "pest_meta"
2249
+ version = "2.7.4"
2250
  source = "registry+https://github.com/rust-lang/crates.io-index"
2251
+ checksum = "1df74e9e7ec4053ceb980e7c0c8bd3594e977fde1af91daba9c928e8e8c6708d"
2252
  dependencies = [
2253
  "once_cell",
2254
  "pest",
 
2739
 
2740
  [[package]]
2741
  name = "regex"
2742
+ version = "1.9.6"
2743
  source = "registry+https://github.com/rust-lang/crates.io-index"
2744
+ checksum = "ebee201405406dbf528b8b672104ae6d6d63e6d118cb10e4d51abbc7b58044ff"
2745
  dependencies = [
2746
  "aho-corasick",
2747
  "memchr",
 
2751
 
2752
  [[package]]
2753
  name = "regex-automata"
2754
+ version = "0.3.9"
2755
  source = "registry+https://github.com/rust-lang/crates.io-index"
2756
+ checksum = "59b23e92ee4318893fa3fe3e6fb365258efbfe6ac6ab30f090cdcbb7aa37efa9"
2757
  dependencies = [
2758
  "aho-corasick",
2759
  "memchr",
 
2869
 
2870
  [[package]]
2871
  name = "rustix"
2872
+ version = "0.38.15"
2873
  source = "registry+https://github.com/rust-lang/crates.io-index"
2874
+ checksum = "d2f9da0cbd88f9f09e7814e388301c8414c51c62aa6ce1e4b5c551d49d96e531"
2875
  dependencies = [
2876
  "bitflags 2.4.0",
2877
  "errno",
 
3098
 
3099
  [[package]]
3100
  name = "sha2"
3101
+ version = "0.10.8"
3102
  source = "registry+https://github.com/rust-lang/crates.io-index"
3103
+ checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8"
3104
  dependencies = [
3105
  "cfg-if 1.0.0",
3106
  "cpufeatures",
 
3361
 
3362
  [[package]]
3363
  name = "thiserror"
3364
+ version = "1.0.49"
3365
  source = "registry+https://github.com/rust-lang/crates.io-index"
3366
+ checksum = "1177e8c6d7ede7afde3585fd2513e611227efd6481bd78d2e82ba1ce16557ed4"
3367
  dependencies = [
3368
  "thiserror-impl",
3369
  ]
3370
 
3371
  [[package]]
3372
  name = "thiserror-impl"
3373
+ version = "1.0.49"
3374
  source = "registry+https://github.com/rust-lang/crates.io-index"
3375
+ checksum = "10712f02019e9288794769fba95cd6847df9874d49d871d062172f9dd41bc4cc"
3376
  dependencies = [
3377
  "proc-macro2 1.0.67",
3378
  "quote 1.0.33",
 
3932
 
3933
  [[package]]
3934
  name = "websurfx"
3935
+ version = "0.24.3"
3936
  dependencies = [
3937
  "actix-cors",
3938
  "actix-files",
Cargo.toml CHANGED
@@ -1,6 +1,6 @@
1
  [package]
2
  name = "websurfx"
3
- version = "0.23.6"
4
  edition = "2021"
5
  description = "An open-source alternative to Searx that provides clean, ad-free, and organic results with incredible speed while keeping privacy and security in mind."
6
  repository = "https://github.com/neon-mmd/websurfx"
 
1
  [package]
2
  name = "websurfx"
3
+ version = "0.24.3"
4
  edition = "2021"
5
  description = "An open-source alternative to Searx that provides clean, ad-free, and organic results with incredible speed while keeping privacy and security in mind."
6
  repository = "https://github.com/neon-mmd/websurfx"
docs/README.md CHANGED
@@ -9,7 +9,7 @@
9
 
10
  - [Instances](./instances.md)
11
  - [Installation](./installation.md)
12
- - [Building](./building.md)
13
  - [Configuration](./configuration.md)
14
  - [Theming](./theming.md)
15
 
 
9
 
10
  - [Instances](./instances.md)
11
  - [Installation](./installation.md)
12
+ - [Features](./features.md)
13
  - [Configuration](./configuration.md)
14
  - [Theming](./theming.md)
15
 
docs/building.md DELETED
@@ -1,59 +0,0 @@
1
- # Build Options
2
-
3
- The project provides 4 caching options as conditionally compiled features. This helps reduce the size of the compiled app by only including the code that is necessary for a particular caching option.
4
-
5
- The different caching features provided are as follows:
6
- - No cache
7
- - Redis cache
8
- - In memory cache
9
- - Hybrid cache
10
-
11
- ## No Cache
12
-
13
- This feature disables caching for the search engine. This option can drastically reduce binary size but with the cost that subsequent search requests and previous & next page search results are not cached which can make navigating between pages slower. As well as page refreshes of the same page also becomes slower as each refresh has to fetch the results from the upstream search engines.
14
-
15
- To build the app with this option run the following command:
16
-
17
- ``` shell
18
- cargo build -r --no-default-features
19
- ```
20
-
21
- Once you have build the app with this option follow the commands listed on the [**Installation**](./installation.md#install-from-source) page of the docs to run the app.
22
-
23
- ## Redis Cache
24
-
25
- This feature enables `Redis` caching ability for the search engine. This option allows the search engine to cache the results on the redis server. This feature can be useful for having a dedicated cache server for multiple devices hosted with the `Websurfx` server which can use the one dedicated cache server for hosting their cache on it. But a disadvantage of this solution is that if the `Redis`server is located far away (for example provided by a vps as service) and if it is unavailable or down for some reason then the `Websurfx` server would not be able to function properly or will crash on startup.
26
-
27
- To build the app with this option run the following command:
28
-
29
- ``` shell
30
- cargo build -r --no-default-features --features redis-cache
31
- ```
32
-
33
- Once you have build the app with this option follow the commands listed on the [**Installation**](./installation.md#install-from-source) page of the docs to run the app.
34
-
35
- ## In Memory Cache
36
-
37
- This feature enables `In Memory` caching soluion within the search engine and it is the default feature provided by the project. This option allows the search engine to cache the results in the memory which can help increase the speed of the fetched cache results and it also has an advantage that it is extremely reliable as all the results are stored in memory within the search engine. Though the disadvantage of this solution are that caching of results is slightly slower than the `redis-cache` solution, it requires a good amount of memory on the system and as such is not ideal for very low memory devices and is highly unscalable.
38
-
39
- To build the app with this option run the following command:
40
-
41
- ``` shell
42
- cargo build -r
43
- ```
44
-
45
- Once you have build the app with this option follow the commands listed on the [**Installation**](./installation.md#install-from-source) page of the docs to run the app.
46
-
47
- ## Hybrid Cache
48
-
49
- This feature enables the `Hybrid` caching solution for the search engine which provides the advantages of both `In Memory` caching and `Redis` caching and it is an ideal solution if you need a very resiliant and reliable solution for the `Websurfx` which can provide both speed and reliability. Like for example if the `Redis` server becomes unavailable then the search engine switches to `In Memory` caching until the server becomes available again. This solution can be useful for hosting `Websurfx` instance which will be used by hundreds or thousands of users over the world.
50
-
51
- To build the app with this option run the following command:
52
-
53
- ``` shell
54
- cargo build -r --features redis-cache
55
- ```
56
-
57
- Once you have build the app with this option follow the commands listed on the [**Installation**](./installation.md#install-from-source) page of the docs to run the app.
58
-
59
- [⬅️ Go back to Home](./README.md)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/features.md ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Features
2
+
3
+ The project provides 4 caching options as conditionally compiled features. This helps reduce the size of the compiled app by only including the code that is necessary for a particular caching option.
4
+
5
+ The different caching features provided are as follows:
6
+ - No cache
7
+ - Redis cache
8
+ - In memory cache
9
+ - Hybrid cache
10
+
11
+ ## Explaination
12
+
13
+ ### No Cache
14
+
15
+ This feature can drastically reduce binary size but with the cost that subsequent search requests and previous & next page search results are not cached which can make navigating between pages slower. As well as page refreshes of the same page also becomes slower as each refresh has to fetch the results from the upstream search engines.
16
+
17
+ ### Redis Cache
18
+
19
+ This feature allows the search engine to cache the results on the redis server. This feature can be useful for having a dedicated cache server for multiple devices hosted with the `Websurfx` server which can use the one dedicated cache server for hosting their cache on it. But a disadvantage of this solution is that if the `Redis`server is located far away (for example provided by a vps as service) and if it is unavailable or down for some reason then the `Websurfx` server would not be able to function properly or will crash on startup.
20
+
21
+ ### In Memory Cache
22
+
23
+ This feature is the default feature provided by the project. This feature allows the search engine to cache the results in the memory which can help increase the speed of the fetched cache results and it also has an advantage that it is extremely reliable as all the results are stored in memory within the search engine. Though the disadvantage of this solution are that caching of results is slightly slower than the `redis-cache` solution, it requires a good amount of memory on the system and as such is not ideal for very low memory devices and is highly unscalable.
24
+
25
+ ### Hybrid Cache
26
+
27
+ This feature provides the advantages of both `In Memory` caching and `Redis` caching and it is an ideal solution if you need a very resiliant and reliable solution for the `Websurfx` which can provide both speed and reliability. Like for example if the `Redis` server becomes unavailable then the search engine switches to `In Memory` caching until the server becomes available again. This solution can be useful for hosting `Websurfx` instance which will be used by hundreds or thousands of users over the world.
28
+
29
+ ## Tabular Summary
30
+
31
+
32
+ | **Attributes** | **Hybrid** | **In-Memory** | **No Cache** | **Redis** |
33
+ |-----------------------------------------|------------|------------------------------------------------------|-----------------|------------------------|
34
+ | **Speed** | Fast | Caching is slow, but retrieval of cache data is fast | Slow | Fastest |
35
+ | **Reliability** | βœ… | βœ… | βœ… | ❌ |
36
+ | **Scalability** | βœ… | ❌ | - | βœ… |
37
+ | **Resiliancy** | βœ… | βœ… | βœ… | ❌ |
38
+ | **Production/Large Scale/Instance use** | βœ… | Not Recommended | Not Recommended | Not Recommended |
39
+ | **Low Memory Support** | ❌ | ❌ | βœ… | ❌ |
40
+ | **Binary Size** | Big | Bigger than `No Cache` | small | Bigger than `No Cache` |
41
+
42
+ [⬅️ Go back to Home](./README.md)
docs/installation.md CHANGED
@@ -2,16 +2,17 @@
2
 
3
  ## Arch Linux
4
 
5
- You can install `Websurfx` through the [Aur](https://aur.archlinux.org/packages/websurfx-git), Currently we only support `Rolling/Edge` version. You can install the rolling/edge version by running the following command (using [paru](https://github.com/Morganamilo/paru)):
6
 
7
- ```bash
 
 
8
  paru -S websurfx-edge-git
9
  ```
10
 
11
  After installing it you can run the websurfx server by running the following commands:
12
 
13
- ```bash
14
- redis-server --port 8082 &
15
  websurfx
16
  ```
17
 
@@ -19,40 +20,78 @@ Once you have started the server, open your preferred web browser and navigate t
19
 
20
  If you want to change the port or the ip or any other configuration setting checkout the [configuration docs](./configuration.md).
21
 
 
 
 
 
22
  ## NixOS
23
 
24
  A `flake.nix` has been provided to allow installing `websurfx` easily. It utilizes [nearsk](https://github.com/nix-community/naersk) to automatically generate a derivation based on `Cargo.toml` and `Cargo.lock`.
25
 
26
- The flake has several outputs, which may be consumed:
27
 
28
- ```bash
 
 
 
 
 
 
 
 
 
29
  nix build .#websurfx
30
  nix run .#websurfx
31
  ```
32
 
33
- You may include it in your own flake by adding this repo to its inputs and adding it to `environment.systemPackages` as follows:
 
34
 
35
- ```nix
36
- {
37
- description = "My awesome configuration";
38
 
39
- inputs = {
40
- websurfx.url = "github:neon-mmd/websurfx";
41
- };
42
 
43
- outputs = { nixpkgs, ... }@inputs: {
44
- nixosConfigurations = {
45
- hostname = nixpkgs.lib.nixosSystem {
46
- system = "x86_64-linux";
47
- modules = [{
48
- environment.systemPackages = [inputs.websurfx.packages.x86_64-linux.websurfx];
49
- }];
50
- };
51
- };
52
- };
53
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
54
  ```
55
 
 
 
 
56
  ## Other Distros
57
 
58
  The package is currently not available on other Linux distros. With contribution and support it can be made available on other distros as well πŸ™‚.
@@ -87,21 +126,61 @@ git clone https://github.com/neon-mmd/websurfx.git
87
  cd websurfx
88
  ```
89
 
90
- Once you have changed the directory to the `websurfx` directory then follow the build options listed in the [building docs](./building.md).
91
 
92
- After that run the following command if you have build the app with the `redis-cache` feature:
93
 
94
- ``` shell
95
- redis-server --port 8082 &
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
96
  ```
97
 
98
- After that run the following command to start the search engine:
 
 
 
 
99
 
100
- ``` shell
 
 
101
  ./target/release/websurfx
102
  ```
103
 
104
- Once you have started the server, open your preferred web browser and navigate to http://127.0.0.1:8080/ to start using Websurfx.
105
 
106
  If you want to change the port or the ip or any other configuration setting checkout the [configuration docs](./configuration.md).
107
 
@@ -109,7 +188,121 @@ If you want to change the port or the ip or any other configuration setting chec
109
 
110
  Before you start, you will need [Docker](https://docs.docker.com/get-docker/) installed on your system first.
111
 
112
- ## Unstable/Edge/Rolling
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
113
 
114
  First clone the the repository by running the following command:
115
 
@@ -178,15 +371,18 @@ upstream_search_engines = {
178
  } -- select the upstream search engines from which the results should be fetched.
179
  ```
180
 
181
- After this run the following command to deploy the app:
182
 
183
  ```bash
184
- docker compose up -d --build
185
  ```
186
 
 
 
 
187
  This will take around 5-10 mins for first deployment, afterwards the docker build stages will be cached so it will be faster to be build from next time onwards. After the above step finishes launch your preferred browser and then navigate to `http://<ip_address_of_the_device>:<whatever_port_you_provided_in_the_config>`.
188
 
189
- ## Stable
190
 
191
  For the stable version, follow the same steps as above (as mentioned for the unstable/rolling/edge version) with an addition of one command which has to be performed after cloning and changing directory into the repository which makes the cloning step as follows:
192
 
 
2
 
3
  ## Arch Linux
4
 
5
+ ### Rolling/Edge/Unstable
6
 
7
+ You can install `Websurfx` through the [Aur](https://aur.archlinux.org/packages/websurfx-git), By running the following command (using [paru](https://github.com/Morganamilo/paru)):
8
+
9
+ ```shell
10
  paru -S websurfx-edge-git
11
  ```
12
 
13
  After installing it you can run the websurfx server by running the following commands:
14
 
15
+ ```shell
 
16
  websurfx
17
  ```
18
 
 
20
 
21
  If you want to change the port or the ip or any other configuration setting checkout the [configuration docs](./configuration.md).
22
 
23
+ ### Stable
24
+
25
+ For the stable version, follow the same steps as above (as mentioned for the `unstable/rolling/edge` version) with the only difference being that the package to be installed for stable version is called `websurfx-git` instead of `websurfx-edge-git`.
26
+
27
  ## NixOS
28
 
29
  A `flake.nix` has been provided to allow installing `websurfx` easily. It utilizes [nearsk](https://github.com/nix-community/naersk) to automatically generate a derivation based on `Cargo.toml` and `Cargo.lock`.
30
 
31
+ The Websurfx project provides 2 versions/flavours for the flake `stable` and `rolling/unstable/edge`. The steps for each are covered below in different sections.
32
 
33
+ ### Rolling/Edge/Unstable
34
+
35
+ To get started, First clone the repository, edit the config file which is located in the `websurfx` directory and then build and run the websurfx server by running the following commands:
36
+
37
+ ```shell
38
+ git clone https://github.com/neon-mmd/websurfx.git
39
+ cd websurfx
40
+ cp -rf ./websurfx/ ~/.config/
41
+ $ mkdir /opt/websurfx/
42
+ $ cp -rf ./public/ /opt/websurfx/
43
  nix build .#websurfx
44
  nix run .#websurfx
45
  ```
46
 
47
+ > **Note**
48
+ > In the above command the dollar sign(**$**) refers to running the command in privilaged mode by using utilities `sudo`, `doas`, `pkgexec` or any other privilage access methods.
49
 
50
+ Once you have run the above set of commands, then open your preferred web browser and navigate to http://127.0.0.1:8080/ to start using Websurfx.
 
 
51
 
52
+ If you want to change the port or the ip or any other configuration setting checkout the [configuration docs](./configuration.md).
 
 
53
 
54
+ > Optionally, you may include it in your own flake by adding this repo to its inputs and adding it to `environment.systemPackages` as follows:
55
+ >
56
+ > ```nix
57
+ > {
58
+ > description = "My awesome configuration";
59
+ >
60
+ > inputs = {
61
+ > websurfx.url = "github:neon-mmd/websurfx";
62
+ > };
63
+ >
64
+ > outputs = { nixpkgs, ... }@inputs: {
65
+ > nixosConfigurations = {
66
+ > hostname = nixpkgs.lib.nixosSystem {
67
+ > system = "x86_64-linux";
68
+ > modules = [{
69
+ > environment.systemPackages = [inputs.websurfx.packages.x86_64-linux.websurfx];
70
+ > }];
71
+ > };
72
+ > };
73
+ > };
74
+ > }
75
+ > ```
76
+
77
+ ### Stable
78
+
79
+ For the stable version, follow the same steps as above (as mentioned for the `unstable/rolling/edge version`) with an addition of one command which has to be performed after cloning and changing directory into the repository which makes the building step as follows:
80
+
81
+ ```shell
82
+ git clone https://github.com/neon-mmd/websurfx.git
83
+ cd websurfx
84
+ git checkout stable
85
+ cp -rf ./websurfx/ ~/.config/
86
+ $ mkdir /opt/websurfx/
87
+ $ cp -rf ./public/ /opt/websurfx/
88
+ nix build .#websurfx
89
+ nix run .#websurfx
90
  ```
91
 
92
+ > **Note**
93
+ > In the above command the dollar sign(**$**) refers to running the command in privilaged mode by using utilities `sudo`, `doas`, `pkgexec` or any other privilage access methods.
94
+
95
  ## Other Distros
96
 
97
  The package is currently not available on other Linux distros. With contribution and support it can be made available on other distros as well πŸ™‚.
 
126
  cd websurfx
127
  ```
128
 
129
+ Once you have changed the directory to the `websurfx` directory then follow the build options listed below:
130
 
131
+ ### Hybrid Cache
132
 
133
+ > For more information on the features and their pros and cons. see: [**Features**](./features.md)
134
+
135
+ To build the search engine with the `Hybrid caching` feature. Run the following build command:
136
+
137
+ ```shell
138
+ cargo build -r --features redis-cache
139
+ ```
140
+
141
+ ### Memory Cache (Default Feature)
142
+
143
+ > For more information on the features and their pros and cons. see: [**Features**](./features.md)
144
+
145
+ To build the search engine with the `In-Memory caching` feature. Run the following build command:
146
+
147
+ ```shell
148
+ cargo build -r
149
+ ```
150
+
151
+ ### No Cache
152
+
153
+ > For more information on the features and their pros and cons. see: [**Features**](./features.md)
154
+
155
+ To build the search engine with the `No caching` feature. Run the following build command:
156
+
157
+ ```shell
158
+ cargo build -r --no-default-features
159
+ ```
160
+
161
+ ### Redis Cache
162
+
163
+ > For more information on the features and their pros and cons. see: [**Features**](./features.md)
164
+
165
+ To build the search engine with the `hybrid caching` feature. Run the following build command:
166
+
167
+ ```shell
168
+ cargo build -r --no-default-features --features redis-cache
169
  ```
170
 
171
+ > Optionally, If you have build the app with the `Redis cache`or `Hybrid cache` feature (as mentioned above) then before launching the search engine run the following command:
172
+ >
173
+ > ```shell
174
+ > redis-server --port 8082 &
175
+ > ```
176
 
177
+ Once you have finished building the `search engine`. then run the following command to start the search engine:
178
+
179
+ ```shell
180
  ./target/release/websurfx
181
  ```
182
 
183
+ Once you have started the server, then launch your preferred web browser and navigate to http://127.0.0.1:8080/ to start using Websurfx.
184
 
185
  If you want to change the port or the ip or any other configuration setting checkout the [configuration docs](./configuration.md).
186
 
 
188
 
189
  Before you start, you will need [Docker](https://docs.docker.com/get-docker/) installed on your system first.
190
 
191
+ ## Prebuild
192
+
193
+ The Websurfx project provides several prebuild images based on the different features provided by the search engine. To get started using the prebuild image, you will first need to create a `docker-compose.yml` file with the following content:
194
+
195
+ ```yaml
196
+ ---
197
+ version: '3.9'
198
+ services:
199
+ app:
200
+ # Comment the line below if you don't want to use the `hybrid/latest` image.
201
+ image: neonmmd/websurfx:latest
202
+ # Uncomment the line below if you want to use the `no cache` image.
203
+ # image: neonmmd/websurfx:nocache
204
+ # Uncomment the line below if you want to use the `memory` image.
205
+ # image: neonmmd/websurfx:memory
206
+ # Uncomment the line below if you want to use the `redis` image.
207
+ # image: neonmmd/websurfx:redis
208
+ ports:
209
+ - 8080:8080
210
+ # Uncomment the following lines if you are using the `hybrid/latest` or `redis` image.
211
+ # depends_on:
212
+ # - redis
213
+ # links:
214
+ # - redis
215
+ volumes:
216
+ - ./websurfx/:/etc/xdg/websurfx/
217
+ # Uncomment the following lines if you are using the `hybrid/latest` or `redis` image.
218
+ # redis:
219
+ # image: redis:latest
220
+ # ports:
221
+ # - 6379:6379
222
+ ```
223
+
224
+ Then make sure to edit the `docker-compose.yml` file as required. After that create a directory `websurfx` in the directory you have placed the `docker-compose.yml` file, and then in the new directory create two new empty files named `allowlist.txt` and `blocklist.txt`. Finally, create a new config file `config.lua` with the default configuration, which looks something like this:
225
+
226
+ ```lua
227
+ -- ### General ###
228
+ logging = true -- an option to enable or disable logs.
229
+ debug = false -- an option to enable or disable debug mode.
230
+ threads = 8 -- the amount of threads that the app will use to run (the value should be greater than 0).
231
+
232
+ -- ### Server ###
233
+ port = "8080" -- port on which server should be launched
234
+ binding_ip = "0.0.0.0" --ip address on the which server should be launched.
235
+ production_use = false -- whether to use production mode or not (in other words this option should be used if it is to be used to host it on the server to provide a service to a large number of users (more than one))
236
+ -- if production_use is set to true
237
+ -- There will be a random delay before sending the request to the search engines, this is to prevent DDoSing the upstream search engines from a large number of simultaneous requests.
238
+ request_timeout = 30 -- timeout for the search requests sent to the upstream search engines to be fetched (value in seconds).
239
+ rate_limiter = {
240
+ number_of_requests = 20, -- The number of request that are allowed within a provided time limit.
241
+ time_limit = 3, -- The time limit in which the quantity of requests that should be accepted.
242
+ }
243
+
244
+ -- ### Search ###
245
+ -- Filter results based on different levels. The levels provided are:
246
+ -- {{
247
+ -- 0 - None
248
+ -- 1 - Low
249
+ -- 2 - Moderate
250
+ -- 3 - High
251
+ -- 4 - Aggressive
252
+ -- }}
253
+ safe_search = 2
254
+
255
+ -- ### Website ###
256
+ -- The different colorschemes provided are:
257
+ -- {{
258
+ -- catppuccin-mocha
259
+ -- dark-chocolate
260
+ -- dracula
261
+ -- gruvbox-dark
262
+ -- monokai
263
+ -- nord
264
+ -- oceanic-next
265
+ -- one-dark
266
+ -- solarized-dark
267
+ -- solarized-light
268
+ -- tokyo-night
269
+ -- tomorrow-night
270
+ -- }}
271
+ colorscheme = "catppuccin-mocha" -- the colorscheme name which should be used for the website theme
272
+ theme = "simple" -- the theme name which should be used for the website
273
+
274
+ -- ### Caching ###
275
+ redis_url = "redis://redis:6379" -- redis connection url address on which the client should connect on.
276
+
277
+ -- ### Search Engines ###
278
+ upstream_search_engines = {
279
+ DuckDuckGo = true,
280
+ Searx = false,
281
+ } -- select the upstream search engines from which the results should be fetched.
282
+ ```
283
+
284
+ Then run the following command to deploy the search engine:
285
+
286
+ ```shell
287
+ $ docker compose up -d
288
+ ```
289
+
290
+ > **Note**
291
+ > In the above command the dollar sign(**$**) refers to running the command in privilaged mode by using utilities `sudo`, `doas`, `pkgexec` or any other privilage access methods.
292
+
293
+ Then launch the browser of your choice and navigate to http://<ip_address_of_the_device>:<whatever_port_you_provided_in_the_config>.
294
+
295
+ > **Note**
296
+ > The official prebuild images only support `stable` versions of the app and will not support `rolling/edge/unstable` versions. But with support and contribution it could be made available for these versions as well πŸ™‚.
297
+
298
+ ## Manual Deployment
299
+
300
+ This section covers how to deploy the app with docker manually by manually building the image and deploying it.
301
+
302
+ > **Note**
303
+ > This section is provided for those who want to futher customize the docker image or for those who are extra cautious about security.
304
+
305
+ ### Unstable/Edge/Rolling
306
 
307
  First clone the the repository by running the following command:
308
 
 
371
  } -- select the upstream search engines from which the results should be fetched.
372
  ```
373
 
374
+ After this make sure to edit the `docker-compose.yml` and `Dockerfile` files as required and run the following command to deploy the app:
375
 
376
  ```bash
377
+ $ docker compose up -d --build
378
  ```
379
 
380
+ > **Note**
381
+ > In the above command the dollar sign(**$**) refers to running the command in privilaged mode by using utilities `sudo`, `doas`, `pkgexec` or any other privilage access methods.
382
+
383
  This will take around 5-10 mins for first deployment, afterwards the docker build stages will be cached so it will be faster to be build from next time onwards. After the above step finishes launch your preferred browser and then navigate to `http://<ip_address_of_the_device>:<whatever_port_you_provided_in_the_config>`.
384
 
385
+ ### Stable
386
 
387
  For the stable version, follow the same steps as above (as mentioned for the unstable/rolling/edge version) with an addition of one command which has to be performed after cloning and changing directory into the repository which makes the cloning step as follows:
388