Spaces:
Runtime error
Runtime error
Merge branch 'rolling' into master
Browse files- .github/workflows/contributors.yml +47 -0
- .github/workflows/labels.yml +1 -1
- .github/workflows/releases.yml +0 -78
- .github/workflows/rust_format.yml +10 -1
- .gitignore +4 -0
- .rusty-hook.toml +5 -0
- .stylelintrc.json +13 -0
- CONTRIBUTING.md +2 -18
- Cargo.lock +191 -140
- Cargo.toml +5 -1
- README.md +27 -66
- docs/configuration.md +19 -3
- docs/faq.md +2 -2
- docs/installation.md +58 -16
- docs/introduction.md +1 -1
- docs/theming.md +42 -1
- images/create_fork_button.png +0 -0
- images/fork_button.png +0 -0
- images/fork_options_page.png +0 -0
- images/main_page.png +0 -0
- public/images/websurfx_logo.png +0 -0
- public/static/colorschemes/dark-chocolate.css +11 -0
- public/static/colorschemes/one-dark.css +11 -0
- public/static/colorschemes/tokyo-night.css +11 -0
- public/static/themes/simple.css +41 -0
- public/templates/about.html +24 -15
- public/templates/index.html +1 -1
- src/bin/websurfx.rs +4 -2
- src/cache/cacher.rs +16 -20
- src/cache/mod.rs +1 -1
- src/config_parser/parser.rs +74 -5
- src/handler/mod.rs +1 -0
- src/handler/public_path_handler.rs +31 -0
- src/lib.rs +13 -3
- src/search_results_handler/aggregation_models.rs +1 -1
- src/search_results_handler/aggregator.rs +8 -3
- src/search_results_handler/user_agent.rs +11 -9
- src/server/routes.rs +11 -12
- websurfx/config.lua +10 -3
.github/workflows/contributors.yml
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
name: Contributors List
|
2 |
+
|
3 |
+
on:
|
4 |
+
workflow_dispatch:
|
5 |
+
|
6 |
+
schedule:
|
7 |
+
- cron: "0 1 * * *"
|
8 |
+
|
9 |
+
jobs:
|
10 |
+
contributors:
|
11 |
+
permissions:
|
12 |
+
contents: write
|
13 |
+
pull-requests: write
|
14 |
+
|
15 |
+
runs-on: ubuntu-latest
|
16 |
+
|
17 |
+
steps:
|
18 |
+
- name: Checkout code
|
19 |
+
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
|
20 |
+
with:
|
21 |
+
fetch-depth: 0
|
22 |
+
ref: ${{ github.event.repository.default_branch }}
|
23 |
+
|
24 |
+
- name: Update contributors list
|
25 |
+
uses: wow-actions/contributors-list@b9e91f91a51a55460fdcae64daad0cb8122cdd53 # v1.1.0
|
26 |
+
with:
|
27 |
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
28 |
+
svgPath: images/contributors_list.svg
|
29 |
+
round: true
|
30 |
+
includeBots: false
|
31 |
+
noCommit: true
|
32 |
+
|
33 |
+
- name: Commit & PR
|
34 |
+
uses: peter-evans/create-pull-request@38e0b6e68b4c852a5500a94740f0e535e0d7ba54 # v4.2.4
|
35 |
+
with:
|
36 |
+
token: ${{ secrets.GITHUB_TOKEN }}
|
37 |
+
add-paths: .github/assets/CONTRIBUTORS.svg
|
38 |
+
commit-message: 'chore: update contributors-list'
|
39 |
+
committer: GitHub <[email protected]>
|
40 |
+
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
|
41 |
+
signoff: false
|
42 |
+
branch: workflow/update-contributors-list
|
43 |
+
base: main
|
44 |
+
delete-branch: true
|
45 |
+
title: 'chore: update contributors-list'
|
46 |
+
body: |
|
47 |
+
Automated update to `images/contributors_list.svg`
|
.github/workflows/labels.yml
CHANGED
@@ -3,7 +3,7 @@ name: Import open source standard labels
|
|
3 |
on:
|
4 |
push:
|
5 |
branches:
|
6 |
-
-
|
7 |
|
8 |
jobs:
|
9 |
labels:
|
|
|
3 |
on:
|
4 |
push:
|
5 |
branches:
|
6 |
+
- rolling
|
7 |
|
8 |
jobs:
|
9 |
labels:
|
.github/workflows/releases.yml
DELETED
@@ -1,78 +0,0 @@
|
|
1 |
-
name: Releases
|
2 |
-
on:
|
3 |
-
push:
|
4 |
-
branches:
|
5 |
-
- "rolling"
|
6 |
-
|
7 |
-
concurrency:
|
8 |
-
group: "rolling-branch"
|
9 |
-
|
10 |
-
jobs:
|
11 |
-
changelog:
|
12 |
-
if: github.repository == 'neon-mmd/websurfx'
|
13 |
-
runs-on: ubuntu-latest
|
14 |
-
|
15 |
-
steps:
|
16 |
-
# Create a temporary, uniquely named branch to push release info to
|
17 |
-
- name: create temporary branch
|
18 |
-
uses: peterjgrainger/[email protected]
|
19 |
-
id: create-branch
|
20 |
-
with:
|
21 |
-
branch: "release-from-${{ github.sha }}"
|
22 |
-
sha: "${{ github.sha }}"
|
23 |
-
env:
|
24 |
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
25 |
-
|
26 |
-
# check out the repository afterwards
|
27 |
-
- uses: actions/checkout@v3
|
28 |
-
|
29 |
-
# fetch branches and switch to the temporary branch
|
30 |
-
- name: switch to new branch
|
31 |
-
run: git fetch --all && git checkout --track origin/release-from-${{ github.sha }}
|
32 |
-
|
33 |
-
# update app config with version
|
34 |
-
- name: Get current rust app version from its Cargo.toml.
|
35 |
-
id: foo
|
36 |
-
uses: dante-signal31/[email protected]
|
37 |
-
with:
|
38 |
-
cargo_toml_folder: rust_app_folder/
|
39 |
-
|
40 |
-
- name: Use the version to update the Cargo.toml version.
|
41 |
-
shell: bash
|
42 |
-
run: sed -i "3s/version = \"[0-9]*.[0-9]*.[0-9]*\"/version = \"${{ steps.foo.outputs.app_version }}\"/g" Cargo.toml
|
43 |
-
|
44 |
-
# create release info and push it upstream
|
45 |
-
- name: conventional Changelog Action
|
46 |
-
id: changelog
|
47 |
-
uses: TriPSs/conventional-changelog-action@v3
|
48 |
-
with:
|
49 |
-
github-token: ${{ secrets.GITHUB_TOKEN }}
|
50 |
-
version-file: "./Cargo.toml"
|
51 |
-
git-branch: "release-from-${{ github.sha }}"
|
52 |
-
skip-on-empty: false
|
53 |
-
skip-git-pull: true
|
54 |
-
|
55 |
-
# create PR using GitHub CLI
|
56 |
-
- name: create PR with release info
|
57 |
-
id: create-pr
|
58 |
-
run: gh pr create --base main --head release-from-${{ github.sha }} --title 'Merge new release into rolling' --body 'Created by Github action'
|
59 |
-
env:
|
60 |
-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
61 |
-
|
62 |
-
# merge PR using GitHub CLI
|
63 |
-
- name: merge PR with release info
|
64 |
-
id: merge-pr
|
65 |
-
run: gh pr merge --admin --merge --subject 'Merge release info' --delete-branch
|
66 |
-
env:
|
67 |
-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
68 |
-
|
69 |
-
# release info is now in main so we can continue as before
|
70 |
-
- name: create release with last commit
|
71 |
-
uses: actions/create-release@v1
|
72 |
-
if: steps.changelog.outputs.skipped == 'false'
|
73 |
-
env:
|
74 |
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
75 |
-
with:
|
76 |
-
tag_name: ${{ steps.changelog.outputs.tag }}
|
77 |
-
release_name: ${{ steps.changelog.outputs.tag }}
|
78 |
-
body: ${{ steps.changelog.outputs.clean_changelog }}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.github/workflows/rust_format.yml
CHANGED
@@ -19,7 +19,16 @@ jobs:
|
|
19 |
profile: minimal
|
20 |
toolchain: stable
|
21 |
components: rustfmt, clippy
|
22 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
- name: Run cargo check
|
24 |
uses: actions-rs/cargo@v1
|
25 |
with:
|
|
|
19 |
profile: minimal
|
20 |
toolchain: stable
|
21 |
components: rustfmt, clippy
|
22 |
+
- name: Format
|
23 |
+
uses: actions-rs/cargo@v1
|
24 |
+
with:
|
25 |
+
command: fmt
|
26 |
+
args: -- --check
|
27 |
+
- name: Clippy
|
28 |
+
uses: actions-rs/cargo@v1
|
29 |
+
with:
|
30 |
+
command: clippy
|
31 |
+
args: --all-features --all-targets --all
|
32 |
- name: Run cargo check
|
33 |
uses: actions-rs/cargo@v1
|
34 |
with:
|
.gitignore
CHANGED
@@ -1 +1,5 @@
|
|
1 |
/target
|
|
|
|
|
|
|
|
|
|
1 |
/target
|
2 |
+
package.json
|
3 |
+
package-lock.json
|
4 |
+
dump.rdb
|
5 |
+
.vscode
|
.rusty-hook.toml
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
[hooks]
|
2 |
+
pre-commit = "cargo test && cargo fmt -- --check && cargo clippy && stylelint ./public/static/themes/*.css ./public/static/colorschemes/*.css ./public/static/*.js"
|
3 |
+
|
4 |
+
[logging]
|
5 |
+
verbose = true
|
.stylelintrc.json
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"extends": "stylelint-config-standard",
|
3 |
+
"rules": {
|
4 |
+
"alpha-value-notation": "number",
|
5 |
+
"selector-class-pattern": null
|
6 |
+
},
|
7 |
+
"overrides": [
|
8 |
+
{
|
9 |
+
"files": ["*.js"],
|
10 |
+
"customSyntax": "postcss-lit"
|
11 |
+
}
|
12 |
+
]
|
13 |
+
}
|
CONTRIBUTING.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
## Documentation/Wiki
|
4 |
|
5 |
-
Found a typo, or something that isn't as clear as it could be? Maybe I've missed something off altogether, or you hit a roadblock that took you a while to figure out. Edit the [
|
6 |
|
7 |
## Readme
|
8 |
|
@@ -48,23 +48,7 @@ We have a [Discord](https://discord.gg/SWnda7Mw5u) channel, feel free to join an
|
|
48 |
|
49 |
# Where To Contribute?
|
50 |
|
51 |
-
|
52 |
-
|
53 |
-
The _rolling branch_ is where we intend all source code contributions should go.
|
54 |
-
|
55 |
-
## For Readme Contributions
|
56 |
-
|
57 |
-
The _master branch_ is where we intend all source code contributions should go.
|
58 |
-
|
59 |
-
# How To Fork
|
60 |
-
|
61 |
-
![image](./images/fork_button.png)
|
62 |
-
|
63 |
-
![image](./images/fork_options_page.png)
|
64 |
-
|
65 |
-
Please make sure to leave the `Copy the master branch only` option ticked off.
|
66 |
-
|
67 |
-
![image](./images/create_fork_button.png)
|
68 |
|
69 |
|
70 |
We appreciate any contributions whether be of any size or topic and suggestions to help improve the Websurfx project. Please keep in mind the above requirements and guidelines before submitting a pull request and also if you have any doubts/concerns/questions about the project, its source code or anything related to the project than feel free to ask by opening an [issue](https://github.com/neon-mmd/websurfx/issues) or by asking us on our [Discord](https://discord.gg/SWnda7Mw5u) channel.
|
|
|
2 |
|
3 |
## Documentation/Wiki
|
4 |
|
5 |
+
Found a typo, or something that isn't as clear as it could be? Maybe I've missed something off altogether, or you hit a roadblock that took you a while to figure out. Edit the [docs](./docs/) to add to or improve the documentation. This will help future users get Websurfx up and running more easily.
|
6 |
|
7 |
## Readme
|
8 |
|
|
|
48 |
|
49 |
# Where To Contribute?
|
50 |
|
51 |
+
The _rolling branch_ is where we intend all contributions should go.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
|
53 |
|
54 |
We appreciate any contributions whether be of any size or topic and suggestions to help improve the Websurfx project. Please keep in mind the above requirements and guidelines before submitting a pull request and also if you have any doubts/concerns/questions about the project, its source code or anything related to the project than feel free to ask by opening an [issue](https://github.com/neon-mmd/websurfx/issues) or by asking us on our [Discord](https://discord.gg/SWnda7Mw5u) channel.
|
Cargo.lock
CHANGED
@@ -4,19 +4,19 @@ version = 3
|
|
4 |
|
5 |
[[package]]
|
6 |
name = "actix-codec"
|
7 |
-
version = "0.5.
|
8 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
9 |
-
checksum = "
|
10 |
dependencies = [
|
11 |
"bitflags",
|
12 |
"bytes 1.4.0",
|
13 |
"futures-core",
|
14 |
"futures-sink",
|
15 |
-
"log",
|
16 |
"memchr",
|
17 |
"pin-project-lite",
|
18 |
-
"tokio 1.28.
|
19 |
"tokio-util",
|
|
|
20 |
]
|
21 |
|
22 |
[[package]]
|
@@ -53,7 +53,7 @@ dependencies = [
|
|
53 |
"actix-service",
|
54 |
"actix-utils",
|
55 |
"ahash 0.8.3",
|
56 |
-
"base64 0.21.
|
57 |
"bitflags",
|
58 |
"brotli",
|
59 |
"bytes 1.4.0",
|
@@ -62,7 +62,7 @@ dependencies = [
|
|
62 |
"encoding_rs",
|
63 |
"flate2",
|
64 |
"futures-core",
|
65 |
-
"h2 0.3.
|
66 |
"http 0.2.9",
|
67 |
"httparse",
|
68 |
"httpdate",
|
@@ -75,7 +75,7 @@ dependencies = [
|
|
75 |
"rand 0.8.5",
|
76 |
"sha1",
|
77 |
"smallvec 1.10.0",
|
78 |
-
"tokio 1.28.
|
79 |
"tokio-util",
|
80 |
"tracing",
|
81 |
"zstd",
|
@@ -87,7 +87,7 @@ version = "0.2.3"
|
|
87 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
88 |
checksum = "465a6172cf69b960917811022d8f29bc0b7fa1398bc4f78b3c466673db1213b6"
|
89 |
dependencies = [
|
90 |
-
"quote 1.0.
|
91 |
"syn 1.0.109",
|
92 |
]
|
93 |
|
@@ -111,7 +111,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
111 |
checksum = "15265b6b8e2347670eb363c47fc8c75208b4a4994b27192f345fcbe707804f3e"
|
112 |
dependencies = [
|
113 |
"futures-core",
|
114 |
-
"tokio 1.28.
|
115 |
]
|
116 |
|
117 |
[[package]]
|
@@ -125,10 +125,10 @@ dependencies = [
|
|
125 |
"actix-utils",
|
126 |
"futures-core",
|
127 |
"futures-util",
|
128 |
-
"mio 0.8.
|
129 |
"num_cpus",
|
130 |
"socket2",
|
131 |
-
"tokio 1.28.
|
132 |
"tracing",
|
133 |
]
|
134 |
|
@@ -201,8 +201,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
201 |
checksum = "2262160a7ae29e3415554a3f1fc04c764b1540c116aa524683208078b7a75bc9"
|
202 |
dependencies = [
|
203 |
"actix-router",
|
204 |
-
"proc-macro2 1.0.
|
205 |
-
"quote 1.0.
|
206 |
"syn 1.0.109",
|
207 |
]
|
208 |
|
@@ -315,9 +315,9 @@ dependencies = [
|
|
315 |
|
316 |
[[package]]
|
317 |
name = "base64"
|
318 |
-
version = "0.21.
|
319 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
320 |
-
checksum = "
|
321 |
|
322 |
[[package]]
|
323 |
name = "bit-set"
|
@@ -381,9 +381,9 @@ dependencies = [
|
|
381 |
|
382 |
[[package]]
|
383 |
name = "bumpalo"
|
384 |
-
version = "3.
|
385 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
386 |
-
checksum = "
|
387 |
|
388 |
[[package]]
|
389 |
name = "byteorder"
|
@@ -438,6 +438,15 @@ version = "1.0.0"
|
|
438 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
439 |
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
440 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
441 |
[[package]]
|
442 |
name = "cloudabi"
|
443 |
version = "0.0.3"
|
@@ -605,8 +614,8 @@ dependencies = [
|
|
605 |
"itoa 1.0.6",
|
606 |
"matches",
|
607 |
"phf 0.10.1",
|
608 |
-
"proc-macro2 1.0.
|
609 |
-
"quote 1.0.
|
610 |
"smallvec 1.10.0",
|
611 |
"syn 1.0.109",
|
612 |
]
|
@@ -617,7 +626,7 @@ version = "0.6.0"
|
|
617 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
618 |
checksum = "dfae75de57f2b2e85e8768c3ea840fd159c8f33e2b6522c7835b7abac81be16e"
|
619 |
dependencies = [
|
620 |
-
"quote 1.0.
|
621 |
"syn 1.0.109",
|
622 |
]
|
623 |
|
@@ -628,17 +637,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
628 |
checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321"
|
629 |
dependencies = [
|
630 |
"convert_case",
|
631 |
-
"proc-macro2 1.0.
|
632 |
-
"quote 1.0.
|
633 |
"rustc_version 0.4.0",
|
634 |
"syn 1.0.109",
|
635 |
]
|
636 |
|
637 |
[[package]]
|
638 |
name = "digest"
|
639 |
-
version = "0.10.
|
640 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
641 |
-
checksum = "
|
642 |
dependencies = [
|
643 |
"block-buffer",
|
644 |
"crypto-common",
|
@@ -693,6 +702,16 @@ dependencies = [
|
|
693 |
"termcolor",
|
694 |
]
|
695 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
696 |
[[package]]
|
697 |
name = "errno"
|
698 |
version = "0.3.1"
|
@@ -730,8 +749,8 @@ version = "0.1.8"
|
|
730 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
731 |
checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4"
|
732 |
dependencies = [
|
733 |
-
"proc-macro2 1.0.
|
734 |
-
"quote 1.0.
|
735 |
"syn 1.0.109",
|
736 |
"synstructure",
|
737 |
]
|
@@ -796,6 +815,12 @@ dependencies = [
|
|
796 |
"percent-encoding 2.2.0",
|
797 |
]
|
798 |
|
|
|
|
|
|
|
|
|
|
|
|
|
799 |
[[package]]
|
800 |
name = "fuchsia-cprng"
|
801 |
version = "0.1.1"
|
@@ -959,9 +984,9 @@ dependencies = [
|
|
959 |
|
960 |
[[package]]
|
961 |
name = "h2"
|
962 |
-
version = "0.3.
|
963 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
964 |
-
checksum = "
|
965 |
dependencies = [
|
966 |
"bytes 1.4.0",
|
967 |
"fnv",
|
@@ -971,16 +996,16 @@ dependencies = [
|
|
971 |
"http 0.2.9",
|
972 |
"indexmap",
|
973 |
"slab",
|
974 |
-
"tokio 1.28.
|
975 |
"tokio-util",
|
976 |
"tracing",
|
977 |
]
|
978 |
|
979 |
[[package]]
|
980 |
name = "handlebars"
|
981 |
-
version = "4.3.
|
982 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
983 |
-
checksum = "
|
984 |
dependencies = [
|
985 |
"log",
|
986 |
"pest",
|
@@ -1035,8 +1060,8 @@ dependencies = [
|
|
1035 |
"log",
|
1036 |
"mac",
|
1037 |
"markup5ever 0.11.0",
|
1038 |
-
"proc-macro2 1.0.
|
1039 |
-
"quote 1.0.
|
1040 |
"syn 1.0.109",
|
1041 |
]
|
1042 |
|
@@ -1149,7 +1174,7 @@ dependencies = [
|
|
1149 |
"futures-channel",
|
1150 |
"futures-core",
|
1151 |
"futures-util",
|
1152 |
-
"h2 0.3.
|
1153 |
"http 0.2.9",
|
1154 |
"http-body 0.4.5",
|
1155 |
"httparse",
|
@@ -1157,7 +1182,7 @@ dependencies = [
|
|
1157 |
"itoa 1.0.6",
|
1158 |
"pin-project-lite",
|
1159 |
"socket2",
|
1160 |
-
"tokio 1.28.
|
1161 |
"tower-service",
|
1162 |
"tracing",
|
1163 |
"want 0.3.0",
|
@@ -1185,7 +1210,7 @@ dependencies = [
|
|
1185 |
"bytes 1.4.0",
|
1186 |
"hyper 0.14.26",
|
1187 |
"native-tls",
|
1188 |
-
"tokio 1.28.
|
1189 |
"tokio-native-tls",
|
1190 |
]
|
1191 |
|
@@ -1242,9 +1267,9 @@ dependencies = [
|
|
1242 |
|
1243 |
[[package]]
|
1244 |
name = "io-lifetimes"
|
1245 |
-
version = "1.0.
|
1246 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1247 |
-
checksum = "
|
1248 |
dependencies = [
|
1249 |
"hermit-abi 0.3.1",
|
1250 |
"libc",
|
@@ -1301,9 +1326,9 @@ dependencies = [
|
|
1301 |
|
1302 |
[[package]]
|
1303 |
name = "js-sys"
|
1304 |
-
version = "0.3.
|
1305 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1306 |
-
checksum = "
|
1307 |
dependencies = [
|
1308 |
"wasm-bindgen",
|
1309 |
]
|
@@ -1338,9 +1363,9 @@ checksum = "2b00cc1c228a6782d0f076e7b232802e0c5689d41bb5df366f2a6b6621cfdfe1"
|
|
1338 |
|
1339 |
[[package]]
|
1340 |
name = "linux-raw-sys"
|
1341 |
-
version = "0.3.
|
1342 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1343 |
-
checksum = "
|
1344 |
|
1345 |
[[package]]
|
1346 |
name = "local-channel"
|
@@ -1381,12 +1406,9 @@ dependencies = [
|
|
1381 |
|
1382 |
[[package]]
|
1383 |
name = "log"
|
1384 |
-
version = "0.4.
|
1385 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1386 |
-
checksum = "
|
1387 |
-
dependencies = [
|
1388 |
-
"cfg-if 1.0.0",
|
1389 |
-
]
|
1390 |
|
1391 |
[[package]]
|
1392 |
name = "mac"
|
@@ -1513,14 +1535,14 @@ dependencies = [
|
|
1513 |
|
1514 |
[[package]]
|
1515 |
name = "mio"
|
1516 |
-
version = "0.8.
|
1517 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1518 |
-
checksum = "
|
1519 |
dependencies = [
|
1520 |
"libc",
|
1521 |
"log",
|
1522 |
"wasi 0.11.0+wasi-snapshot-preview1",
|
1523 |
-
"windows-sys 0.
|
1524 |
]
|
1525 |
|
1526 |
[[package]]
|
@@ -1570,6 +1592,12 @@ version = "1.0.4"
|
|
1570 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1571 |
checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54"
|
1572 |
|
|
|
|
|
|
|
|
|
|
|
|
|
1573 |
[[package]]
|
1574 |
name = "nodrop"
|
1575 |
version = "0.1.14"
|
@@ -1606,15 +1634,15 @@ dependencies = [
|
|
1606 |
|
1607 |
[[package]]
|
1608 |
name = "once_cell"
|
1609 |
-
version = "1.17.
|
1610 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1611 |
-
checksum = "
|
1612 |
|
1613 |
[[package]]
|
1614 |
name = "openssl"
|
1615 |
-
version = "0.10.
|
1616 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1617 |
-
checksum = "
|
1618 |
dependencies = [
|
1619 |
"bitflags",
|
1620 |
"cfg-if 1.0.0",
|
@@ -1631,9 +1659,9 @@ version = "0.1.1"
|
|
1631 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1632 |
checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c"
|
1633 |
dependencies = [
|
1634 |
-
"proc-macro2 1.0.
|
1635 |
-
"quote 1.0.
|
1636 |
-
"syn 2.0.
|
1637 |
]
|
1638 |
|
1639 |
[[package]]
|
@@ -1644,9 +1672,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf"
|
|
1644 |
|
1645 |
[[package]]
|
1646 |
name = "openssl-sys"
|
1647 |
-
version = "0.9.
|
1648 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1649 |
-
checksum = "
|
1650 |
dependencies = [
|
1651 |
"cc",
|
1652 |
"libc",
|
@@ -1749,9 +1777,9 @@ checksum = "6c435bf1076437b851ebc8edc3a18442796b30f1728ffea6262d59bbe28b077e"
|
|
1749 |
dependencies = [
|
1750 |
"pest",
|
1751 |
"pest_meta",
|
1752 |
-
"proc-macro2 1.0.
|
1753 |
-
"quote 1.0.
|
1754 |
-
"syn 2.0.
|
1755 |
]
|
1756 |
|
1757 |
[[package]]
|
@@ -1863,8 +1891,8 @@ dependencies = [
|
|
1863 |
"phf_generator 0.10.0",
|
1864 |
"phf_shared 0.10.0",
|
1865 |
"proc-macro-hack",
|
1866 |
-
"proc-macro2 1.0.
|
1867 |
-
"quote 1.0.
|
1868 |
"syn 1.0.109",
|
1869 |
]
|
1870 |
|
@@ -1942,9 +1970,9 @@ dependencies = [
|
|
1942 |
|
1943 |
[[package]]
|
1944 |
name = "proc-macro2"
|
1945 |
-
version = "1.0.
|
1946 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1947 |
-
checksum = "
|
1948 |
dependencies = [
|
1949 |
"unicode-ident",
|
1950 |
]
|
@@ -1970,11 +1998,11 @@ dependencies = [
|
|
1970 |
|
1971 |
[[package]]
|
1972 |
name = "quote"
|
1973 |
-
version = "1.0.
|
1974 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1975 |
-
checksum = "
|
1976 |
dependencies = [
|
1977 |
-
"proc-macro2 1.0.
|
1978 |
]
|
1979 |
|
1980 |
[[package]]
|
@@ -2213,9 +2241,9 @@ dependencies = [
|
|
2213 |
|
2214 |
[[package]]
|
2215 |
name = "regex"
|
2216 |
-
version = "1.8.
|
2217 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2218 |
-
checksum = "
|
2219 |
dependencies = [
|
2220 |
"aho-corasick",
|
2221 |
"memchr",
|
@@ -2224,9 +2252,9 @@ dependencies = [
|
|
2224 |
|
2225 |
[[package]]
|
2226 |
name = "regex-syntax"
|
2227 |
-
version = "0.7.
|
2228 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2229 |
-
checksum = "
|
2230 |
|
2231 |
[[package]]
|
2232 |
name = "reqwest"
|
@@ -2264,16 +2292,16 @@ dependencies = [
|
|
2264 |
|
2265 |
[[package]]
|
2266 |
name = "reqwest"
|
2267 |
-
version = "0.11.
|
2268 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2269 |
-
checksum = "
|
2270 |
dependencies = [
|
2271 |
-
"base64 0.21.
|
2272 |
"bytes 1.4.0",
|
2273 |
"encoding_rs",
|
2274 |
"futures-core",
|
2275 |
"futures-util",
|
2276 |
-
"h2 0.3.
|
2277 |
"http 0.2.9",
|
2278 |
"http-body 0.4.5",
|
2279 |
"hyper 0.14.26",
|
@@ -2289,7 +2317,7 @@ dependencies = [
|
|
2289 |
"serde",
|
2290 |
"serde_json",
|
2291 |
"serde_urlencoded 0.7.1",
|
2292 |
-
"tokio 1.28.
|
2293 |
"tokio-native-tls",
|
2294 |
"tower-service",
|
2295 |
"url 2.3.1",
|
@@ -2361,6 +2389,18 @@ dependencies = [
|
|
2361 |
"windows-sys 0.48.0",
|
2362 |
]
|
2363 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2364 |
[[package]]
|
2365 |
name = "ryu"
|
2366 |
version = "1.0.13"
|
@@ -2410,9 +2450,9 @@ dependencies = [
|
|
2410 |
|
2411 |
[[package]]
|
2412 |
name = "security-framework"
|
2413 |
-
version = "2.
|
2414 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2415 |
-
checksum = "
|
2416 |
dependencies = [
|
2417 |
"bitflags",
|
2418 |
"core-foundation",
|
@@ -2423,9 +2463,9 @@ dependencies = [
|
|
2423 |
|
2424 |
[[package]]
|
2425 |
name = "security-framework-sys"
|
2426 |
-
version = "2.
|
2427 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2428 |
-
checksum = "
|
2429 |
dependencies = [
|
2430 |
"core-foundation-sys",
|
2431 |
"libc",
|
@@ -2482,22 +2522,22 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"
|
|
2482 |
|
2483 |
[[package]]
|
2484 |
name = "serde"
|
2485 |
-
version = "1.0.
|
2486 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2487 |
-
checksum = "
|
2488 |
dependencies = [
|
2489 |
"serde_derive",
|
2490 |
]
|
2491 |
|
2492 |
[[package]]
|
2493 |
name = "serde_derive"
|
2494 |
-
version = "1.0.
|
2495 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2496 |
-
checksum = "
|
2497 |
dependencies = [
|
2498 |
-
"proc-macro2 1.0.
|
2499 |
-
"quote 1.0.
|
2500 |
-
"syn 2.0.
|
2501 |
]
|
2502 |
|
2503 |
[[package]]
|
@@ -2680,8 +2720,8 @@ checksum = "f0f45ed1b65bf9a4bf2f7b7dc59212d1926e9eaf00fa998988e420fd124467c6"
|
|
2680 |
dependencies = [
|
2681 |
"phf_generator 0.7.24",
|
2682 |
"phf_shared 0.7.24",
|
2683 |
-
"proc-macro2 1.0.
|
2684 |
-
"quote 1.0.
|
2685 |
"string_cache_shared",
|
2686 |
]
|
2687 |
|
@@ -2693,8 +2733,8 @@ checksum = "6bb30289b722be4ff74a408c3cc27edeaad656e06cb1fe8fa9231fa59c728988"
|
|
2693 |
dependencies = [
|
2694 |
"phf_generator 0.10.0",
|
2695 |
"phf_shared 0.10.0",
|
2696 |
-
"proc-macro2 1.0.
|
2697 |
-
"quote 1.0.
|
2698 |
]
|
2699 |
|
2700 |
[[package]]
|
@@ -2720,19 +2760,19 @@ version = "1.0.109"
|
|
2720 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2721 |
checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
|
2722 |
dependencies = [
|
2723 |
-
"proc-macro2 1.0.
|
2724 |
-
"quote 1.0.
|
2725 |
"unicode-ident",
|
2726 |
]
|
2727 |
|
2728 |
[[package]]
|
2729 |
name = "syn"
|
2730 |
-
version = "2.0.
|
2731 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2732 |
-
checksum = "
|
2733 |
dependencies = [
|
2734 |
-
"proc-macro2 1.0.
|
2735 |
-
"quote 1.0.
|
2736 |
"unicode-ident",
|
2737 |
]
|
2738 |
|
@@ -2742,8 +2782,8 @@ version = "0.12.6"
|
|
2742 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2743 |
checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f"
|
2744 |
dependencies = [
|
2745 |
-
"proc-macro2 1.0.
|
2746 |
-
"quote 1.0.
|
2747 |
"syn 1.0.109",
|
2748 |
"unicode-xid 0.2.4",
|
2749 |
]
|
@@ -2796,9 +2836,9 @@ version = "1.0.40"
|
|
2796 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2797 |
checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f"
|
2798 |
dependencies = [
|
2799 |
-
"proc-macro2 1.0.
|
2800 |
-
"quote 1.0.
|
2801 |
-
"syn 2.0.
|
2802 |
]
|
2803 |
|
2804 |
[[package]]
|
@@ -2875,14 +2915,14 @@ dependencies = [
|
|
2875 |
|
2876 |
[[package]]
|
2877 |
name = "tokio"
|
2878 |
-
version = "1.28.
|
2879 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2880 |
-
checksum = "
|
2881 |
dependencies = [
|
2882 |
"autocfg 1.1.0",
|
2883 |
"bytes 1.4.0",
|
2884 |
"libc",
|
2885 |
-
"mio 0.8.
|
2886 |
"num_cpus",
|
2887 |
"parking_lot 0.12.1",
|
2888 |
"pin-project-lite",
|
@@ -2940,9 +2980,9 @@ version = "2.1.0"
|
|
2940 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2941 |
checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e"
|
2942 |
dependencies = [
|
2943 |
-
"proc-macro2 1.0.
|
2944 |
-
"quote 1.0.
|
2945 |
-
"syn 2.0.
|
2946 |
]
|
2947 |
|
2948 |
[[package]]
|
@@ -2952,7 +2992,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2952 |
checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2"
|
2953 |
dependencies = [
|
2954 |
"native-tls",
|
2955 |
-
"tokio 1.28.
|
2956 |
]
|
2957 |
|
2958 |
[[package]]
|
@@ -3037,10 +3077,19 @@ dependencies = [
|
|
3037 |
"futures-core",
|
3038 |
"futures-sink",
|
3039 |
"pin-project-lite",
|
3040 |
-
"tokio 1.28.
|
3041 |
"tracing",
|
3042 |
]
|
3043 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3044 |
[[package]]
|
3045 |
name = "tower-service"
|
3046 |
version = "0.3.2"
|
@@ -3061,9 +3110,9 @@ dependencies = [
|
|
3061 |
|
3062 |
[[package]]
|
3063 |
name = "tracing-core"
|
3064 |
-
version = "0.1.
|
3065 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
3066 |
-
checksum = "
|
3067 |
dependencies = [
|
3068 |
"once_cell",
|
3069 |
]
|
@@ -3112,9 +3161,9 @@ checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460"
|
|
3112 |
|
3113 |
[[package]]
|
3114 |
name = "unicode-ident"
|
3115 |
-
version = "1.0.
|
3116 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
3117 |
-
checksum = "
|
3118 |
|
3119 |
[[package]]
|
3120 |
name = "unicode-normalization"
|
@@ -3243,9 +3292,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
|
|
3243 |
|
3244 |
[[package]]
|
3245 |
name = "wasm-bindgen"
|
3246 |
-
version = "0.2.
|
3247 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
3248 |
-
checksum = "
|
3249 |
dependencies = [
|
3250 |
"cfg-if 1.0.0",
|
3251 |
"wasm-bindgen-macro",
|
@@ -3253,24 +3302,24 @@ dependencies = [
|
|
3253 |
|
3254 |
[[package]]
|
3255 |
name = "wasm-bindgen-backend"
|
3256 |
-
version = "0.2.
|
3257 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
3258 |
-
checksum = "
|
3259 |
dependencies = [
|
3260 |
"bumpalo",
|
3261 |
"log",
|
3262 |
"once_cell",
|
3263 |
-
"proc-macro2 1.0.
|
3264 |
-
"quote 1.0.
|
3265 |
-
"syn 2.0.
|
3266 |
"wasm-bindgen-shared",
|
3267 |
]
|
3268 |
|
3269 |
[[package]]
|
3270 |
name = "wasm-bindgen-futures"
|
3271 |
-
version = "0.4.
|
3272 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
3273 |
-
checksum = "
|
3274 |
dependencies = [
|
3275 |
"cfg-if 1.0.0",
|
3276 |
"js-sys",
|
@@ -3280,38 +3329,38 @@ dependencies = [
|
|
3280 |
|
3281 |
[[package]]
|
3282 |
name = "wasm-bindgen-macro"
|
3283 |
-
version = "0.2.
|
3284 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
3285 |
-
checksum = "
|
3286 |
dependencies = [
|
3287 |
-
"quote 1.0.
|
3288 |
"wasm-bindgen-macro-support",
|
3289 |
]
|
3290 |
|
3291 |
[[package]]
|
3292 |
name = "wasm-bindgen-macro-support"
|
3293 |
-
version = "0.2.
|
3294 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
3295 |
-
checksum = "
|
3296 |
dependencies = [
|
3297 |
-
"proc-macro2 1.0.
|
3298 |
-
"quote 1.0.
|
3299 |
-
"syn 2.0.
|
3300 |
"wasm-bindgen-backend",
|
3301 |
"wasm-bindgen-shared",
|
3302 |
]
|
3303 |
|
3304 |
[[package]]
|
3305 |
name = "wasm-bindgen-shared"
|
3306 |
-
version = "0.2.
|
3307 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
3308 |
-
checksum = "
|
3309 |
|
3310 |
[[package]]
|
3311 |
name = "web-sys"
|
3312 |
-
version = "0.3.
|
3313 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
3314 |
-
checksum = "
|
3315 |
dependencies = [
|
3316 |
"js-sys",
|
3317 |
"wasm-bindgen",
|
@@ -3319,7 +3368,7 @@ dependencies = [
|
|
3319 |
|
3320 |
[[package]]
|
3321 |
name = "websurfx"
|
3322 |
-
version = "0.
|
3323 |
dependencies = [
|
3324 |
"actix-files",
|
3325 |
"actix-web",
|
@@ -3328,14 +3377,16 @@ dependencies = [
|
|
3328 |
"handlebars",
|
3329 |
"log",
|
3330 |
"md5",
|
|
|
3331 |
"rand 0.8.5",
|
3332 |
"redis",
|
3333 |
-
"reqwest 0.11.
|
3334 |
"rlua",
|
|
|
3335 |
"scraper",
|
3336 |
"serde",
|
3337 |
"serde_json",
|
3338 |
-
"tokio 1.28.
|
3339 |
]
|
3340 |
|
3341 |
[[package]]
|
|
|
4 |
|
5 |
[[package]]
|
6 |
name = "actix-codec"
|
7 |
+
version = "0.5.1"
|
8 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
9 |
+
checksum = "617a8268e3537fe1d8c9ead925fca49ef6400927ee7bc26750e90ecee14ce4b8"
|
10 |
dependencies = [
|
11 |
"bitflags",
|
12 |
"bytes 1.4.0",
|
13 |
"futures-core",
|
14 |
"futures-sink",
|
|
|
15 |
"memchr",
|
16 |
"pin-project-lite",
|
17 |
+
"tokio 1.28.2",
|
18 |
"tokio-util",
|
19 |
+
"tracing",
|
20 |
]
|
21 |
|
22 |
[[package]]
|
|
|
53 |
"actix-service",
|
54 |
"actix-utils",
|
55 |
"ahash 0.8.3",
|
56 |
+
"base64 0.21.2",
|
57 |
"bitflags",
|
58 |
"brotli",
|
59 |
"bytes 1.4.0",
|
|
|
62 |
"encoding_rs",
|
63 |
"flate2",
|
64 |
"futures-core",
|
65 |
+
"h2 0.3.19",
|
66 |
"http 0.2.9",
|
67 |
"httparse",
|
68 |
"httpdate",
|
|
|
75 |
"rand 0.8.5",
|
76 |
"sha1",
|
77 |
"smallvec 1.10.0",
|
78 |
+
"tokio 1.28.2",
|
79 |
"tokio-util",
|
80 |
"tracing",
|
81 |
"zstd",
|
|
|
87 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
88 |
checksum = "465a6172cf69b960917811022d8f29bc0b7fa1398bc4f78b3c466673db1213b6"
|
89 |
dependencies = [
|
90 |
+
"quote 1.0.28",
|
91 |
"syn 1.0.109",
|
92 |
]
|
93 |
|
|
|
111 |
checksum = "15265b6b8e2347670eb363c47fc8c75208b4a4994b27192f345fcbe707804f3e"
|
112 |
dependencies = [
|
113 |
"futures-core",
|
114 |
+
"tokio 1.28.2",
|
115 |
]
|
116 |
|
117 |
[[package]]
|
|
|
125 |
"actix-utils",
|
126 |
"futures-core",
|
127 |
"futures-util",
|
128 |
+
"mio 0.8.8",
|
129 |
"num_cpus",
|
130 |
"socket2",
|
131 |
+
"tokio 1.28.2",
|
132 |
"tracing",
|
133 |
]
|
134 |
|
|
|
201 |
checksum = "2262160a7ae29e3415554a3f1fc04c764b1540c116aa524683208078b7a75bc9"
|
202 |
dependencies = [
|
203 |
"actix-router",
|
204 |
+
"proc-macro2 1.0.59",
|
205 |
+
"quote 1.0.28",
|
206 |
"syn 1.0.109",
|
207 |
]
|
208 |
|
|
|
315 |
|
316 |
[[package]]
|
317 |
name = "base64"
|
318 |
+
version = "0.21.2"
|
319 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
320 |
+
checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d"
|
321 |
|
322 |
[[package]]
|
323 |
name = "bit-set"
|
|
|
381 |
|
382 |
[[package]]
|
383 |
name = "bumpalo"
|
384 |
+
version = "3.13.0"
|
385 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
386 |
+
checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1"
|
387 |
|
388 |
[[package]]
|
389 |
name = "byteorder"
|
|
|
438 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
439 |
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
440 |
|
441 |
+
[[package]]
|
442 |
+
name = "ci_info"
|
443 |
+
version = "0.10.2"
|
444 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
445 |
+
checksum = "24f638c70e8c5753795cc9a8c07c44da91554a09e4cf11a7326e8161b0a3c45e"
|
446 |
+
dependencies = [
|
447 |
+
"envmnt",
|
448 |
+
]
|
449 |
+
|
450 |
[[package]]
|
451 |
name = "cloudabi"
|
452 |
version = "0.0.3"
|
|
|
614 |
"itoa 1.0.6",
|
615 |
"matches",
|
616 |
"phf 0.10.1",
|
617 |
+
"proc-macro2 1.0.59",
|
618 |
+
"quote 1.0.28",
|
619 |
"smallvec 1.10.0",
|
620 |
"syn 1.0.109",
|
621 |
]
|
|
|
626 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
627 |
checksum = "dfae75de57f2b2e85e8768c3ea840fd159c8f33e2b6522c7835b7abac81be16e"
|
628 |
dependencies = [
|
629 |
+
"quote 1.0.28",
|
630 |
"syn 1.0.109",
|
631 |
]
|
632 |
|
|
|
637 |
checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321"
|
638 |
dependencies = [
|
639 |
"convert_case",
|
640 |
+
"proc-macro2 1.0.59",
|
641 |
+
"quote 1.0.28",
|
642 |
"rustc_version 0.4.0",
|
643 |
"syn 1.0.109",
|
644 |
]
|
645 |
|
646 |
[[package]]
|
647 |
name = "digest"
|
648 |
+
version = "0.10.7"
|
649 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
650 |
+
checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
|
651 |
dependencies = [
|
652 |
"block-buffer",
|
653 |
"crypto-common",
|
|
|
702 |
"termcolor",
|
703 |
]
|
704 |
|
705 |
+
[[package]]
|
706 |
+
name = "envmnt"
|
707 |
+
version = "0.8.4"
|
708 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
709 |
+
checksum = "a2d328fc287c61314c4a61af7cfdcbd7e678e39778488c7cb13ec133ce0f4059"
|
710 |
+
dependencies = [
|
711 |
+
"fsio",
|
712 |
+
"indexmap",
|
713 |
+
]
|
714 |
+
|
715 |
[[package]]
|
716 |
name = "errno"
|
717 |
version = "0.3.1"
|
|
|
749 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
750 |
checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4"
|
751 |
dependencies = [
|
752 |
+
"proc-macro2 1.0.59",
|
753 |
+
"quote 1.0.28",
|
754 |
"syn 1.0.109",
|
755 |
"synstructure",
|
756 |
]
|
|
|
815 |
"percent-encoding 2.2.0",
|
816 |
]
|
817 |
|
818 |
+
[[package]]
|
819 |
+
name = "fsio"
|
820 |
+
version = "0.1.3"
|
821 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
822 |
+
checksum = "c1fd087255f739f4f1aeea69f11b72f8080e9c2e7645cd06955dad4a178a49e3"
|
823 |
+
|
824 |
[[package]]
|
825 |
name = "fuchsia-cprng"
|
826 |
version = "0.1.1"
|
|
|
984 |
|
985 |
[[package]]
|
986 |
name = "h2"
|
987 |
+
version = "0.3.19"
|
988 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
989 |
+
checksum = "d357c7ae988e7d2182f7d7871d0b963962420b0678b0997ce7de72001aeab782"
|
990 |
dependencies = [
|
991 |
"bytes 1.4.0",
|
992 |
"fnv",
|
|
|
996 |
"http 0.2.9",
|
997 |
"indexmap",
|
998 |
"slab",
|
999 |
+
"tokio 1.28.2",
|
1000 |
"tokio-util",
|
1001 |
"tracing",
|
1002 |
]
|
1003 |
|
1004 |
[[package]]
|
1005 |
name = "handlebars"
|
1006 |
+
version = "4.3.7"
|
1007 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1008 |
+
checksum = "83c3372087601b532857d332f5957cbae686da52bb7810bf038c3e3c3cc2fa0d"
|
1009 |
dependencies = [
|
1010 |
"log",
|
1011 |
"pest",
|
|
|
1060 |
"log",
|
1061 |
"mac",
|
1062 |
"markup5ever 0.11.0",
|
1063 |
+
"proc-macro2 1.0.59",
|
1064 |
+
"quote 1.0.28",
|
1065 |
"syn 1.0.109",
|
1066 |
]
|
1067 |
|
|
|
1174 |
"futures-channel",
|
1175 |
"futures-core",
|
1176 |
"futures-util",
|
1177 |
+
"h2 0.3.19",
|
1178 |
"http 0.2.9",
|
1179 |
"http-body 0.4.5",
|
1180 |
"httparse",
|
|
|
1182 |
"itoa 1.0.6",
|
1183 |
"pin-project-lite",
|
1184 |
"socket2",
|
1185 |
+
"tokio 1.28.2",
|
1186 |
"tower-service",
|
1187 |
"tracing",
|
1188 |
"want 0.3.0",
|
|
|
1210 |
"bytes 1.4.0",
|
1211 |
"hyper 0.14.26",
|
1212 |
"native-tls",
|
1213 |
+
"tokio 1.28.2",
|
1214 |
"tokio-native-tls",
|
1215 |
]
|
1216 |
|
|
|
1267 |
|
1268 |
[[package]]
|
1269 |
name = "io-lifetimes"
|
1270 |
+
version = "1.0.11"
|
1271 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1272 |
+
checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2"
|
1273 |
dependencies = [
|
1274 |
"hermit-abi 0.3.1",
|
1275 |
"libc",
|
|
|
1326 |
|
1327 |
[[package]]
|
1328 |
name = "js-sys"
|
1329 |
+
version = "0.3.63"
|
1330 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1331 |
+
checksum = "2f37a4a5928311ac501dee68b3c7613a1037d0edb30c8e5427bd832d55d1b790"
|
1332 |
dependencies = [
|
1333 |
"wasm-bindgen",
|
1334 |
]
|
|
|
1363 |
|
1364 |
[[package]]
|
1365 |
name = "linux-raw-sys"
|
1366 |
+
version = "0.3.8"
|
1367 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1368 |
+
checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519"
|
1369 |
|
1370 |
[[package]]
|
1371 |
name = "local-channel"
|
|
|
1406 |
|
1407 |
[[package]]
|
1408 |
name = "log"
|
1409 |
+
version = "0.4.18"
|
1410 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1411 |
+
checksum = "518ef76f2f87365916b142844c16d8fefd85039bc5699050210a7778ee1cd1de"
|
|
|
|
|
|
|
1412 |
|
1413 |
[[package]]
|
1414 |
name = "mac"
|
|
|
1535 |
|
1536 |
[[package]]
|
1537 |
name = "mio"
|
1538 |
+
version = "0.8.8"
|
1539 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1540 |
+
checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2"
|
1541 |
dependencies = [
|
1542 |
"libc",
|
1543 |
"log",
|
1544 |
"wasi 0.11.0+wasi-snapshot-preview1",
|
1545 |
+
"windows-sys 0.48.0",
|
1546 |
]
|
1547 |
|
1548 |
[[package]]
|
|
|
1592 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1593 |
checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54"
|
1594 |
|
1595 |
+
[[package]]
|
1596 |
+
name = "nias"
|
1597 |
+
version = "0.5.0"
|
1598 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1599 |
+
checksum = "ab250442c86f1850815b5d268639dff018c0627022bc1940eb2d642ca1ce12f0"
|
1600 |
+
|
1601 |
[[package]]
|
1602 |
name = "nodrop"
|
1603 |
version = "0.1.14"
|
|
|
1634 |
|
1635 |
[[package]]
|
1636 |
name = "once_cell"
|
1637 |
+
version = "1.17.2"
|
1638 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1639 |
+
checksum = "9670a07f94779e00908f3e686eab508878ebb390ba6e604d3a284c00e8d0487b"
|
1640 |
|
1641 |
[[package]]
|
1642 |
name = "openssl"
|
1643 |
+
version = "0.10.53"
|
1644 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1645 |
+
checksum = "12df40a956736488b7b44fe79fe12d4f245bb5b3f5a1f6095e499760015be392"
|
1646 |
dependencies = [
|
1647 |
"bitflags",
|
1648 |
"cfg-if 1.0.0",
|
|
|
1659 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1660 |
checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c"
|
1661 |
dependencies = [
|
1662 |
+
"proc-macro2 1.0.59",
|
1663 |
+
"quote 1.0.28",
|
1664 |
+
"syn 2.0.18",
|
1665 |
]
|
1666 |
|
1667 |
[[package]]
|
|
|
1672 |
|
1673 |
[[package]]
|
1674 |
name = "openssl-sys"
|
1675 |
+
version = "0.9.88"
|
1676 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1677 |
+
checksum = "c2ce0f250f34a308dcfdbb351f511359857d4ed2134ba715a4eadd46e1ffd617"
|
1678 |
dependencies = [
|
1679 |
"cc",
|
1680 |
"libc",
|
|
|
1777 |
dependencies = [
|
1778 |
"pest",
|
1779 |
"pest_meta",
|
1780 |
+
"proc-macro2 1.0.59",
|
1781 |
+
"quote 1.0.28",
|
1782 |
+
"syn 2.0.18",
|
1783 |
]
|
1784 |
|
1785 |
[[package]]
|
|
|
1891 |
"phf_generator 0.10.0",
|
1892 |
"phf_shared 0.10.0",
|
1893 |
"proc-macro-hack",
|
1894 |
+
"proc-macro2 1.0.59",
|
1895 |
+
"quote 1.0.28",
|
1896 |
"syn 1.0.109",
|
1897 |
]
|
1898 |
|
|
|
1970 |
|
1971 |
[[package]]
|
1972 |
name = "proc-macro2"
|
1973 |
+
version = "1.0.59"
|
1974 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1975 |
+
checksum = "6aeca18b86b413c660b781aa319e4e2648a3e6f9eadc9b47e9038e6fe9f3451b"
|
1976 |
dependencies = [
|
1977 |
"unicode-ident",
|
1978 |
]
|
|
|
1998 |
|
1999 |
[[package]]
|
2000 |
name = "quote"
|
2001 |
+
version = "1.0.28"
|
2002 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2003 |
+
checksum = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488"
|
2004 |
dependencies = [
|
2005 |
+
"proc-macro2 1.0.59",
|
2006 |
]
|
2007 |
|
2008 |
[[package]]
|
|
|
2241 |
|
2242 |
[[package]]
|
2243 |
name = "regex"
|
2244 |
+
version = "1.8.3"
|
2245 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2246 |
+
checksum = "81ca098a9821bd52d6b24fd8b10bd081f47d39c22778cafaa75a2857a62c6390"
|
2247 |
dependencies = [
|
2248 |
"aho-corasick",
|
2249 |
"memchr",
|
|
|
2252 |
|
2253 |
[[package]]
|
2254 |
name = "regex-syntax"
|
2255 |
+
version = "0.7.2"
|
2256 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2257 |
+
checksum = "436b050e76ed2903236f032a59761c1eb99e1b0aead2c257922771dab1fc8c78"
|
2258 |
|
2259 |
[[package]]
|
2260 |
name = "reqwest"
|
|
|
2292 |
|
2293 |
[[package]]
|
2294 |
name = "reqwest"
|
2295 |
+
version = "0.11.18"
|
2296 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2297 |
+
checksum = "cde824a14b7c14f85caff81225f411faacc04a2013f41670f41443742b1c1c55"
|
2298 |
dependencies = [
|
2299 |
+
"base64 0.21.2",
|
2300 |
"bytes 1.4.0",
|
2301 |
"encoding_rs",
|
2302 |
"futures-core",
|
2303 |
"futures-util",
|
2304 |
+
"h2 0.3.19",
|
2305 |
"http 0.2.9",
|
2306 |
"http-body 0.4.5",
|
2307 |
"hyper 0.14.26",
|
|
|
2317 |
"serde",
|
2318 |
"serde_json",
|
2319 |
"serde_urlencoded 0.7.1",
|
2320 |
+
"tokio 1.28.2",
|
2321 |
"tokio-native-tls",
|
2322 |
"tower-service",
|
2323 |
"url 2.3.1",
|
|
|
2389 |
"windows-sys 0.48.0",
|
2390 |
]
|
2391 |
|
2392 |
+
[[package]]
|
2393 |
+
name = "rusty-hook"
|
2394 |
+
version = "0.11.2"
|
2395 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2396 |
+
checksum = "96cee9be61be7e1cbadd851e58ed7449c29c620f00b23df937cb9cbc04ac21a3"
|
2397 |
+
dependencies = [
|
2398 |
+
"ci_info",
|
2399 |
+
"getopts",
|
2400 |
+
"nias",
|
2401 |
+
"toml",
|
2402 |
+
]
|
2403 |
+
|
2404 |
[[package]]
|
2405 |
name = "ryu"
|
2406 |
version = "1.0.13"
|
|
|
2450 |
|
2451 |
[[package]]
|
2452 |
name = "security-framework"
|
2453 |
+
version = "2.9.1"
|
2454 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2455 |
+
checksum = "1fc758eb7bffce5b308734e9b0c1468893cae9ff70ebf13e7090be8dcbcc83a8"
|
2456 |
dependencies = [
|
2457 |
"bitflags",
|
2458 |
"core-foundation",
|
|
|
2463 |
|
2464 |
[[package]]
|
2465 |
name = "security-framework-sys"
|
2466 |
+
version = "2.9.0"
|
2467 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2468 |
+
checksum = "f51d0c0d83bec45f16480d0ce0058397a69e48fcdc52d1dc8855fb68acbd31a7"
|
2469 |
dependencies = [
|
2470 |
"core-foundation-sys",
|
2471 |
"libc",
|
|
|
2522 |
|
2523 |
[[package]]
|
2524 |
name = "serde"
|
2525 |
+
version = "1.0.163"
|
2526 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2527 |
+
checksum = "2113ab51b87a539ae008b5c6c02dc020ffa39afd2d83cffcb3f4eb2722cebec2"
|
2528 |
dependencies = [
|
2529 |
"serde_derive",
|
2530 |
]
|
2531 |
|
2532 |
[[package]]
|
2533 |
name = "serde_derive"
|
2534 |
+
version = "1.0.163"
|
2535 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2536 |
+
checksum = "8c805777e3930c8883389c602315a24224bcc738b63905ef87cd1420353ea93e"
|
2537 |
dependencies = [
|
2538 |
+
"proc-macro2 1.0.59",
|
2539 |
+
"quote 1.0.28",
|
2540 |
+
"syn 2.0.18",
|
2541 |
]
|
2542 |
|
2543 |
[[package]]
|
|
|
2720 |
dependencies = [
|
2721 |
"phf_generator 0.7.24",
|
2722 |
"phf_shared 0.7.24",
|
2723 |
+
"proc-macro2 1.0.59",
|
2724 |
+
"quote 1.0.28",
|
2725 |
"string_cache_shared",
|
2726 |
]
|
2727 |
|
|
|
2733 |
dependencies = [
|
2734 |
"phf_generator 0.10.0",
|
2735 |
"phf_shared 0.10.0",
|
2736 |
+
"proc-macro2 1.0.59",
|
2737 |
+
"quote 1.0.28",
|
2738 |
]
|
2739 |
|
2740 |
[[package]]
|
|
|
2760 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2761 |
checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
|
2762 |
dependencies = [
|
2763 |
+
"proc-macro2 1.0.59",
|
2764 |
+
"quote 1.0.28",
|
2765 |
"unicode-ident",
|
2766 |
]
|
2767 |
|
2768 |
[[package]]
|
2769 |
name = "syn"
|
2770 |
+
version = "2.0.18"
|
2771 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2772 |
+
checksum = "32d41677bcbe24c20c52e7c70b0d8db04134c5d1066bf98662e2871ad200ea3e"
|
2773 |
dependencies = [
|
2774 |
+
"proc-macro2 1.0.59",
|
2775 |
+
"quote 1.0.28",
|
2776 |
"unicode-ident",
|
2777 |
]
|
2778 |
|
|
|
2782 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2783 |
checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f"
|
2784 |
dependencies = [
|
2785 |
+
"proc-macro2 1.0.59",
|
2786 |
+
"quote 1.0.28",
|
2787 |
"syn 1.0.109",
|
2788 |
"unicode-xid 0.2.4",
|
2789 |
]
|
|
|
2836 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2837 |
checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f"
|
2838 |
dependencies = [
|
2839 |
+
"proc-macro2 1.0.59",
|
2840 |
+
"quote 1.0.28",
|
2841 |
+
"syn 2.0.18",
|
2842 |
]
|
2843 |
|
2844 |
[[package]]
|
|
|
2915 |
|
2916 |
[[package]]
|
2917 |
name = "tokio"
|
2918 |
+
version = "1.28.2"
|
2919 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2920 |
+
checksum = "94d7b1cfd2aa4011f2de74c2c4c63665e27a71006b0a192dcd2710272e73dfa2"
|
2921 |
dependencies = [
|
2922 |
"autocfg 1.1.0",
|
2923 |
"bytes 1.4.0",
|
2924 |
"libc",
|
2925 |
+
"mio 0.8.8",
|
2926 |
"num_cpus",
|
2927 |
"parking_lot 0.12.1",
|
2928 |
"pin-project-lite",
|
|
|
2980 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2981 |
checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e"
|
2982 |
dependencies = [
|
2983 |
+
"proc-macro2 1.0.59",
|
2984 |
+
"quote 1.0.28",
|
2985 |
+
"syn 2.0.18",
|
2986 |
]
|
2987 |
|
2988 |
[[package]]
|
|
|
2992 |
checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2"
|
2993 |
dependencies = [
|
2994 |
"native-tls",
|
2995 |
+
"tokio 1.28.2",
|
2996 |
]
|
2997 |
|
2998 |
[[package]]
|
|
|
3077 |
"futures-core",
|
3078 |
"futures-sink",
|
3079 |
"pin-project-lite",
|
3080 |
+
"tokio 1.28.2",
|
3081 |
"tracing",
|
3082 |
]
|
3083 |
|
3084 |
+
[[package]]
|
3085 |
+
name = "toml"
|
3086 |
+
version = "0.5.11"
|
3087 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
3088 |
+
checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234"
|
3089 |
+
dependencies = [
|
3090 |
+
"serde",
|
3091 |
+
]
|
3092 |
+
|
3093 |
[[package]]
|
3094 |
name = "tower-service"
|
3095 |
version = "0.3.2"
|
|
|
3110 |
|
3111 |
[[package]]
|
3112 |
name = "tracing-core"
|
3113 |
+
version = "0.1.31"
|
3114 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
3115 |
+
checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a"
|
3116 |
dependencies = [
|
3117 |
"once_cell",
|
3118 |
]
|
|
|
3161 |
|
3162 |
[[package]]
|
3163 |
name = "unicode-ident"
|
3164 |
+
version = "1.0.9"
|
3165 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
3166 |
+
checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0"
|
3167 |
|
3168 |
[[package]]
|
3169 |
name = "unicode-normalization"
|
|
|
3292 |
|
3293 |
[[package]]
|
3294 |
name = "wasm-bindgen"
|
3295 |
+
version = "0.2.86"
|
3296 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
3297 |
+
checksum = "5bba0e8cb82ba49ff4e229459ff22a191bbe9a1cb3a341610c9c33efc27ddf73"
|
3298 |
dependencies = [
|
3299 |
"cfg-if 1.0.0",
|
3300 |
"wasm-bindgen-macro",
|
|
|
3302 |
|
3303 |
[[package]]
|
3304 |
name = "wasm-bindgen-backend"
|
3305 |
+
version = "0.2.86"
|
3306 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
3307 |
+
checksum = "19b04bc93f9d6bdee709f6bd2118f57dd6679cf1176a1af464fca3ab0d66d8fb"
|
3308 |
dependencies = [
|
3309 |
"bumpalo",
|
3310 |
"log",
|
3311 |
"once_cell",
|
3312 |
+
"proc-macro2 1.0.59",
|
3313 |
+
"quote 1.0.28",
|
3314 |
+
"syn 2.0.18",
|
3315 |
"wasm-bindgen-shared",
|
3316 |
]
|
3317 |
|
3318 |
[[package]]
|
3319 |
name = "wasm-bindgen-futures"
|
3320 |
+
version = "0.4.36"
|
3321 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
3322 |
+
checksum = "2d1985d03709c53167ce907ff394f5316aa22cb4e12761295c5dc57dacb6297e"
|
3323 |
dependencies = [
|
3324 |
"cfg-if 1.0.0",
|
3325 |
"js-sys",
|
|
|
3329 |
|
3330 |
[[package]]
|
3331 |
name = "wasm-bindgen-macro"
|
3332 |
+
version = "0.2.86"
|
3333 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
3334 |
+
checksum = "14d6b024f1a526bb0234f52840389927257beb670610081360e5a03c5df9c258"
|
3335 |
dependencies = [
|
3336 |
+
"quote 1.0.28",
|
3337 |
"wasm-bindgen-macro-support",
|
3338 |
]
|
3339 |
|
3340 |
[[package]]
|
3341 |
name = "wasm-bindgen-macro-support"
|
3342 |
+
version = "0.2.86"
|
3343 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
3344 |
+
checksum = "e128beba882dd1eb6200e1dc92ae6c5dbaa4311aa7bb211ca035779e5efc39f8"
|
3345 |
dependencies = [
|
3346 |
+
"proc-macro2 1.0.59",
|
3347 |
+
"quote 1.0.28",
|
3348 |
+
"syn 2.0.18",
|
3349 |
"wasm-bindgen-backend",
|
3350 |
"wasm-bindgen-shared",
|
3351 |
]
|
3352 |
|
3353 |
[[package]]
|
3354 |
name = "wasm-bindgen-shared"
|
3355 |
+
version = "0.2.86"
|
3356 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
3357 |
+
checksum = "ed9d5b4305409d1fc9482fee2d7f9bcbf24b3972bf59817ef757e23982242a93"
|
3358 |
|
3359 |
[[package]]
|
3360 |
name = "web-sys"
|
3361 |
+
version = "0.3.63"
|
3362 |
source = "registry+https://github.com/rust-lang/crates.io-index"
|
3363 |
+
checksum = "3bdd9ef4e984da1187bf8110c5cf5b845fbc87a23602cdf912386a76fcd3a7c2"
|
3364 |
dependencies = [
|
3365 |
"js-sys",
|
3366 |
"wasm-bindgen",
|
|
|
3368 |
|
3369 |
[[package]]
|
3370 |
name = "websurfx"
|
3371 |
+
version = "0.12.0"
|
3372 |
dependencies = [
|
3373 |
"actix-files",
|
3374 |
"actix-web",
|
|
|
3377 |
"handlebars",
|
3378 |
"log",
|
3379 |
"md5",
|
3380 |
+
"once_cell",
|
3381 |
"rand 0.8.5",
|
3382 |
"redis",
|
3383 |
+
"reqwest 0.11.18",
|
3384 |
"rlua",
|
3385 |
+
"rusty-hook",
|
3386 |
"scraper",
|
3387 |
"serde",
|
3388 |
"serde_json",
|
3389 |
+
"tokio 1.28.2",
|
3390 |
]
|
3391 |
|
3392 |
[[package]]
|
Cargo.toml
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
[package]
|
2 |
name = "websurfx"
|
3 |
-
version = "0.
|
4 |
edition = "2021"
|
5 |
|
6 |
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
@@ -21,3 +21,7 @@ rlua = {version="*"}
|
|
21 |
redis = {version="*"}
|
22 |
md5 = {version="*"}
|
23 |
rand={version="*"}
|
|
|
|
|
|
|
|
|
|
1 |
[package]
|
2 |
name = "websurfx"
|
3 |
+
version = "0.12.0"
|
4 |
edition = "2021"
|
5 |
|
6 |
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
|
|
21 |
redis = {version="*"}
|
22 |
md5 = {version="*"}
|
23 |
rand={version="*"}
|
24 |
+
once_cell = {version="*"}
|
25 |
+
|
26 |
+
[dev-dependencies]
|
27 |
+
rusty-hook = "^0.11.2"
|
README.md
CHANGED
@@ -5,68 +5,26 @@
|
|
5 |
<b align="center"><a href="README.md">Readme</a></b> |
|
6 |
<b><a href="https://discord.gg/SWnda7Mw5u">Discord</a></b> |
|
7 |
<b><a href="https://github.com/neon-mmd/websurfx">GitHub</a></b> |
|
8 |
-
<b><a href="
|
9 |
<br /><br />
|
10 |
-
<a href="./LICENSE">
|
11 |
-
<img
|
12 |
-
alt="GitHub"
|
13 |
-
src="https://img.shields.io/github/license/neon-mmd/websurfx?style=flat-square"
|
14 |
-
/>
|
15 |
-
</a>
|
16 |
-
<a href="https://github.com/neon-mmd/websurfx/stargazers">
|
17 |
-
<img
|
18 |
-
alt="GitHub Repo stars"
|
19 |
-
src="https://img.shields.io/github/stars/neon-mmd/websurfx?style=flat-square"
|
20 |
-
/>
|
21 |
-
</a>
|
22 |
-
<a href="https://github.com/neon-mmd/websurfx/forks">
|
23 |
-
<img
|
24 |
-
alt="GitHub forks"
|
25 |
-
src="https://img.shields.io/github/forks/neon-mmd/websurfx?style=flat-square"
|
26 |
-
/>
|
27 |
-
</a>
|
28 |
<a href="#">
|
29 |
<img
|
30 |
alt="GitHub code size in bytes"
|
31 |
src="https://img.shields.io/github/languages/code-size/neon-mmd/websurfx?style=flat-square"
|
32 |
/>
|
33 |
</a>
|
34 |
-
<a href="https://github.com/neon-mmd/websurfx/issues">
|
35 |
-
<img
|
36 |
-
alt="GitHub issues"
|
37 |
-
src="https://img.shields.io/github/issues/neon-mmd/websurfx?style=flat-square"
|
38 |
-
/>
|
39 |
-
</a>
|
40 |
-
<a href="https://github.com/neon-mmd/websurfx/pulls">
|
41 |
-
<img
|
42 |
-
alt="GitHub pull requests"
|
43 |
-
src="https://img.shields.io/github/issues-pr/neon-mmd/websurfx?style=flat-square"
|
44 |
-
/>
|
45 |
-
</a>
|
46 |
<a href="https://github.com/neon-mmd/websurfx/actions">
|
47 |
<img
|
48 |
alt="GitHub Workflow Status"
|
49 |
src="https://img.shields.io/github/actions/workflow/status/neon-mmd/websurfx/rust.yml?style=flat-square"
|
50 |
/>
|
51 |
</a>
|
52 |
-
<a href="">
|
53 |
-
<img
|
54 |
-
alt="GitHub release (latest by date including pre-releases)"
|
55 |
-
src="https://img.shields.io/github/v/release/neon-mmd/websurfx?include_prereleases"
|
56 |
-
/>
|
57 |
-
</a>
|
58 |
<a href=""
|
59 |
><img
|
60 |
alt="Maintenance"
|
61 |
src="https://img.shields.io/maintenance/yes/2023?style=flat-square"
|
62 |
/>
|
63 |
</a>
|
64 |
-
<a href="">
|
65 |
-
<img
|
66 |
-
alt="GitHub contributors"
|
67 |
-
src="https://img.shields.io/github/contributors-anon/neon-mmd/websurfx?style=flat-square"
|
68 |
-
/>
|
69 |
-
</a>
|
70 |
<a href="https://gitpod.io/#https://github.com/neon-mmd/websurfx">
|
71 |
<img
|
72 |
alt="Gitpod"
|
@@ -126,7 +84,7 @@
|
|
126 |
|
127 |
<img align="center" src="./images/404_error_page.png" />
|
128 |
|
129 |
-
**[⬆️ Back to Top](
|
130 |
|
131 |
# Features 🚀
|
132 |
|
@@ -136,20 +94,23 @@
|
|
136 |
- 💨 Ad-free and clean results
|
137 |
- 🌟 and lots more...
|
138 |
|
139 |
-
**[⬆️ Back to Top](
|
140 |
|
141 |
# Installation and Testing 🛠️
|
142 |
|
143 |
-
> For full setup instructions, see: [**Installation**](
|
|
|
|
|
144 |
|
145 |
-
To get started with Websurfx, clone the repository, edit the config file, which is located in the `websurfx
|
146 |
|
147 |
``` shell
|
148 |
git clone https://github.com/neon-mmd/websurfx.git
|
149 |
cd websurfx
|
150 |
-
|
|
|
151 |
redis-server --port 8082 &
|
152 |
-
./target/
|
153 |
```
|
154 |
|
155 |
Once you have started the server, open your preferred web browser and navigate to <http://127.0.0.1:8080> to start using Websurfx.
|
@@ -157,42 +118,42 @@ Once you have started the server, open your preferred web browser and navigate t
|
|
157 |
> **Warning**
|
158 |
> Please be aware that the project is still in the testing phase and is not ready for production use.
|
159 |
|
160 |
-
**[⬆️ Back to Top](
|
161 |
|
162 |
# Configuration 🔧
|
163 |
|
164 |
-
> For full configuration instructions, see: [**Configuration**](
|
165 |
|
166 |
Websurfx is configured through the config.lua file, located at `websurfx/config.lua`.
|
167 |
|
168 |
-
**[⬆️ Back to Top](
|
169 |
|
170 |
# Theming 🎨
|
171 |
|
172 |
-
> For full theming and customization instructions, see: [**Theming**](
|
173 |
|
174 |
Websurfx comes with several themes and color schemes by default, which you can apply and edit through the config file. Supports custom themes and color schemes using CSS, allowing you to develop your own unique-looking website.
|
175 |
|
176 |
-
**[⬆️ Back to Top](
|
177 |
|
178 |
# Multi-Language Support 🌍
|
179 |
|
180 |
> **Note**
|
181 |
> Currently, we do not support other languages, but in the future, we will start accepting contributions regarding language support because we believe that language should not be a barrier to entry.
|
182 |
|
183 |
-
**[⬆️ Back to Top](
|
184 |
|
185 |
# System Requirements 📊
|
186 |
|
187 |
At present, we only support x86_64 architecture systems, but we would love to have contributions that extend to other architectures as well.
|
188 |
|
189 |
-
**[⬆️ Back to Top](
|
190 |
|
191 |
# FAQ (Frequently Asked Questions) 🗨️
|
192 |
|
193 |
## Why Websurfx?
|
194 |
|
195 |
-
The primary purpose of the Websurfx project is to create a fast, secure, and privacy-focused
|
196 |
|
197 |
## Why AGPLv3?
|
198 |
|
@@ -202,13 +163,13 @@ Websurfx is distributed under the **AGPLv3** license to keep the source code ope
|
|
202 |
|
203 |
Rust was chosen as the programming language for Websurfx because of its memory safety features, which can help prevent vulnerabilities and make the codebase more secure. Rust is also faster than C++, which contributes to Websurfx's speed and responsiveness. Furthermore, the Rust ownership and borrowing system enables secure concurrency and thread safety in the program.
|
204 |
|
205 |
-
**[⬆️ Back to Top](
|
206 |
|
207 |
# More Contributers Wanted 📣
|
208 |
|
209 |
We are looking for more willing contributors to help grow this project. For more information on how you can contribute, check out the [project board](https://github.com/neon-mmd/websurfx/projects?query=is%3Aopen) and the [CONTRIBUTING.md](CONTRIBUTING.md) file for guidelines and rules for making contributions.
|
210 |
|
211 |
-
**[⬆️ Back to Top](
|
212 |
|
213 |
# Supporting Websurfx 💖
|
214 |
|
@@ -224,20 +185,20 @@ Several areas that we need a bit of help with at the moment are:
|
|
224 |
- Submit a PR to add a new feature, fix a bug, update the docs, add a theme, widget, or something else.
|
225 |
- Star Websurfx on GitHub.
|
226 |
|
227 |
-
**[⬆️ Back to Top](
|
228 |
|
229 |
# Documentation 📘
|
230 |
|
231 |
> **Note**
|
232 |
-
> We welcome any contributions to the [documentation](
|
233 |
|
234 |
-
**[⬆️ Back to Top](
|
235 |
|
236 |
# Roadmap 🛣️
|
237 |
|
238 |
> Coming soon!! 🙂.
|
239 |
|
240 |
-
**[⬆️ Back to Top](
|
241 |
|
242 |
# Contributing 🙋
|
243 |
|
@@ -251,13 +212,13 @@ Check out this [video](https://youtu.be/FccdqCucVSI) by Mr. Nick on how to contr
|
|
251 |
|
252 |
If you are a developer, have a look at the [CONTRIBUTING.org](CONTRIBUTING.md) document for more information.
|
253 |
|
254 |
-
**[⬆️ Back to Top](
|
255 |
|
256 |
# License 📜
|
257 |
|
258 |
Websurfx is licensed under the [AGPLv3](LICENSE) license.
|
259 |
|
260 |
-
**[⬆️ Back to Top](
|
261 |
|
262 |
# Credits 🤝
|
263 |
|
@@ -271,7 +232,7 @@ We would like to thank the following people for their contributions and support:
|
|
271 |
<br />
|
272 |
</p>
|
273 |
|
274 |
-
**[⬆️ Back to Top](
|
275 |
|
276 |
---
|
277 |
|
|
|
5 |
<b align="center"><a href="README.md">Readme</a></b> |
|
6 |
<b><a href="https://discord.gg/SWnda7Mw5u">Discord</a></b> |
|
7 |
<b><a href="https://github.com/neon-mmd/websurfx">GitHub</a></b> |
|
8 |
+
<b><a href="./docs/README.md">Documentation</a></b>
|
9 |
<br /><br />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
<a href="#">
|
11 |
<img
|
12 |
alt="GitHub code size in bytes"
|
13 |
src="https://img.shields.io/github/languages/code-size/neon-mmd/websurfx?style=flat-square"
|
14 |
/>
|
15 |
</a>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
<a href="https://github.com/neon-mmd/websurfx/actions">
|
17 |
<img
|
18 |
alt="GitHub Workflow Status"
|
19 |
src="https://img.shields.io/github/actions/workflow/status/neon-mmd/websurfx/rust.yml?style=flat-square"
|
20 |
/>
|
21 |
</a>
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
<a href=""
|
23 |
><img
|
24 |
alt="Maintenance"
|
25 |
src="https://img.shields.io/maintenance/yes/2023?style=flat-square"
|
26 |
/>
|
27 |
</a>
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
<a href="https://gitpod.io/#https://github.com/neon-mmd/websurfx">
|
29 |
<img
|
30 |
alt="Gitpod"
|
|
|
84 |
|
85 |
<img align="center" src="./images/404_error_page.png" />
|
86 |
|
87 |
+
**[⬆️ Back to Top](#--)**
|
88 |
|
89 |
# Features 🚀
|
90 |
|
|
|
94 |
- 💨 Ad-free and clean results
|
95 |
- 🌟 and lots more...
|
96 |
|
97 |
+
**[⬆️ Back to Top](#--)**
|
98 |
|
99 |
# Installation and Testing 🛠️
|
100 |
|
101 |
+
> For full setup instructions, see: [**Installation**](./docs/installation.md)
|
102 |
+
|
103 |
+
Before you can start building `websurfx`, you will need to have `Cargo` installed on your system. You can find the installation instructions [here](https://doc.rust-lang.org/cargo/getting-started/installation.html).
|
104 |
|
105 |
+
To get started with Websurfx, clone the repository, edit the config file, which is located in the `websurfx/` directory, and install the Redis server by following the instructions located [here](https://redis.io/docs/getting-started/) and then run the websurfx server and redis server using the following commands:
|
106 |
|
107 |
``` shell
|
108 |
git clone https://github.com/neon-mmd/websurfx.git
|
109 |
cd websurfx
|
110 |
+
git checkout stable
|
111 |
+
cargo build -r
|
112 |
redis-server --port 8082 &
|
113 |
+
./target/release/websurfx
|
114 |
```
|
115 |
|
116 |
Once you have started the server, open your preferred web browser and navigate to <http://127.0.0.1:8080> to start using Websurfx.
|
|
|
118 |
> **Warning**
|
119 |
> Please be aware that the project is still in the testing phase and is not ready for production use.
|
120 |
|
121 |
+
**[⬆️ Back to Top](#--)**
|
122 |
|
123 |
# Configuration 🔧
|
124 |
|
125 |
+
> For full configuration instructions, see: [**Configuration**](./docs/configuration.md)
|
126 |
|
127 |
Websurfx is configured through the config.lua file, located at `websurfx/config.lua`.
|
128 |
|
129 |
+
**[⬆️ Back to Top](#--)**
|
130 |
|
131 |
# Theming 🎨
|
132 |
|
133 |
+
> For full theming and customization instructions, see: [**Theming**](./docs/theming.md)
|
134 |
|
135 |
Websurfx comes with several themes and color schemes by default, which you can apply and edit through the config file. Supports custom themes and color schemes using CSS, allowing you to develop your own unique-looking website.
|
136 |
|
137 |
+
**[⬆️ Back to Top](#--)**
|
138 |
|
139 |
# Multi-Language Support 🌍
|
140 |
|
141 |
> **Note**
|
142 |
> Currently, we do not support other languages, but in the future, we will start accepting contributions regarding language support because we believe that language should not be a barrier to entry.
|
143 |
|
144 |
+
**[⬆️ Back to Top](#--)**
|
145 |
|
146 |
# System Requirements 📊
|
147 |
|
148 |
At present, we only support x86_64 architecture systems, but we would love to have contributions that extend to other architectures as well.
|
149 |
|
150 |
+
**[⬆️ Back to Top](#--)**
|
151 |
|
152 |
# FAQ (Frequently Asked Questions) 🗨️
|
153 |
|
154 |
## Why Websurfx?
|
155 |
|
156 |
+
The primary purpose of the Websurfx project is to create a fast, secure, and privacy-focused meta-search engine. While there are numerous meta-search engines available, not all of them guarantee the security of their search engine, which is critical for maintaining privacy. Memory flaws, for example, can expose private or sensitive information, which is never a good thing. Also, there is the added problem of Spam, ads, and unorganic results which most engines don't have the full-proof answer to it till now but with Websurfx I finally put a full stop to this problem, also, Rust is used to write Websurfx, which ensures memory safety and removes such issues. Many meta-search engines also lack important features like advanced picture search, which is required by many graphic designers, content providers, and others. Websurfx attempts to improve the user experience by providing these and other features, such as proper NSFW blocking and Micro-apps or Quick results (like providing a calculator, currency exchanges, etc in the search results).
|
157 |
|
158 |
## Why AGPLv3?
|
159 |
|
|
|
163 |
|
164 |
Rust was chosen as the programming language for Websurfx because of its memory safety features, which can help prevent vulnerabilities and make the codebase more secure. Rust is also faster than C++, which contributes to Websurfx's speed and responsiveness. Furthermore, the Rust ownership and borrowing system enables secure concurrency and thread safety in the program.
|
165 |
|
166 |
+
**[⬆️ Back to Top](#--)**
|
167 |
|
168 |
# More Contributers Wanted 📣
|
169 |
|
170 |
We are looking for more willing contributors to help grow this project. For more information on how you can contribute, check out the [project board](https://github.com/neon-mmd/websurfx/projects?query=is%3Aopen) and the [CONTRIBUTING.md](CONTRIBUTING.md) file for guidelines and rules for making contributions.
|
171 |
|
172 |
+
**[⬆️ Back to Top](#--)**
|
173 |
|
174 |
# Supporting Websurfx 💖
|
175 |
|
|
|
185 |
- Submit a PR to add a new feature, fix a bug, update the docs, add a theme, widget, or something else.
|
186 |
- Star Websurfx on GitHub.
|
187 |
|
188 |
+
**[⬆️ Back to Top](#--)**
|
189 |
|
190 |
# Documentation 📘
|
191 |
|
192 |
> **Note**
|
193 |
+
> We welcome any contributions to the [documentation](./docs/) as this will benefit everyone who uses this project.
|
194 |
|
195 |
+
**[⬆️ Back to Top](#--)**
|
196 |
|
197 |
# Roadmap 🛣️
|
198 |
|
199 |
> Coming soon!! 🙂.
|
200 |
|
201 |
+
**[⬆️ Back to Top](#--)**
|
202 |
|
203 |
# Contributing 🙋
|
204 |
|
|
|
212 |
|
213 |
If you are a developer, have a look at the [CONTRIBUTING.org](CONTRIBUTING.md) document for more information.
|
214 |
|
215 |
+
**[⬆️ Back to Top](#--)**
|
216 |
|
217 |
# License 📜
|
218 |
|
219 |
Websurfx is licensed under the [AGPLv3](LICENSE) license.
|
220 |
|
221 |
+
**[⬆️ Back to Top](#--)**
|
222 |
|
223 |
# Credits 🤝
|
224 |
|
|
|
232 |
<br />
|
233 |
</p>
|
234 |
|
235 |
+
**[⬆️ Back to Top](#--)**
|
236 |
|
237 |
---
|
238 |
|
docs/configuration.md
CHANGED
@@ -1,17 +1,33 @@
|
|
1 |
# Configuration
|
2 |
|
3 |
-
|
4 |
|
5 |
-
|
6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
- Server
|
8 |
- Website
|
9 |
- Cache
|
10 |
|
|
|
|
|
|
|
|
|
|
|
11 |
## Server
|
12 |
|
13 |
- **port:** Port number on which server should be launched.
|
14 |
- **binding_ip_addr:** IP address on the which server should be launched.
|
|
|
15 |
|
16 |
## Website
|
17 |
|
@@ -39,4 +55,4 @@ Some of the configuration options provided in the file are stated below. These a
|
|
39 |
|
40 |
- **redis_connection_url:** Redis connection url address on which the client should connect on.
|
41 |
|
42 |
-
[⬅️ Go back to Home](
|
|
|
1 |
# Configuration
|
2 |
|
3 |
+
## Installed From Source
|
4 |
|
5 |
+
If you have built `websurfx` from source then the configuration file will be located under project directory (codebase) at `websurfx/`
|
6 |
|
7 |
+
> **Note**
|
8 |
+
> If you have built websurfx with unstable/rolling/edge branch then you can copy the configuration file from `websurfx/config.lua` located under project directory (codebase) to `~/.config/websurfx/` and make the changes there and rerun the websurfx server. _This is only available from unstable/rolling/edge version_.
|
9 |
+
|
10 |
+
## Installed From Package
|
11 |
+
|
12 |
+
If you have installed `websurfx` using the package manager of your Linux distro then the default configuration file will be located at `/etc/xdg/websurfx/`. You can copy the default config to `~/.config/websurfx/` and make the changes there and rerun the websurfx server.
|
13 |
+
|
14 |
+
Some of the configuration options provided in the file are stated below. These are subdivided into the following categories:
|
15 |
+
|
16 |
+
- General
|
17 |
- Server
|
18 |
- Website
|
19 |
- Cache
|
20 |
|
21 |
+
# General
|
22 |
+
|
23 |
+
- **logging:** An option to enable or disable logs.
|
24 |
+
- **debug:** An option to enable or disable debug mode.
|
25 |
+
|
26 |
## Server
|
27 |
|
28 |
- **port:** Port number on which server should be launched.
|
29 |
- **binding_ip_addr:** IP address on the which server should be launched.
|
30 |
+
- **production_use:** 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). If production_use is set to true. 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. This is newly added option and hence is only available in the **edge version**.
|
31 |
|
32 |
## Website
|
33 |
|
|
|
55 |
|
56 |
- **redis_connection_url:** Redis connection url address on which the client should connect on.
|
57 |
|
58 |
+
[⬅️ Go back to Home](./README.md)
|
docs/faq.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
## Why Websurfx?
|
4 |
|
5 |
-
The
|
6 |
|
7 |
## Why AGPLv3?
|
8 |
|
@@ -12,4 +12,4 @@ Websurfx is released under the AGPLv3 license to ensure that the source code rem
|
|
12 |
|
13 |
Rust was chosen as the programming language for Websurfx due to its memory safety features, which can help prevent vulnerabilities and make the codebase more secure. Rust is also faster than C++, which helps to make Websurfx fast and responsive. In addition, Rust's ownership and borrowing system allows for safe concurrency and thread safety in the codebase.
|
14 |
|
15 |
-
[⬅️ Go back to Home](
|
|
|
2 |
|
3 |
## Why Websurfx?
|
4 |
|
5 |
+
The primary purpose of the Websurfx project is to create a fast, secure, and privacy-focused [meta-search engine](https://en.wikipedia.org/wiki/Metasearch_engine). While there are numerous meta-search engines available, not all of them guarantee the security of their search engine, which is critical for maintaining privacy. Memory flaws, for example, can expose private or sensitive information, which is never a good thing. Also, there is the added problem of Spam, ads, and unorganic results which most engines don't have the full-proof answer to it till now but with Websurfx I finally put a full stop to this problem, also, Rust is used to write Websurfx, which ensures memory safety and removes such issues. Many meta-search engines also lack important features like advanced picture search, which is required by many graphic designers, content providers, and others. Websurfx attempts to improve the user experience by providing these and other features, such as proper NSFW blocking and Micro-apps or Quick results (like providing a calculator, currency exchanges, etc in the search results).
|
6 |
|
7 |
## Why AGPLv3?
|
8 |
|
|
|
12 |
|
13 |
Rust was chosen as the programming language for Websurfx due to its memory safety features, which can help prevent vulnerabilities and make the codebase more secure. Rust is also faster than C++, which helps to make Websurfx fast and responsive. In addition, Rust's ownership and borrowing system allows for safe concurrency and thread safety in the codebase.
|
14 |
|
15 |
+
[⬅️ Go back to Home](./README.md)
|
docs/installation.md
CHANGED
@@ -1,35 +1,70 @@
|
|
1 |
-
#
|
2 |
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
|
5 |
```shell
|
6 |
git clone https://github.com/neon-mmd/websurfx.git
|
7 |
cd websurfx
|
8 |
-
|
|
|
9 |
redis-server --port 8082 &
|
10 |
-
./target/
|
11 |
```
|
12 |
|
13 |
-
|
|
|
|
|
|
|
|
|
14 |
|
15 |
If you want to use the rolling/edge branch, run the following commands instead:
|
16 |
|
17 |
```shell
|
18 |
git clone https://github.com/neon-mmd/websurfx.git
|
19 |
cd websurfx
|
20 |
-
|
21 |
-
cargo build
|
22 |
redis-server --port 8082 &
|
23 |
-
./target/
|
24 |
```
|
25 |
|
26 |
Once you have started the server, open your preferred web browser and navigate to http://127.0.0.1:8080/ to start using Websurfx.
|
27 |
|
|
|
|
|
28 |
# Docker Deployment
|
29 |
|
30 |
Before you start, you will need [Docker](https://docs.docker.com/get-docker/) installed on your system first.
|
31 |
|
32 |
-
##
|
33 |
|
34 |
First clone the the repository by running the following command:
|
35 |
|
@@ -41,11 +76,18 @@ cd websurfx
|
|
41 |
After that edit the config.lua file located under `websurfx` directory. In the config file you will specifically need to change to values which is `binding_ip_addr` and `redis_connection_url` which should make the config look something like this:
|
42 |
|
43 |
```lua
|
44 |
-
--
|
|
|
|
|
|
|
|
|
45 |
port = "8080" -- port on which server should be launched
|
46 |
binding_ip_addr = "0.0.0.0" --ip address on the which server should be launched.
|
|
|
|
|
|
|
47 |
|
48 |
-
-- Website
|
49 |
-- The different colorschemes provided are:
|
50 |
-- {{
|
51 |
-- catppuccin-mocha
|
@@ -60,7 +102,7 @@ binding_ip_addr = "0.0.0.0" --ip address on the which server should be launched.
|
|
60 |
colorscheme = "catppuccin-mocha" -- the colorscheme name which should be used for the website theme
|
61 |
theme = "simple" -- the theme name which should be used for the website
|
62 |
|
63 |
-
-- Caching
|
64 |
redis_connection_url = "redis://redis:6379" -- redis connection url address on which the client should connect on.
|
65 |
```
|
66 |
|
@@ -72,14 +114,14 @@ docker compose up -d --build
|
|
72 |
|
73 |
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>`.
|
74 |
|
75 |
-
##
|
76 |
|
77 |
-
For the
|
78 |
|
79 |
```bash
|
80 |
git clone https://github.com/neon-mmd/websurfx.git
|
81 |
cd websurfx
|
82 |
-
git checkout
|
83 |
```
|
84 |
|
85 |
-
[⬅️ Go back to Home](
|
|
|
1 |
+
# Install From Package
|
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 |
+
|
18 |
+
Once you have started the server, open your preferred web browser and navigate to http://127.0.0.1:8080/ to start using Websurfx.
|
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 |
+
## Other Distros
|
23 |
+
|
24 |
+
The package is currently not available on other Linux distros. With contribution and support it can be made available on other distros as well 🙂.
|
25 |
+
|
26 |
+
# Install From Source
|
27 |
+
|
28 |
+
Before you can start building `websurfx`, you will need to have `Cargo` installed on your system. You can find the installation instructions [here](https://doc.rust-lang.org/cargo/getting-started/installation.html).
|
29 |
+
|
30 |
+
## Stable
|
31 |
+
|
32 |
+
To get started with Websurfx, clone the repository, edit the config file which is located in the `websurfx` directory and install redis server by following the instructions located [here](https://redis.io/docs/getting-started/) and then build and run the websurfx server by running the following commands:
|
33 |
|
34 |
```shell
|
35 |
git clone https://github.com/neon-mmd/websurfx.git
|
36 |
cd websurfx
|
37 |
+
git checkout stable
|
38 |
+
cargo build -r
|
39 |
redis-server --port 8082 &
|
40 |
+
./target/release/websurfx
|
41 |
```
|
42 |
|
43 |
+
Once you have started the server, open your preferred web browser and navigate to http://127.0.0.1:8080/ to start using Websurfx.
|
44 |
+
|
45 |
+
If you want to change the port or the ip or any other configuration setting checkout the [configuration docs](./configuration.md).
|
46 |
+
|
47 |
+
## Rolling/Edge/Unstable
|
48 |
|
49 |
If you want to use the rolling/edge branch, run the following commands instead:
|
50 |
|
51 |
```shell
|
52 |
git clone https://github.com/neon-mmd/websurfx.git
|
53 |
cd websurfx
|
54 |
+
cargo build -r
|
|
|
55 |
redis-server --port 8082 &
|
56 |
+
./target/release/websurfx
|
57 |
```
|
58 |
|
59 |
Once you have started the server, open your preferred web browser and navigate to http://127.0.0.1:8080/ to start using Websurfx.
|
60 |
|
61 |
+
If you want to change the port or the ip or any other configuration setting checkout the [configuration docs](./configuration.md).
|
62 |
+
|
63 |
# Docker Deployment
|
64 |
|
65 |
Before you start, you will need [Docker](https://docs.docker.com/get-docker/) installed on your system first.
|
66 |
|
67 |
+
## Unstable/Edge/Rolling
|
68 |
|
69 |
First clone the the repository by running the following command:
|
70 |
|
|
|
76 |
After that edit the config.lua file located under `websurfx` directory. In the config file you will specifically need to change to values which is `binding_ip_addr` and `redis_connection_url` which should make the config look something like this:
|
77 |
|
78 |
```lua
|
79 |
+
-- ### General ###
|
80 |
+
logging = true -- an option to enable or disable logs.
|
81 |
+
debug = false -- an option to enable or disable debug mode.
|
82 |
+
|
83 |
+
-- ### Server ###
|
84 |
port = "8080" -- port on which server should be launched
|
85 |
binding_ip_addr = "0.0.0.0" --ip address on the which server should be launched.
|
86 |
+
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)
|
87 |
+
-- if production_use is set to true
|
88 |
+
-- 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.
|
89 |
|
90 |
+
-- ### Website ###
|
91 |
-- The different colorschemes provided are:
|
92 |
-- {{
|
93 |
-- catppuccin-mocha
|
|
|
102 |
colorscheme = "catppuccin-mocha" -- the colorscheme name which should be used for the website theme
|
103 |
theme = "simple" -- the theme name which should be used for the website
|
104 |
|
105 |
+
-- ### Caching ###
|
106 |
redis_connection_url = "redis://redis:6379" -- redis connection url address on which the client should connect on.
|
107 |
```
|
108 |
|
|
|
114 |
|
115 |
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>`.
|
116 |
|
117 |
+
## Stable
|
118 |
|
119 |
+
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:
|
120 |
|
121 |
```bash
|
122 |
git clone https://github.com/neon-mmd/websurfx.git
|
123 |
cd websurfx
|
124 |
+
git checkout stable
|
125 |
```
|
126 |
|
127 |
+
[⬅️ Go back to Home](./README.md)
|
docs/introduction.md
CHANGED
@@ -10,4 +10,4 @@ Most meta search engines tend to be slow, lack high level of customization and m
|
|
10 |
|
11 |
Websurfx is a project which seeks to provide privacy, security, speed and all the features which the user wants.
|
12 |
|
13 |
-
[⬅️ Go back to Home](
|
|
|
10 |
|
11 |
Websurfx is a project which seeks to provide privacy, security, speed and all the features which the user wants.
|
12 |
|
13 |
+
[⬅️ Go back to Home](./README.md)
|
docs/theming.md
CHANGED
@@ -321,4 +321,45 @@ footer {
|
|
321 |
}
|
322 |
```
|
323 |
|
324 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
321 |
}
|
322 |
```
|
323 |
|
324 |
+
### Styles for the about page
|
325 |
+
|
326 |
+
This part is only available right now in the **rolling/edge/unstable** version
|
327 |
+
|
328 |
+
```css
|
329 |
+
.about-container article{
|
330 |
+
font-size: 1.5rem;
|
331 |
+
color:var(--fg);
|
332 |
+
padding-bottom: 10px;
|
333 |
+
}
|
334 |
+
|
335 |
+
.about-container article h1{
|
336 |
+
color: var(--2);
|
337 |
+
font-size: 2.8rem;
|
338 |
+
}
|
339 |
+
|
340 |
+
.about-container article div{
|
341 |
+
padding-bottom: 15px;
|
342 |
+
}
|
343 |
+
|
344 |
+
.about-container a{
|
345 |
+
color:var(--3);
|
346 |
+
}
|
347 |
+
|
348 |
+
.about-container article h2{
|
349 |
+
color: var(--3);
|
350 |
+
font-size: 1.8rem;
|
351 |
+
padding-bottom: 10px;
|
352 |
+
}
|
353 |
+
|
354 |
+
.about-container p{
|
355 |
+
color:var(--fg);
|
356 |
+
font-size: 1.6rem;
|
357 |
+
padding-bottom: 10px;
|
358 |
+
}
|
359 |
+
|
360 |
+
.about-container h3{
|
361 |
+
font-size: 1.5rem;
|
362 |
+
}
|
363 |
+
```
|
364 |
+
|
365 |
+
[⬅️ Go back to Home](./README.md)
|
images/create_fork_button.png
DELETED
Binary file (65 kB)
|
|
images/fork_button.png
DELETED
Binary file (44.6 kB)
|
|
images/fork_options_page.png
DELETED
Binary file (64.8 kB)
|
|
images/main_page.png
CHANGED
public/images/websurfx_logo.png
ADDED
public/static/colorschemes/dark-chocolate.css
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
:root {
|
2 |
+
--bg: #000000;
|
3 |
+
--fg: #ffffff;
|
4 |
+
--1: #121212;
|
5 |
+
--2: #808080;
|
6 |
+
--3: #999999;
|
7 |
+
--4: #666666;
|
8 |
+
--5: #bfbfbf;
|
9 |
+
--6: #e0e0e0;
|
10 |
+
--7: #555555;
|
11 |
+
}
|
public/static/colorschemes/one-dark.css
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
:root {
|
2 |
+
--bg: #282c34;
|
3 |
+
--fg: #abb2bf;
|
4 |
+
--1: #3b4048;
|
5 |
+
--2: #a3be8c;
|
6 |
+
--3: #b48ead;
|
7 |
+
--4: #c8ccd4;
|
8 |
+
--5: #e06c75;
|
9 |
+
--6: #61afef;
|
10 |
+
--7: #be5046;
|
11 |
+
}
|
public/static/colorschemes/tokyo-night.css
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
:root {
|
2 |
+
--bg: #1a1b26;
|
3 |
+
--fg: #c0caf5;
|
4 |
+
--1: #32364a;
|
5 |
+
--2: #a9b1d6;
|
6 |
+
--3: #5a5bb8;
|
7 |
+
--4: #6b7089;
|
8 |
+
--5: #e2afff;
|
9 |
+
--6: #a9a1e1;
|
10 |
+
--7: #988bc7;
|
11 |
+
}
|
public/static/themes/simple.css
CHANGED
@@ -260,3 +260,44 @@ footer {
|
|
260 |
.page_navigation button:active {
|
261 |
filter: brightness(1.2);
|
262 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
260 |
.page_navigation button:active {
|
261 |
filter: brightness(1.2);
|
262 |
}
|
263 |
+
|
264 |
+
/* Styles for the about page */
|
265 |
+
|
266 |
+
.about-container article{
|
267 |
+
font-size: 1.5rem;
|
268 |
+
color:var(--fg);
|
269 |
+
padding-bottom: 10px;
|
270 |
+
}
|
271 |
+
|
272 |
+
.about-container article h1{
|
273 |
+
color: var(--2);
|
274 |
+
font-size: 2.8rem;
|
275 |
+
}
|
276 |
+
|
277 |
+
.about-container article div{
|
278 |
+
padding-bottom: 15px;
|
279 |
+
}
|
280 |
+
|
281 |
+
.about-container a{
|
282 |
+
color:var(--3);
|
283 |
+
}
|
284 |
+
|
285 |
+
.about-container article h2{
|
286 |
+
color: var(--3);
|
287 |
+
font-size: 1.8rem;
|
288 |
+
padding-bottom: 10px;
|
289 |
+
}
|
290 |
+
|
291 |
+
.about-container p{
|
292 |
+
color:var(--fg);
|
293 |
+
font-size: 1.6rem;
|
294 |
+
padding-bottom: 10px;
|
295 |
+
}
|
296 |
+
|
297 |
+
.about-container h3{
|
298 |
+
font-size: 1.5rem;
|
299 |
+
}
|
300 |
+
|
301 |
+
.about-container {
|
302 |
+
width: 80%;
|
303 |
+
}
|
public/templates/about.html
CHANGED
@@ -1,20 +1,29 @@
|
|
1 |
{{>header this}}
|
2 |
<main class="about-container">
|
3 |
-
<
|
4 |
-
|
5 |
-
>
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
</article>
|
|
|
|
|
19 |
</main>
|
20 |
{{>footer}}
|
|
|
|
1 |
{{>header this}}
|
2 |
<main class="about-container">
|
3 |
+
<article >
|
4 |
+
<div>
|
5 |
+
<h1 >Websurfx</h1>
|
6 |
+
<hr size="4" width="100%" color="#a6e3a1">
|
7 |
+
</div>
|
8 |
+
<p>A modern-looking, lightning-fast, privacy-respecting, secure meta search engine written in Rust. It provides a fast and secure search experience while respecting user privacy.<br> It aggregates results from multiple search engines and presents them in an unbiased manner, filtering out trackers and ads.
|
9 |
+
</p>
|
10 |
+
|
11 |
+
<h2>Some of the Top Features:</h2>
|
12 |
+
|
13 |
+
<ul><strong>Lightning fast </strong>- Results load within milliseconds for an instant search experience.</ul>
|
14 |
+
|
15 |
+
<ul><strong>Secure search</strong> - All searches are performed over an encrypted connection to prevent snooping.</ul>
|
16 |
+
|
17 |
+
<ul><strong>Ad free results</strong> - All search results are ad free and clutter free for a clean search experience.</ul>
|
18 |
+
|
19 |
+
<ul><strong>Privacy focused</strong> - Websurface does not track, store or sell your search data. Your privacy is our priority.</ul>
|
20 |
+
|
21 |
+
<ul><strong>Free and Open source</strong> - The entire project's code is open source and available for free on <a href="https://github.com/neon-mmd/websurfx">GitHub</a> under an GNU Affero General Public License.</ul>
|
22 |
+
|
23 |
+
<ul><strong>Highly customizable</strong> - Websurface comes with 9 built-in color themes and supports creating custom themes effortlessly.</ul>
|
24 |
</article>
|
25 |
+
|
26 |
+
<h3>Devoloped by: <a href="https://github.com/neon-mmd/websurfx">Websurfx team</a></h3>
|
27 |
</main>
|
28 |
{{>footer}}
|
29 |
+
|
public/templates/index.html
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
{{>header this}}
|
2 |
<main class="search-container">
|
3 |
-
<img src="images/
|
4 |
{{>search_bar}}
|
5 |
</main>
|
6 |
<script src="static/index.js"></script>
|
|
|
1 |
{{>header this}}
|
2 |
<main class="search-container">
|
3 |
+
<img src="../images/websurfx_logo.png" alt="Websurfx meta-search engine logo" />
|
4 |
{{>search_bar}}
|
5 |
</main>
|
6 |
<script src="static/index.js"></script>
|
src/bin/websurfx.rs
CHANGED
@@ -5,7 +5,6 @@
|
|
5 |
|
6 |
use std::net::TcpListener;
|
7 |
|
8 |
-
use env_logger::Env;
|
9 |
use websurfx::{config_parser::parser::Config, run};
|
10 |
|
11 |
/// The function that launches the main server and registers all the routes of the website.
|
@@ -20,7 +19,10 @@ async fn main() -> std::io::Result<()> {
|
|
20 |
let config = Config::parse().unwrap();
|
21 |
|
22 |
// Initializing logging middleware with level set to default or info.
|
23 |
-
|
|
|
|
|
|
|
24 |
|
25 |
log::info!("started server on port {}", config.port);
|
26 |
|
|
|
5 |
|
6 |
use std::net::TcpListener;
|
7 |
|
|
|
8 |
use websurfx::{config_parser::parser::Config, run};
|
9 |
|
10 |
/// The function that launches the main server and registers all the routes of the website.
|
|
|
19 |
let config = Config::parse().unwrap();
|
20 |
|
21 |
// Initializing logging middleware with level set to default or info.
|
22 |
+
if config.logging || config.debug {
|
23 |
+
use env_logger::Env;
|
24 |
+
env_logger::Builder::from_env(Env::default().default_filter_or("info")).init();
|
25 |
+
}
|
26 |
|
27 |
log::info!("started server on port {}", config.port);
|
28 |
|
src/cache/cacher.rs
CHANGED
@@ -10,9 +10,8 @@ use redis::{Client, Commands, Connection};
|
|
10 |
/// # Fields
|
11 |
///
|
12 |
/// * `redis_connection_url` - It stores the redis Connection url address.
|
13 |
-
#[derive(Clone)]
|
14 |
pub struct RedisCache {
|
15 |
-
|
16 |
}
|
17 |
|
18 |
impl RedisCache {
|
@@ -21,10 +20,11 @@ impl RedisCache {
|
|
21 |
/// # Arguments
|
22 |
///
|
23 |
/// * `redis_connection_url` - It stores the redis Connection url address.
|
24 |
-
pub fn new(redis_connection_url: String) -> Self {
|
25 |
-
|
26 |
-
|
27 |
-
}
|
|
|
28 |
}
|
29 |
|
30 |
/// A helper function which computes the hash of the url and formats and returns it as string.
|
@@ -32,7 +32,7 @@ impl RedisCache {
|
|
32 |
/// # Arguments
|
33 |
///
|
34 |
/// * `url` - It takes an url as string.
|
35 |
-
fn compute_url_hash(
|
36 |
format!("{:?}", compute(url))
|
37 |
}
|
38 |
|
@@ -41,11 +41,9 @@ impl RedisCache {
|
|
41 |
/// # Arguments
|
42 |
///
|
43 |
/// * `url` - It takes an url as a string.
|
44 |
-
pub fn cached_results_json(self, url:
|
45 |
-
let hashed_url_string =
|
46 |
-
|
47 |
-
Client::open(self.redis_connection_url)?.get_connection()?;
|
48 |
-
Ok(redis_connection.get(hashed_url_string)?)
|
49 |
}
|
50 |
|
51 |
/// A function which caches the results by using the hashed `url` as the key and
|
@@ -57,20 +55,18 @@ impl RedisCache {
|
|
57 |
/// * `json_results` - It takes the json results string as an argument.
|
58 |
/// * `url` - It takes the url as a String.
|
59 |
pub fn cache_results(
|
60 |
-
self,
|
61 |
json_results: String,
|
62 |
-
url:
|
63 |
) -> Result<(), Box<dyn std::error::Error>> {
|
64 |
-
let hashed_url_string =
|
65 |
-
let mut redis_connection: Connection =
|
66 |
-
Client::open(self.redis_connection_url)?.get_connection()?;
|
67 |
|
68 |
// put results_json into cache
|
69 |
-
|
70 |
|
71 |
// Set the TTL for the key to 60 seconds
|
72 |
-
|
73 |
-
.expire::<String, u32>(hashed_url_string
|
74 |
.unwrap();
|
75 |
|
76 |
Ok(())
|
|
|
10 |
/// # Fields
|
11 |
///
|
12 |
/// * `redis_connection_url` - It stores the redis Connection url address.
|
|
|
13 |
pub struct RedisCache {
|
14 |
+
connection: Connection,
|
15 |
}
|
16 |
|
17 |
impl RedisCache {
|
|
|
20 |
/// # Arguments
|
21 |
///
|
22 |
/// * `redis_connection_url` - It stores the redis Connection url address.
|
23 |
+
pub fn new(redis_connection_url: String) -> Result<Self, Box<dyn std::error::Error>> {
|
24 |
+
let client = Client::open(redis_connection_url)?;
|
25 |
+
let connection = client.get_connection()?;
|
26 |
+
let redis_cache = RedisCache { connection };
|
27 |
+
Ok(redis_cache)
|
28 |
}
|
29 |
|
30 |
/// A helper function which computes the hash of the url and formats and returns it as string.
|
|
|
32 |
/// # Arguments
|
33 |
///
|
34 |
/// * `url` - It takes an url as string.
|
35 |
+
fn compute_url_hash(url: &str) -> String {
|
36 |
format!("{:?}", compute(url))
|
37 |
}
|
38 |
|
|
|
41 |
/// # Arguments
|
42 |
///
|
43 |
/// * `url` - It takes an url as a string.
|
44 |
+
pub fn cached_results_json(&mut self, url: &str) -> Result<String, Box<dyn std::error::Error>> {
|
45 |
+
let hashed_url_string = Self::compute_url_hash(url);
|
46 |
+
Ok(self.connection.get(hashed_url_string)?)
|
|
|
|
|
47 |
}
|
48 |
|
49 |
/// A function which caches the results by using the hashed `url` as the key and
|
|
|
55 |
/// * `json_results` - It takes the json results string as an argument.
|
56 |
/// * `url` - It takes the url as a String.
|
57 |
pub fn cache_results(
|
58 |
+
&mut self,
|
59 |
json_results: String,
|
60 |
+
url: &str,
|
61 |
) -> Result<(), Box<dyn std::error::Error>> {
|
62 |
+
let hashed_url_string = Self::compute_url_hash(url);
|
|
|
|
|
63 |
|
64 |
// put results_json into cache
|
65 |
+
self.connection.set(&hashed_url_string, json_results)?;
|
66 |
|
67 |
// Set the TTL for the key to 60 seconds
|
68 |
+
self.connection
|
69 |
+
.expire::<String, u32>(hashed_url_string, 60)
|
70 |
.unwrap();
|
71 |
|
72 |
Ok(())
|
src/cache/mod.rs
CHANGED
@@ -1 +1 @@
|
|
1 |
-
pub mod cacher;
|
|
|
1 |
+
pub mod cacher;
|
src/config_parser/parser.rs
CHANGED
@@ -3,7 +3,11 @@
|
|
3 |
|
4 |
use super::parser_models::Style;
|
5 |
use rlua::Lua;
|
6 |
-
use std::fs;
|
|
|
|
|
|
|
|
|
7 |
|
8 |
/// A named struct which stores the parsed config file options.
|
9 |
///
|
@@ -20,6 +24,16 @@ pub struct Config {
|
|
20 |
pub binding_ip_addr: String,
|
21 |
pub style: Style,
|
22 |
pub redis_connection_url: String,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
}
|
24 |
|
25 |
impl Config {
|
@@ -32,15 +46,24 @@ impl Config {
|
|
32 |
/// or io error if the config.lua file doesn't exists otherwise it returns a newly contructed
|
33 |
/// Config struct with all the parsed config options from the parsed config file.
|
34 |
pub fn parse() -> Result<Self, Box<dyn std::error::Error>> {
|
35 |
-
|
36 |
-
|
37 |
-
lua.context(|context| {
|
38 |
let globals = context.globals();
|
39 |
|
40 |
context
|
41 |
-
.load(&fs::read_to_string(
|
|
|
|
|
42 |
.exec()?;
|
43 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
Ok(Config {
|
45 |
port: globals.get::<_, u16>("port")?,
|
46 |
binding_ip_addr: globals.get::<_, String>("binding_ip_addr")?,
|
@@ -49,7 +72,53 @@ impl Config {
|
|
49 |
globals.get::<_, String>("colorscheme")?,
|
50 |
),
|
51 |
redis_connection_url: globals.get::<_, String>("redis_connection_url")?,
|
|
|
|
|
|
|
52 |
})
|
53 |
})
|
54 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
}
|
|
|
3 |
|
4 |
use super::parser_models::Style;
|
5 |
use rlua::Lua;
|
6 |
+
use std::{format, fs, path::Path};
|
7 |
+
|
8 |
+
// ------- Constants --------
|
9 |
+
static COMMON_DIRECTORY_NAME: &str = "websurfx";
|
10 |
+
static CONFIG_FILE_NAME: &str = "config.lua";
|
11 |
|
12 |
/// A named struct which stores the parsed config file options.
|
13 |
///
|
|
|
24 |
pub binding_ip_addr: String,
|
25 |
pub style: Style,
|
26 |
pub redis_connection_url: String,
|
27 |
+
pub aggregator: AggreatorConfig,
|
28 |
+
pub logging: bool,
|
29 |
+
pub debug: bool,
|
30 |
+
}
|
31 |
+
|
32 |
+
/// Configuration options for the aggregator.
|
33 |
+
#[derive(Clone)]
|
34 |
+
pub struct AggreatorConfig {
|
35 |
+
/// Whether to introduce a random delay before sending the request to the search engine.
|
36 |
+
pub random_delay: bool,
|
37 |
}
|
38 |
|
39 |
impl Config {
|
|
|
46 |
/// or io error if the config.lua file doesn't exists otherwise it returns a newly contructed
|
47 |
/// Config struct with all the parsed config options from the parsed config file.
|
48 |
pub fn parse() -> Result<Self, Box<dyn std::error::Error>> {
|
49 |
+
Lua::new().context(|context| -> Result<Self, Box<dyn std::error::Error>> {
|
|
|
|
|
50 |
let globals = context.globals();
|
51 |
|
52 |
context
|
53 |
+
.load(&fs::read_to_string(
|
54 |
+
Config::handle_different_config_file_path()?,
|
55 |
+
)?)
|
56 |
.exec()?;
|
57 |
|
58 |
+
let production_use = globals.get::<_, bool>("production_use")?;
|
59 |
+
let aggregator_config = if production_use {
|
60 |
+
AggreatorConfig { random_delay: true }
|
61 |
+
} else {
|
62 |
+
AggreatorConfig {
|
63 |
+
random_delay: false,
|
64 |
+
}
|
65 |
+
};
|
66 |
+
|
67 |
Ok(Config {
|
68 |
port: globals.get::<_, u16>("port")?,
|
69 |
binding_ip_addr: globals.get::<_, String>("binding_ip_addr")?,
|
|
|
72 |
globals.get::<_, String>("colorscheme")?,
|
73 |
),
|
74 |
redis_connection_url: globals.get::<_, String>("redis_connection_url")?,
|
75 |
+
aggregator: aggregator_config,
|
76 |
+
logging: globals.get::<_, bool>("logging")?,
|
77 |
+
debug: globals.get::<_, bool>("debug")?,
|
78 |
})
|
79 |
})
|
80 |
}
|
81 |
+
/// A helper function which returns an appropriate config file path checking if the config
|
82 |
+
/// file exists on that path.
|
83 |
+
///
|
84 |
+
/// # Error
|
85 |
+
///
|
86 |
+
/// Returns a `config file not found!!` error if the config file is not present under following
|
87 |
+
/// paths which are:
|
88 |
+
/// 1. `~/.config/websurfx/` if it not present here then it fallbacks to the next one (2)
|
89 |
+
/// 2. `/etc/xdg/websurfx/config.lua` if it is not present here then it fallbacks to the next
|
90 |
+
/// one (3).
|
91 |
+
/// 3. `websurfx/` (under project folder ( or codebase in other words)) if it is not present
|
92 |
+
/// here then it returns an error as mentioned above.
|
93 |
+
fn handle_different_config_file_path() -> Result<String, Box<dyn std::error::Error>> {
|
94 |
+
if Path::new(
|
95 |
+
format!(
|
96 |
+
"{}/.config/{}/config.lua",
|
97 |
+
std::env::var("HOME").unwrap(),
|
98 |
+
COMMON_DIRECTORY_NAME
|
99 |
+
)
|
100 |
+
.as_str(),
|
101 |
+
)
|
102 |
+
.exists()
|
103 |
+
{
|
104 |
+
Ok(format!(
|
105 |
+
"{}/.config/{}/{}",
|
106 |
+
std::env::var("HOME").unwrap(),
|
107 |
+
COMMON_DIRECTORY_NAME,
|
108 |
+
CONFIG_FILE_NAME
|
109 |
+
))
|
110 |
+
} else if Path::new(
|
111 |
+
format!("/etc/xdg/{}/{}", COMMON_DIRECTORY_NAME, CONFIG_FILE_NAME).as_str(),
|
112 |
+
)
|
113 |
+
.exists()
|
114 |
+
{
|
115 |
+
Ok("/etc/xdg/websurfx/config.lua".to_string())
|
116 |
+
} else if Path::new(format!("./{}/{}", COMMON_DIRECTORY_NAME, CONFIG_FILE_NAME).as_str())
|
117 |
+
.exists()
|
118 |
+
{
|
119 |
+
Ok("./websurfx/config.lua".to_string())
|
120 |
+
} else {
|
121 |
+
Err(format!("Config file not found!!").into())
|
122 |
+
}
|
123 |
+
}
|
124 |
}
|
src/handler/mod.rs
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
pub mod public_path_handler;
|
src/handler/public_path_handler.rs
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
//! This module provides the functionality to handle theme folder present on different paths and
|
2 |
+
//! provide one appropriate path on which it is present and can be used.
|
3 |
+
|
4 |
+
use std::io::Error;
|
5 |
+
use std::path::Path;
|
6 |
+
|
7 |
+
// ------- Constants --------
|
8 |
+
static PUBLIC_DIRECTORY_NAME: &str = "public";
|
9 |
+
|
10 |
+
/// A function which returns an appropriate theme directory path checking if the theme
|
11 |
+
/// directory exists on that path.
|
12 |
+
///
|
13 |
+
/// # Error
|
14 |
+
///
|
15 |
+
/// Returns a `Theme (public) folder not found!!` error if the theme folder is not present under following
|
16 |
+
/// paths which are:
|
17 |
+
/// 1. `/opt/websurfx` if it not present here then it fallbacks to the next one (2)
|
18 |
+
/// 2. Under project folder ( or codebase in other words) if it is not present
|
19 |
+
/// here then it returns an error as mentioned above.
|
20 |
+
pub fn handle_different_public_path() -> Result<String, Error> {
|
21 |
+
if Path::new(format!("/opt/websurfx/{}/", PUBLIC_DIRECTORY_NAME).as_str()).exists() {
|
22 |
+
Ok(format!("/opt/websurfx/{}", PUBLIC_DIRECTORY_NAME))
|
23 |
+
} else if Path::new(format!("./{}/", PUBLIC_DIRECTORY_NAME).as_str()).exists() {
|
24 |
+
Ok(format!("./{}", PUBLIC_DIRECTORY_NAME))
|
25 |
+
} else {
|
26 |
+
Err(Error::new(
|
27 |
+
std::io::ErrorKind::NotFound,
|
28 |
+
"Themes (public) folder not found!!",
|
29 |
+
))
|
30 |
+
}
|
31 |
+
}
|
src/lib.rs
CHANGED
@@ -4,6 +4,7 @@
|
|
4 |
pub mod cache;
|
5 |
pub mod config_parser;
|
6 |
pub mod engines;
|
|
|
7 |
pub mod search_results_handler;
|
8 |
pub mod server;
|
9 |
|
@@ -15,6 +16,7 @@ use actix_files as fs;
|
|
15 |
use actix_web::{dev::Server, middleware::Logger, web, App, HttpServer};
|
16 |
use config_parser::parser::Config;
|
17 |
use handlebars::Handlebars;
|
|
|
18 |
|
19 |
/// Runs the web server on the provided TCP listener and returns a `Server` instance.
|
20 |
///
|
@@ -39,8 +41,10 @@ use handlebars::Handlebars;
|
|
39 |
pub fn run(listener: TcpListener, config: Config) -> std::io::Result<Server> {
|
40 |
let mut handlebars: Handlebars = Handlebars::new();
|
41 |
|
|
|
|
|
42 |
handlebars
|
43 |
-
.register_templates_directory(".html", "
|
44 |
.unwrap();
|
45 |
|
46 |
let handlebars_ref: web::Data<Handlebars> = web::Data::new(handlebars);
|
@@ -51,8 +55,14 @@ pub fn run(listener: TcpListener, config: Config) -> std::io::Result<Server> {
|
|
51 |
.app_data(web::Data::new(config.clone()))
|
52 |
.wrap(Logger::default()) // added logging middleware for logging.
|
53 |
// Serve images and static files (css and js files).
|
54 |
-
.service(
|
55 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
.service(routes::robots_data) // robots.txt
|
57 |
.service(routes::index) // index page
|
58 |
.service(routes::search) // search page
|
|
|
4 |
pub mod cache;
|
5 |
pub mod config_parser;
|
6 |
pub mod engines;
|
7 |
+
pub mod handler;
|
8 |
pub mod search_results_handler;
|
9 |
pub mod server;
|
10 |
|
|
|
16 |
use actix_web::{dev::Server, middleware::Logger, web, App, HttpServer};
|
17 |
use config_parser::parser::Config;
|
18 |
use handlebars::Handlebars;
|
19 |
+
use handler::public_path_handler::handle_different_public_path;
|
20 |
|
21 |
/// Runs the web server on the provided TCP listener and returns a `Server` instance.
|
22 |
///
|
|
|
41 |
pub fn run(listener: TcpListener, config: Config) -> std::io::Result<Server> {
|
42 |
let mut handlebars: Handlebars = Handlebars::new();
|
43 |
|
44 |
+
let public_folder_path: String = handle_different_public_path()?;
|
45 |
+
|
46 |
handlebars
|
47 |
+
.register_templates_directory(".html", format!("{}/templates", public_folder_path))
|
48 |
.unwrap();
|
49 |
|
50 |
let handlebars_ref: web::Data<Handlebars> = web::Data::new(handlebars);
|
|
|
55 |
.app_data(web::Data::new(config.clone()))
|
56 |
.wrap(Logger::default()) // added logging middleware for logging.
|
57 |
// Serve images and static files (css and js files).
|
58 |
+
.service(
|
59 |
+
fs::Files::new("/static", format!("{}/static", public_folder_path))
|
60 |
+
.show_files_listing(),
|
61 |
+
)
|
62 |
+
.service(
|
63 |
+
fs::Files::new("/images", format!("{}/images", public_folder_path))
|
64 |
+
.show_files_listing(),
|
65 |
+
)
|
66 |
.service(routes::robots_data) // robots.txt
|
67 |
.service(routes::index) // index page
|
68 |
.service(routes::search) // search page
|
src/search_results_handler/aggregation_models.rs
CHANGED
@@ -116,7 +116,7 @@ impl RawSearchResult {
|
|
116 |
}
|
117 |
}
|
118 |
|
119 |
-
/// A named struct to store, serialize, deserialize the all the search results scraped and
|
120 |
/// aggregated from the upstream search engines.
|
121 |
///
|
122 |
/// # Fields
|
|
|
116 |
}
|
117 |
}
|
118 |
|
119 |
+
/// A named struct to store, serialize, deserialize the all the search results scraped and
|
120 |
/// aggregated from the upstream search engines.
|
121 |
///
|
122 |
/// # Fields
|
src/search_results_handler/aggregator.rs
CHANGED
@@ -29,6 +29,7 @@ use crate::engines::{duckduckgo, searx};
|
|
29 |
///
|
30 |
/// * `query` - Accepts a string to query with the above upstream search engines.
|
31 |
/// * `page` - Accepts an u32 page number.
|
|
|
32 |
///
|
33 |
/// # Error
|
34 |
///
|
@@ -38,14 +39,18 @@ use crate::engines::{duckduckgo, searx};
|
|
38 |
pub async fn aggregate(
|
39 |
query: &str,
|
40 |
page: u32,
|
|
|
|
|
41 |
) -> Result<SearchResults, Box<dyn std::error::Error>> {
|
42 |
let user_agent: String = random_user_agent();
|
43 |
let mut result_map: HashMap<String, RawSearchResult> = HashMap::new();
|
44 |
|
45 |
// Add a random delay before making the request.
|
46 |
-
|
47 |
-
|
48 |
-
|
|
|
|
|
49 |
|
50 |
// fetch results from upstream search engines simultaneously/concurrently.
|
51 |
let (ddg_map_results, searx_map_results) = join!(
|
|
|
29 |
///
|
30 |
/// * `query` - Accepts a string to query with the above upstream search engines.
|
31 |
/// * `page` - Accepts an u32 page number.
|
32 |
+
/// * `random_delay` - Accepts a boolean value to add a random delay before making the request.
|
33 |
///
|
34 |
/// # Error
|
35 |
///
|
|
|
39 |
pub async fn aggregate(
|
40 |
query: &str,
|
41 |
page: u32,
|
42 |
+
random_delay: bool,
|
43 |
+
debug: bool,
|
44 |
) -> Result<SearchResults, Box<dyn std::error::Error>> {
|
45 |
let user_agent: String = random_user_agent();
|
46 |
let mut result_map: HashMap<String, RawSearchResult> = HashMap::new();
|
47 |
|
48 |
// Add a random delay before making the request.
|
49 |
+
if random_delay || !debug {
|
50 |
+
let mut rng = rand::thread_rng();
|
51 |
+
let delay_secs = rng.gen_range(1..10);
|
52 |
+
std::thread::sleep(Duration::from_secs(delay_secs));
|
53 |
+
}
|
54 |
|
55 |
// fetch results from upstream search engines simultaneously/concurrently.
|
56 |
let (ddg_map_results, searx_map_results) = join!(
|
src/search_results_handler/user_agent.rs
CHANGED
@@ -1,13 +1,8 @@
|
|
1 |
//! This module provides the functionality to generate random user agent string.
|
2 |
|
3 |
-
use fake_useragent::{Browsers, UserAgentsBuilder};
|
4 |
|
5 |
-
|
6 |
-
///
|
7 |
-
/// # Returns
|
8 |
-
///
|
9 |
-
/// A randomly generated user agent string.
|
10 |
-
pub fn random_user_agent() -> String {
|
11 |
UserAgentsBuilder::new()
|
12 |
.cache(false)
|
13 |
.dir("/tmp")
|
@@ -21,6 +16,13 @@ pub fn random_user_agent() -> String {
|
|
21 |
.set_mozilla(),
|
22 |
)
|
23 |
.build()
|
24 |
-
|
25 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
}
|
|
|
1 |
//! This module provides the functionality to generate random user agent string.
|
2 |
|
3 |
+
use fake_useragent::{Browsers, UserAgents, UserAgentsBuilder};
|
4 |
|
5 |
+
static USER_AGENTS: once_cell::sync::Lazy<UserAgents> = once_cell::sync::Lazy::new(|| {
|
|
|
|
|
|
|
|
|
|
|
6 |
UserAgentsBuilder::new()
|
7 |
.cache(false)
|
8 |
.dir("/tmp")
|
|
|
16 |
.set_mozilla(),
|
17 |
)
|
18 |
.build()
|
19 |
+
});
|
20 |
+
|
21 |
+
/// A function to generate random user agent to improve privacy of the user.
|
22 |
+
///
|
23 |
+
/// # Returns
|
24 |
+
///
|
25 |
+
/// A randomly generated user agent string.
|
26 |
+
pub fn random_user_agent() -> String {
|
27 |
+
USER_AGENTS.random().to_string()
|
28 |
}
|
src/server/routes.rs
CHANGED
@@ -7,6 +7,7 @@ use std::fs::read_to_string;
|
|
7 |
use crate::{
|
8 |
cache::cacher::RedisCache,
|
9 |
config_parser::parser::Config,
|
|
|
10 |
search_results_handler::{aggregation_models::SearchResults, aggregator::aggregate},
|
11 |
};
|
12 |
use actix_web::{get, web, HttpRequest, HttpResponse};
|
@@ -73,7 +74,7 @@ pub async fn search(
|
|
73 |
let params = web::Query::<SearchParams>::from_query(req.query_string())?;
|
74 |
|
75 |
//Initialize redis cache connection struct
|
76 |
-
let redis_cache = RedisCache::new(config.redis_connection_url.clone())
|
77 |
match ¶ms.q {
|
78 |
Some(query) => {
|
79 |
if query.trim().is_empty() {
|
@@ -81,11 +82,10 @@ pub async fn search(
|
|
81 |
.insert_header(("location", "/"))
|
82 |
.finish())
|
83 |
} else {
|
84 |
-
//
|
85 |
-
|
|
|
86 |
|
87 |
-
// Find whether the page is valid page number if not then return
|
88 |
-
// the first page number and also construct the page_url accordingly
|
89 |
let page = match params.page {
|
90 |
Some(page_number) => {
|
91 |
if page_number <= 1 {
|
@@ -117,7 +117,7 @@ pub async fn search(
|
|
117 |
};
|
118 |
|
119 |
// fetch the cached results json.
|
120 |
-
let cached_results_json = redis_cache.
|
121 |
// check if fetched results was indeed fetched or it was an error and if so
|
122 |
// handle the data accordingly.
|
123 |
match cached_results_json {
|
@@ -128,12 +128,10 @@ pub async fn search(
|
|
128 |
}
|
129 |
Err(_) => {
|
130 |
let mut results_json: crate::search_results_handler::aggregation_models::SearchResults =
|
131 |
-
|
132 |
results_json.add_style(config.style.clone());
|
133 |
-
redis_cache
|
134 |
-
serde_json::to_string(&results_json)?,
|
135 |
-
page_url.clone(),
|
136 |
-
)?;
|
137 |
let page_content: String = hbs.render("search", &results_json)?;
|
138 |
Ok(HttpResponse::Ok().body(page_content))
|
139 |
}
|
@@ -149,7 +147,8 @@ pub async fn search(
|
|
149 |
/// Handles the route of robots.txt page of the `websurfx` meta search engine website.
|
150 |
#[get("/robots.txt")]
|
151 |
pub async fn robots_data(_req: HttpRequest) -> Result<HttpResponse, Box<dyn std::error::Error>> {
|
152 |
-
let page_content: String =
|
|
|
153 |
Ok(HttpResponse::Ok()
|
154 |
.content_type("text/plain; charset=ascii")
|
155 |
.body(page_content))
|
|
|
7 |
use crate::{
|
8 |
cache::cacher::RedisCache,
|
9 |
config_parser::parser::Config,
|
10 |
+
handler::public_path_handler::handle_different_public_path,
|
11 |
search_results_handler::{aggregation_models::SearchResults, aggregator::aggregate},
|
12 |
};
|
13 |
use actix_web::{get, web, HttpRequest, HttpResponse};
|
|
|
74 |
let params = web::Query::<SearchParams>::from_query(req.query_string())?;
|
75 |
|
76 |
//Initialize redis cache connection struct
|
77 |
+
let mut redis_cache = RedisCache::new(config.redis_connection_url.clone())?;
|
78 |
match ¶ms.q {
|
79 |
Some(query) => {
|
80 |
if query.trim().is_empty() {
|
|
|
82 |
.insert_header(("location", "/"))
|
83 |
.finish())
|
84 |
} else {
|
85 |
+
let page_url: String; // Declare the page_url variable without initializing it
|
86 |
+
|
87 |
+
// ...
|
88 |
|
|
|
|
|
89 |
let page = match params.page {
|
90 |
Some(page_number) => {
|
91 |
if page_number <= 1 {
|
|
|
117 |
};
|
118 |
|
119 |
// fetch the cached results json.
|
120 |
+
let cached_results_json = redis_cache.cached_results_json(&page_url);
|
121 |
// check if fetched results was indeed fetched or it was an error and if so
|
122 |
// handle the data accordingly.
|
123 |
match cached_results_json {
|
|
|
128 |
}
|
129 |
Err(_) => {
|
130 |
let mut results_json: crate::search_results_handler::aggregation_models::SearchResults =
|
131 |
+
aggregate(query, page, config.aggregator.random_delay, config.debug).await?;
|
132 |
results_json.add_style(config.style.clone());
|
133 |
+
redis_cache
|
134 |
+
.cache_results(serde_json::to_string(&results_json)?, &page_url)?;
|
|
|
|
|
135 |
let page_content: String = hbs.render("search", &results_json)?;
|
136 |
Ok(HttpResponse::Ok().body(page_content))
|
137 |
}
|
|
|
147 |
/// Handles the route of robots.txt page of the `websurfx` meta search engine website.
|
148 |
#[get("/robots.txt")]
|
149 |
pub async fn robots_data(_req: HttpRequest) -> Result<HttpResponse, Box<dyn std::error::Error>> {
|
150 |
+
let page_content: String =
|
151 |
+
read_to_string(format!("{}/robots.txt", handle_different_public_path()?))?;
|
152 |
Ok(HttpResponse::Ok()
|
153 |
.content_type("text/plain; charset=ascii")
|
154 |
.body(page_content))
|
websurfx/config.lua
CHANGED
@@ -1,8 +1,15 @@
|
|
1 |
-
--
|
|
|
|
|
|
|
|
|
2 |
port = "8080" -- port on which server should be launched
|
3 |
binding_ip_addr = "127.0.0.1" --ip address on the which server should be launched.
|
|
|
|
|
|
|
4 |
|
5 |
-
-- Website
|
6 |
-- The different colorschemes provided are:
|
7 |
-- {{
|
8 |
-- catppuccin-mocha
|
@@ -17,5 +24,5 @@ binding_ip_addr = "127.0.0.1" --ip address on the which server should be launche
|
|
17 |
colorscheme = "catppuccin-mocha" -- the colorscheme name which should be used for the website theme
|
18 |
theme = "simple" -- the theme name which should be used for the website
|
19 |
|
20 |
-
-- Caching
|
21 |
redis_connection_url = "redis://127.0.0.1:8082" -- redis connection url address on which the client should connect on.
|
|
|
1 |
+
-- ### General ###
|
2 |
+
logging = true -- an option to enable or disable logs.
|
3 |
+
debug = false -- an option to enable or disable debug mode.
|
4 |
+
|
5 |
+
-- ### Server ###
|
6 |
port = "8080" -- port on which server should be launched
|
7 |
binding_ip_addr = "127.0.0.1" --ip address on the which server should be launched.
|
8 |
+
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)
|
9 |
+
-- if production_use is set to true
|
10 |
+
-- 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.
|
11 |
|
12 |
+
-- ### Website ###
|
13 |
-- The different colorschemes provided are:
|
14 |
-- {{
|
15 |
-- catppuccin-mocha
|
|
|
24 |
colorscheme = "catppuccin-mocha" -- the colorscheme name which should be used for the website theme
|
25 |
theme = "simple" -- the theme name which should be used for the website
|
26 |
|
27 |
+
-- ### Caching ###
|
28 |
redis_connection_url = "redis://127.0.0.1:8082" -- redis connection url address on which the client should connect on.
|