alamin655 commited on
Commit
ac89b80
2 Parent(s): 07ced9d b5d8335

Merge branch 'hf-rolling' into hf-pr

Browse files
.github/workflows/check-hf.yml ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Check file size
2
+ on: # or directly `on: [push]` to run the action on every push on any branch
3
+ pull_request:
4
+ branches: [main]
5
+
6
+ # to run this workflow manually from the Actions tab
7
+ workflow_dispatch:
8
+
9
+ jobs:
10
+ sync-to-hub:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - name: Check large files
14
+ uses: ActionsDesk/[email protected]
15
+ with:
16
+ filesizelimit: 10485760 # this is 10MB so we can sync to HF Spaces
.github/workflows/deploy-hf.yml ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Sync to Hugging Face hub
2
+
3
+ on:
4
+ push:
5
+ branches: [hf-rolling]
6
+
7
+ # to run this workflow manually from the Actions tab
8
+ workflow_dispatch:
9
+
10
+ jobs:
11
+ sync-to-hub:
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - name: Checkout Repository
15
+ uses: actions/checkout@v3
16
+ with:
17
+ fetch-depth: 0
18
+ lfs: true
19
+
20
+ - name: Configure Git
21
+ run: |
22
+ git config user.email "${{ secrets.EMAIL }}"
23
+ git config user.name "${{ secrets.USERNAME }}"
24
+
25
+ - name: Pull from Hugging Face Space
26
+ env:
27
+ HF_TOKEN: ${{ secrets.HF_TOKEN }}
28
+ run: |
29
+ git pull --allow-unrelated-histories https://alamin655:[email protected]/spaces/alamin655/spacex main
30
+
31
+ - name: Push to Hugging Face Space
32
+ env:
33
+ HF_TOKEN: ${{ secrets.HF_TOKEN }}
34
+ run: |
35
+ git push https://alamin655:[email protected]/spaces/alamin655/spacex hf-rolling:main
Dockerfile CHANGED
@@ -1,43 +1,28 @@
1
- FROM --platform=$BUILDPLATFORM rust:1.75.0-alpine3.18 AS chef
2
  # We only pay the installation cost once,
3
  # it will be cached from the second build onwards
4
- RUN apk add --no-cache alpine-sdk musl-dev g++ make libcrypto3 libressl-dev upx perl build-base
5
  RUN cargo install cargo-chef --locked
6
 
7
  WORKDIR /app
8
 
9
  FROM chef AS planner
10
- COPY ./Cargo.toml ./Cargo.lock ./
11
  RUN cargo chef prepare --recipe-path recipe.json
12
 
13
- FROM --platform=$BUILDPLATFORM chef AS builder
14
  COPY --from=planner /app/recipe.json recipe.json
15
- # Specify the cache type to use (memory, redis, hybrid, no-cache)
16
- ARG CACHE=memory
17
- ENV CACHE=${CACHE}
18
- # Cook the dependencies
19
- RUN export ARCH=$(uname -m) && \
20
- if [ "$CACHE" = "memory" ] ; then cargo chef cook --release --target=$ARCH-unknown-linux-musl --recipe-path recipe.json ; \
21
- else if [ "$CACHE" = "redis" ] ; then cargo chef cook --release --target=$ARCH-unknown-linux-musl --no-default-features --features redis-cache --recipe-path recipe.json ; \
22
- else if [ "$CACHE" = "hybrid" ] ; then cargo chef cook --release --target=$ARCH-unknown-linux-musl --features redis-cache --recipe-path recipe.json ; \
23
- else if [ "$CACHE" = "no-cache" ] ; then cargo chef cook --release --target=$ARCH-unknown-linux-musl --no-default-features --recipe-path recipe.json ; fi ; fi ; fi ; fi
24
- # Copy the source code and public folder
25
- COPY ./src ./src
26
- COPY ./public ./public
27
- # Build the application
28
- RUN export ARCH=$(uname -m) && \
29
- if [ "$CACHE" = "memory" ] ; then cargo build --release --target=$ARCH-unknown-linux-musl ; \
30
- else if [ "$CACHE" = "redis" ] ; then cargo build --release --target=$ARCH-unknown-linux-musl --no-default-features --features redis-cache ; \
31
- else if [ "$CACHE" = "hybrid" ] ; then cargo build --release --target=$ARCH-unknown-linux-musl --features redis-cache ; \
32
- else if [ "$CACHE" = "no-cache" ] ; then cargo build --release --target=$ARCH-unknown-linux-musl --no-default-features ; fi ; fi ; fi ; fi
33
- # Optimise binary size with UPX
34
- RUN export ARCH=$(uname -m) \
35
- && upx --lzma --best /app/target/$ARCH-unknown-linux-musl/release/websurfx \
36
- && cp /app/target/$ARCH-unknown-linux-musl/release/websurfx /usr/local/bin/websurfx
37
 
 
 
 
38
 
39
- FROM --platform=$BUILDPLATFORM scratch
 
40
  COPY --from=builder /app/public/ /opt/websurfx/public/
41
- VOLUME ["/etc/xdg/websurfx/"]
42
- COPY --from=builder /usr/local/bin/websurfx /usr/local/bin/websurfx
 
 
43
  CMD ["websurfx"]
 
1
+ FROM rust:latest AS chef
2
  # We only pay the installation cost once,
3
  # it will be cached from the second build onwards
 
4
  RUN cargo install cargo-chef --locked
5
 
6
  WORKDIR /app
7
 
8
  FROM chef AS planner
9
+ COPY . .
10
  RUN cargo chef prepare --recipe-path recipe.json
11
 
12
+ FROM chef AS builder
13
  COPY --from=planner /app/recipe.json recipe.json
14
+ # Build dependencies - this is the caching Docker layer!
15
+ RUN cargo chef cook --release --recipe-path recipe.json
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
 
17
+ # Build application
18
+ COPY . .
19
+ RUN cargo install --path .
20
 
21
+ # We do not need the Rust toolchain to run the binary!
22
+ FROM gcr.io/distroless/cc-debian12
23
  COPY --from=builder /app/public/ /opt/websurfx/public/
24
+ COPY --from=builder /app/websurfx/config.lua /etc/xdg/websurfx/config.lua
25
+ COPY --from=builder /app/websurfx/allowlist.txt /etc/xdg/websurfx/allowlist.txt
26
+ COPY --from=builder /app/websurfx/blocklist.txt /etc/xdg/websurfx/blocklist.txt
27
+ COPY --from=builder /usr/local/cargo/bin/* /usr/local/bin/
28
  CMD ["websurfx"]
README.md CHANGED
@@ -1,284 +1,12 @@
1
- <h1 align="center">
2
- <img src="./images/websurfx_logo.png" alt="websurfx logo" align="center" />
3
- </h1>
4
- <p align="center">
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="docs/instances.md">Instances</a></b> |
8
- <b><a href="https://discord.gg/VKCAememnr">User Showcase</a></b> |
9
- <b><a href="https://github.com/neon-mmd/websurfx">GitHub</a></b> |
10
- <b><a href="docs">Documentation</a></b>
11
- <br /><br />
12
- <a
13
- href="https://github.com/awesome-selfhosted/awesome-selfhosted#search-engines"
14
- >
15
- <img
16
- src="https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg"
17
- alt="Awesome Self-Hosted"
18
- />
19
- </a>
20
- <a href="#">
21
- <img
22
- alt="GitHub code size in bytes"
23
- src="https://img.shields.io/github/languages/code-size/neon-mmd/websurfx?style=flat-square"
24
- />
25
- </a>
26
- <a href="https://github.com/neon-mmd/websurfx/actions">
27
- <img
28
- alt="GitHub Workflow Status"
29
- src="https://img.shields.io/github/actions/workflow/status/neon-mmd/websurfx/rust.yml?style=flat-square"
30
- />
31
- </a>
32
- <a href=""
33
- ><img
34
- alt="Maintenance"
35
- src="https://img.shields.io/maintenance/yes/2024?style=flat-square"
36
- />
37
- </a>
38
- <a href="https://www.codefactor.io/repository/github/neon-mmd/websurfx">
39
- <img
40
- alt="CodeFactor"
41
- src="https://www.codefactor.io/repository/github/neon-mmd/websurfx/badge"
42
- />
43
- </a>
44
- <a href="https://gitpod.io/#https://github.com/neon-mmd/websurfx">
45
- <img
46
- alt="Gitpod"
47
- src="https://img.shields.io/badge/Gitpod-Ready--to--Code-blue?logo=gitpod"
48
- />
49
- </a>
50
- <br />
51
- <br />
52
- <i>
53
- A modern-looking, lightning-fast, privacy-respecting, secure
54
- <a href="https://en.wikipedia.org/wiki/Metasearch_engine"
55
- >meta search engine</a
56
- >
57
- (pronounced as websurface or web-surface /wɛbˈsɜːrfəs/.) written in Rust. It
58
- provides a quick and secure search experience while completely respecting user
59
- privacy.</i
60
- >
61
- </p>
62
-
63
- <details>
64
- <summary><b>Table of Contents</b></summary>
65
- <p>
66
-
67
- - **Getting Started**
68
- - [🔭 Preview](#preview-)
69
- - [🚀 Features](#features-)
70
- - [🔗 Instances](#instances-)
71
- - [🛠️ Installation and Testing](#installation-and-testing-%EF%B8%8F)
72
- - [🔧 Configuration](#configuration-)
73
- - **Feature Overview**
74
- - [🎨 Theming](#theming-)
75
- - [🌍 Multi-Language Support](#multi-language-support-)
76
- - **Community**
77
- - [📊 System Requirements](#system-requirements-)
78
- - [🗨️ FAQ (Frequently Asked Questions)](#faq-frequently-asked-questions-%EF%B8%8F)
79
- - [📣 More Contributors Wanted](#more-contributors-wanted-)
80
- - [💖 Supporting Websurfx](#supporting-websurfx-)
81
- - [📘 Documentation](#documentation-)
82
- - [🛣️ Roadmap](#roadmap-%EF%B8%8F)
83
- - [🙋 Contributing](#contributing-)
84
- - [📜 License](#license-)
85
- - [🤝 Credits](#credits-)
86
-
87
- </p>
88
- </details>
89
-
90
- # Preview 🔭
91
-
92
- ## Home Page
93
-
94
- <img align="center" src="./images/main_page.png" />
95
-
96
- ## Search Page
97
-
98
- <img align="center" src="./images/search_page.png" />
99
-
100
- ## 404 Error Page
101
-
102
- <img align="center" src="./images/404_error_page.png" />
103
-
104
- **[⬆️ Back to Top](#--)**
105
-
106
- # Instances 🔗
107
-
108
- > For a full list of publicly available community driven `websurfx` instances to test or for daily use. see [**Instances**](docs/instances.md)
109
-
110
- **[⬆️ Back to Top](#--)**
111
-
112
- # Features 🚀
113
-
114
- - 🎨 Make Websurfx uniquely yours with the twelve color schemes provided by default. It also supports the creation of custom themes and color schemes in a quick and easy way, so unleash your creativity!
115
- - 🚀 Easy to setup with Docker or on bare metal with various installation and deployment options.
116
- - ⛔ Search filtering to filter search results based on four different levels.
117
- - 💾 Different caching levels focusing on reliability, speed and resiliancy.
118
- - 🔐 Fast, private, and secure
119
- - 🆓 100% free and open source
120
- - 💨 Ad-free and clean results
121
- - 🌟 and lots more...
122
-
123
- **[⬆️ Back to Top](#--)**
124
-
125
- # Installation and Testing 🛠️
126
-
127
- > For full setup instructions, see: [**Installation**](docs/installation.md)
128
-
129
- 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).
130
-
131
- 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:
132
-
133
- ```shell
134
- git clone https://github.com/neon-mmd/websurfx.git
135
- cd websurfx
136
- git checkout stable
137
- cargo build -r
138
- redis-server --port 8082 &
139
- ./target/release/websurfx
140
- ```
141
-
142
- Once you have started the server, open your preferred web browser and navigate to <http://127.0.0.1:8080> to start using Websurfx.
143
-
144
- > [!Note]
145
- >
146
- > 1. The project is no longer in the testing phase and is now ready for production use.
147
- > 2. There are many features still missing, like `support for image search`, `different categories`, `quick apps`, etc., but they will be added soon as part of future releases.
148
-
149
- **[⬆️ Back to Top](#--)**
150
-
151
- # Configuration 🔧
152
-
153
- > For full configuration instructions, see: [**Configuration**](docs/configuration.md)
154
-
155
- Websurfx is configured through the config.lua file, located at `websurfx/config.lua`.
156
-
157
- **[⬆️ Back to Top](#--)**
158
-
159
- # Theming 🎨
160
-
161
- > For full theming and customization instructions, see: [**Theming**](docs/theming.md)
162
-
163
- Websurfx comes loaded with several themes and color schemes, which you can apply and edit through the config file. It also supports custom themes and color schemes using CSS, allowing you to make it truly yours.
164
-
165
- **[⬆️ Back to Top](#--)**
166
-
167
- # Multi-Language Support 🌍
168
-
169
- > [!Note]
170
- > Currently, we do not support other languages, but we will start accepting contributions regarding language support in the future. We believe language should never be a barrier to entry.
171
-
172
- **[⬆️ Back to Top](#--)**
173
-
174
- # System Requirements 📊
175
-
176
- At present, we only support x86_64 architecture systems, but we would love to have contributions that extend to other architectures as well.
177
-
178
- **[⬆️ Back to Top](#--)**
179
-
180
- # FAQ (Frequently Asked Questions) 🗨️
181
-
182
- ## Why Websurfx?
183
-
184
- The primary purpose of the Websurfx project is to create a fast, secure, and privacy-focused meta-search engine. There are numerous meta-search engines available, but not all guarantee the security of their search engines, which is critical for maintaining privacy. Memory flaws, for example, can expose private or sensitive information, which is understandably bad. There is also the added problem of spam, ads, and inorganic results, which most engines don't have a full-proof answer to. Until now. With Websurfx, I finally put a full stop to this problem. Websurfx is based on Rust, which ensures memory safety and removes such issues. Many meta-search engines also lack important features like advanced picture search, required by graphic designers, content providers, and others. Websurfx improves the user experience by providing these and other features, such as proper NSFW blocking and micro-apps or quick results (providing a calculator, currency exchanges, etc. in the search results).
185
-
186
- ## Why AGPLv3?
187
-
188
- Websurfx is distributed under the **AGPLv3** license to keep the source code open and transparent. This helps keep malware, telemetry, and other dangers out of the project. **AGPLv3** is a strong copyleft license that ensures the software's source code, including any modifications or improvements made to the code, remains open and available to everyone.
189
-
190
- ## Why Rust?
191
-
192
- Websurfx is based on Rust due to its memory safety features, which prevent vulnerabilities and make the codebase more secure. Rust is also faster than C++, contributing to Websurfx's speed and responsiveness. Finally, the Rust ownership and borrowing system enables secure concurrency and thread safety in the program.
193
-
194
- **[⬆️ Back to Top](#--)**
195
-
196
- # More Contributors Wanted 📣
197
-
198
- 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.
199
-
200
- **[⬆️ Back to Top](#--)**
201
-
202
- # Supporting Websurfx 💖
203
-
204
- > For full details and other ways you can help out, see: [**Contributing**](CONTRIBUTING.md)
205
-
206
- If you use Websurfx and would like to contribute to its development, we're glad to have you on board! Contributions of any size or type are always welcome, and we will always acknowledge your efforts.
207
-
208
- Several areas that we need a bit of help with at the moment are:
209
-
210
- - **Better and more color schemes**: Help fix color schemes and add other famous color schemes.
211
- - **Improve evasion code for bot detection**: Help improve code related to evading IP blocking and emulating human behaviors located in everyone's engine file.
212
- - **Logo**: Help create a logo for the project and website.
213
- - **Docker Support**: Help write a Docker Compose file for the project.
214
- - Submit a PR to add a new feature, fix a bug, update the docs, add a theme, widget, or anything else.
215
- - Star Websurfx on GitHub.
216
-
217
- **[⬆️ Back to Top](#--)**
218
-
219
- # Documentation 📘
220
-
221
- > [!Note]
222
- > We welcome any contributions to the [documentation](docs) as this will benefit everyone who uses this project.
223
-
224
- **[⬆️ Back to Top](#--)**
225
-
226
- # Roadmap 🛣️
227
-
228
- > Coming soon! 🙂.
229
-
230
- **[⬆️ Back to Top](#--)**
231
-
232
- # Contributing 🙋
233
-
234
- Contributions are welcome from anyone. It doesn't matter who you are; you can still contribute to the project in your own way.
235
-
236
- ## Not a developer but still want to contribute?
237
-
238
- Check out this [video](https://youtu.be/FccdqCucVSI) by Mr. Nick on how to contribute.
239
-
240
- ## Developer
241
-
242
- If you are a developer, have a look at the [CONTRIBUTING.md](CONTRIBUTING.md) document for more information.
243
-
244
- **[⬆️ Back to Top](#--)**
245
-
246
- # License 📜
247
-
248
- Websurfx is licensed under the [AGPLv3](LICENSE) license.
249
-
250
- **[⬆️ Back to Top](#--)**
251
-
252
- # Credits 🤝
253
-
254
- We would like to thank the following people for their contributions and support:
255
-
256
- **Contributors**
257
-
258
- <p>
259
- <br />
260
- <a href="https://github.com/neon-mmd/websurfx/graphs/contributors">
261
- <img src="https://contrib.rocks/image?repo=neon-mmd/websurfx" />
262
- </a>
263
- <br />
264
- </p>
265
-
266
- **Stargazers**
267
-
268
- <p>
269
- <a href="https://github.com/neon-mmd/websurfx/stargazers">
270
- <img src="http://reporoster.com/stars/dark/neon-mmd/websurfx"/>
271
- </a>
272
- </p>
273
-
274
- **[⬆️ Back to Top](#--)**
275
-
276
  ---
277
 
278
- <p align="center">
279
- <a href="https://github.com/neon-mmd/websurfx">
280
- <img src="https://github.githubassets.com/images/icons/emoji/octocat.png" />
281
- </a>
282
- <br /><br />
283
- <i>Thank you for Visiting</i>
284
- </p>
 
1
+ ---
2
+ title: Spacex
3
+ emoji: 👀
4
+ colorFrom: red
5
+ colorTo: blue
6
+ sdk: docker
7
+ app_port: 8080
8
+ pinned: false
9
+ license: agpl-3.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  ---
11
 
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
README_github.md ADDED
@@ -0,0 +1,284 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <h1 align="center">
2
+ <img src="./images/websurfx_logo.png" alt="websurfx logo" align="center" />
3
+ </h1>
4
+ <p align="center">
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="docs/instances.md">Instances</a></b> |
8
+ <b><a href="https://discord.gg/VKCAememnr">User Showcase</a></b> |
9
+ <b><a href="https://github.com/neon-mmd/websurfx">GitHub</a></b> |
10
+ <b><a href="docs">Documentation</a></b>
11
+ <br /><br />
12
+ <a
13
+ href="https://github.com/awesome-selfhosted/awesome-selfhosted#search-engines"
14
+ >
15
+ <img
16
+ src="https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg"
17
+ alt="Awesome Self-Hosted"
18
+ />
19
+ </a>
20
+ <a href="#">
21
+ <img
22
+ alt="GitHub code size in bytes"
23
+ src="https://img.shields.io/github/languages/code-size/neon-mmd/websurfx?style=flat-square"
24
+ />
25
+ </a>
26
+ <a href="https://github.com/neon-mmd/websurfx/actions">
27
+ <img
28
+ alt="GitHub Workflow Status"
29
+ src="https://img.shields.io/github/actions/workflow/status/neon-mmd/websurfx/rust.yml?style=flat-square"
30
+ />
31
+ </a>
32
+ <a href=""
33
+ ><img
34
+ alt="Maintenance"
35
+ src="https://img.shields.io/maintenance/yes/2023?style=flat-square"
36
+ />
37
+ </a>
38
+ <a href="https://www.codefactor.io/repository/github/neon-mmd/websurfx">
39
+ <img
40
+ alt="CodeFactor"
41
+ src="https://www.codefactor.io/repository/github/neon-mmd/websurfx/badge"
42
+ />
43
+ </a>
44
+ <a href="https://gitpod.io/#https://github.com/neon-mmd/websurfx">
45
+ <img
46
+ alt="Gitpod"
47
+ src="https://img.shields.io/badge/Gitpod-Ready--to--Code-blue?logo=gitpod"
48
+ />
49
+ </a>
50
+ <br />
51
+ <br />
52
+ <i>
53
+ A modern-looking, lightning-fast, privacy-respecting, secure
54
+ <a href="https://en.wikipedia.org/wiki/Metasearch_engine"
55
+ >meta search engine</a
56
+ >
57
+ (pronounced as websurface or web-surface /wɛbˈsɜːrfəs/.) written in Rust. It
58
+ provides a quick and secure search experience while completely respecting user
59
+ privacy.</i
60
+ >
61
+ </p>
62
+
63
+ <details>
64
+ <summary><b>Table of Contents</b></summary>
65
+ <p>
66
+
67
+ - **Getting Started**
68
+ - [🔭 Preview](#preview-)
69
+ - [🚀 Features](#features-)
70
+ - [🔗 Instances](#instances-)
71
+ - [🛠️ Installation and Testing](#installation-and-testing-%EF%B8%8F)
72
+ - [🔧 Configuration](#configuration-)
73
+ - **Feature Overview**
74
+ - [🎨 Theming](#theming-)
75
+ - [🌍 Multi-Language Support](#multi-language-support-)
76
+ - **Community**
77
+ - [📊 System Requirements](#system-requirements-)
78
+ - [🗨️ FAQ (Frequently Asked Questions)](#faq-frequently-asked-questions-%EF%B8%8F)
79
+ - [📣 More Contributors Wanted](#more-contributors-wanted-)
80
+ - [💖 Supporting Websurfx](#supporting-websurfx-)
81
+ - [📘 Documentation](#documentation-)
82
+ - [🛣️ Roadmap](#roadmap-%EF%B8%8F)
83
+ - [🙋 Contributing](#contributing-)
84
+ - [📜 License](#license-)
85
+ - [🤝 Credits](#credits-)
86
+
87
+ </p>
88
+ </details>
89
+
90
+ # Preview 🔭
91
+
92
+ ## Home Page
93
+
94
+ <img align="center" src="./images/main_page.png" />
95
+
96
+ ## Search Page
97
+
98
+ <img align="center" src="./images/search_page.png" />
99
+
100
+ ## 404 Error Page
101
+
102
+ <img align="center" src="./images/404_error_page.png" />
103
+
104
+ **[⬆️ Back to Top](#--)**
105
+
106
+ # Instances 🔗
107
+
108
+ > For a full list of publicly available community driven `websurfx` instances to test or for daily use. see [**Instances**](docs/instances.md)
109
+
110
+ **[⬆️ Back to Top](#--)**
111
+
112
+ # Features 🚀
113
+
114
+ - 🎨 Make Websurfx uniquely yours with the twelve color schemes provided by default. It also supports the creation of custom themes and color schemes in a quick and easy way, so unleash your creativity!
115
+ - 🚀 Easy to setup with Docker or on bare metal with various installation and deployment options.
116
+ - ⛔ Search filtering to filter search results based on four different levels.
117
+ - 💾 Different caching levels focusing on reliability, speed and resiliancy.
118
+ - 🔐 Fast, private, and secure
119
+ - 🆓 100% free and open source
120
+ - 💨 Ad-free and clean results
121
+ - 🌟 and lots more...
122
+
123
+ **[⬆️ Back to Top](#--)**
124
+
125
+ # Installation and Testing 🛠️
126
+
127
+ > For full setup instructions, see: [**Installation**](docs/installation.md)
128
+
129
+ 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).
130
+
131
+ 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:
132
+
133
+ ```shell
134
+ git clone https://github.com/neon-mmd/websurfx.git
135
+ cd websurfx
136
+ git checkout stable
137
+ cargo build -r
138
+ redis-server --port 8082 &
139
+ ./target/release/websurfx
140
+ ```
141
+
142
+ Once you have started the server, open your preferred web browser and navigate to <http://127.0.0.1:8080> to start using Websurfx.
143
+
144
+ > [!Note]
145
+ >
146
+ > 1. The project is no longer in the testing phase and is now ready for production use.
147
+ > 2. There are many features still missing, like `support for image search`, `different categories`, `quick apps`, etc., but they will be added soon as part of future releases.
148
+
149
+ **[⬆️ Back to Top](#--)**
150
+
151
+ # Configuration 🔧
152
+
153
+ > For full configuration instructions, see: [**Configuration**](docs/configuration.md)
154
+
155
+ Websurfx is configured through the config.lua file, located at `websurfx/config.lua`.
156
+
157
+ **[⬆️ Back to Top](#--)**
158
+
159
+ # Theming 🎨
160
+
161
+ > For full theming and customization instructions, see: [**Theming**](docs/theming.md)
162
+
163
+ Websurfx comes loaded with several themes and color schemes, which you can apply and edit through the config file. It also supports custom themes and color schemes using CSS, allowing you to make it truly yours.
164
+
165
+ **[⬆️ Back to Top](#--)**
166
+
167
+ # Multi-Language Support 🌍
168
+
169
+ > [!Note]
170
+ > Currently, we do not support other languages, but we will start accepting contributions regarding language support in the future. We believe language should never be a barrier to entry.
171
+
172
+ **[⬆️ Back to Top](#--)**
173
+
174
+ # System Requirements 📊
175
+
176
+ At present, we only support x86_64 architecture systems, but we would love to have contributions that extend to other architectures as well.
177
+
178
+ **[⬆️ Back to Top](#--)**
179
+
180
+ # FAQ (Frequently Asked Questions) 🗨️
181
+
182
+ ## Why Websurfx?
183
+
184
+ The primary purpose of the Websurfx project is to create a fast, secure, and privacy-focused meta-search engine. There are numerous meta-search engines available, but not all guarantee the security of their search engines, which is critical for maintaining privacy. Memory flaws, for example, can expose private or sensitive information, which is understandably bad. There is also the added problem of spam, ads, and inorganic results, which most engines don't have a full-proof answer to. Until now. With Websurfx, I finally put a full stop to this problem. Websurfx is based on Rust, which ensures memory safety and removes such issues. Many meta-search engines also lack important features like advanced picture search, required by graphic designers, content providers, and others. Websurfx improves the user experience by providing these and other features, such as proper NSFW blocking and micro-apps or quick results (providing a calculator, currency exchanges, etc. in the search results).
185
+
186
+ ## Why AGPLv3?
187
+
188
+ Websurfx is distributed under the **AGPLv3** license to keep the source code open and transparent. This helps keep malware, telemetry, and other dangers out of the project. **AGPLv3** is a strong copyleft license that ensures the software's source code, including any modifications or improvements made to the code, remains open and available to everyone.
189
+
190
+ ## Why Rust?
191
+
192
+ Websurfx is based on Rust due to its memory safety features, which prevent vulnerabilities and make the codebase more secure. Rust is also faster than C++, contributing to Websurfx's speed and responsiveness. Finally, the Rust ownership and borrowing system enables secure concurrency and thread safety in the program.
193
+
194
+ **[⬆️ Back to Top](#--)**
195
+
196
+ # More Contributors Wanted 📣
197
+
198
+ 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.
199
+
200
+ **[⬆️ Back to Top](#--)**
201
+
202
+ # Supporting Websurfx 💖
203
+
204
+ > For full details and other ways you can help out, see: [**Contributing**](CONTRIBUTING.md)
205
+
206
+ If you use Websurfx and would like to contribute to its development, we're glad to have you on board! Contributions of any size or type are always welcome, and we will always acknowledge your efforts.
207
+
208
+ Several areas that we need a bit of help with at the moment are:
209
+
210
+ - **Better and more color schemes**: Help fix color schemes and add other famous color schemes.
211
+ - **Improve evasion code for bot detection**: Help improve code related to evading IP blocking and emulating human behaviors located in everyone's engine file.
212
+ - **Logo**: Help create a logo for the project and website.
213
+ - **Docker Support**: Help write a Docker Compose file for the project.
214
+ - Submit a PR to add a new feature, fix a bug, update the docs, add a theme, widget, or anything else.
215
+ - Star Websurfx on GitHub.
216
+
217
+ **[⬆️ Back to Top](#--)**
218
+
219
+ # Documentation 📘
220
+
221
+ > [!Note]
222
+ > We welcome any contributions to the [documentation](docs) as this will benefit everyone who uses this project.
223
+
224
+ **[⬆️ Back to Top](#--)**
225
+
226
+ # Roadmap 🛣️
227
+
228
+ > Coming soon! 🙂.
229
+
230
+ **[⬆️ Back to Top](#--)**
231
+
232
+ # Contributing 🙋
233
+
234
+ Contributions are welcome from anyone. It doesn't matter who you are; you can still contribute to the project in your own way.
235
+
236
+ ## Not a developer but still want to contribute?
237
+
238
+ Check out this [video](https://youtu.be/FccdqCucVSI) by Mr. Nick on how to contribute.
239
+
240
+ ## Developer
241
+
242
+ If you are a developer, have a look at the [CONTRIBUTING.md](CONTRIBUTING.md) document for more information.
243
+
244
+ **[⬆️ Back to Top](#--)**
245
+
246
+ # License 📜
247
+
248
+ Websurfx is licensed under the [AGPLv3](LICENSE) license.
249
+
250
+ **[⬆️ Back to Top](#--)**
251
+
252
+ # Credits 🤝
253
+
254
+ We would like to thank the following people for their contributions and support:
255
+
256
+ **Contributors**
257
+
258
+ <p>
259
+ <br />
260
+ <a href="https://github.com/neon-mmd/websurfx/graphs/contributors">
261
+ <img src="https://contrib.rocks/image?repo=neon-mmd/websurfx" />
262
+ </a>
263
+ <br />
264
+ </p>
265
+
266
+ **Stargazers**
267
+
268
+ <p>
269
+ <a href="https://github.com/neon-mmd/websurfx/stargazers">
270
+ <img src="https://reporoster.com/stars/dark/neon-mmd/websurfx" />
271
+ </a>
272
+ </p>
273
+
274
+ **[⬆️ Back to Top](#--)**
275
+
276
+ ---
277
+
278
+ <p align="center">
279
+ <a href="https://github.com/neon-mmd/websurfx">
280
+ <img src="https://github.githubassets.com/images/icons/emoji/octocat.png" />
281
+ </a>
282
+ <br /><br />
283
+ <i>Thank you for Visiting</i>
284
+ </p>
bak.Dockerfile ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM --platform=$BUILDPLATFORM rust:1.75.0-alpine3.18 AS chef
2
+ # We only pay the installation cost once,
3
+ # it will be cached from the second build onwards
4
+ RUN apk add --no-cache alpine-sdk musl-dev g++ make libcrypto3 libressl-dev upx perl build-base
5
+ RUN cargo install cargo-chef --locked
6
+
7
+ WORKDIR /app
8
+
9
+ FROM chef AS planner
10
+ COPY ./Cargo.toml ./Cargo.lock ./
11
+ RUN cargo chef prepare --recipe-path recipe.json
12
+
13
+ FROM --platform=$BUILDPLATFORM chef AS builder
14
+ COPY --from=planner /app/recipe.json recipe.json
15
+ # Specify the cache type to use (memory, redis, hybrid, no-cache)
16
+ ARG CACHE=memory
17
+ ENV CACHE=${CACHE}
18
+ # Cook the dependencies
19
+ RUN export ARCH=$(uname -m) && \
20
+ if [ "$CACHE" = "memory" ] ; then cargo chef cook --release --target=$ARCH-unknown-linux-musl --recipe-path recipe.json ; \
21
+ else if [ "$CACHE" = "redis" ] ; then cargo chef cook --release --target=$ARCH-unknown-linux-musl --no-default-features --features redis-cache --recipe-path recipe.json ; \
22
+ else if [ "$CACHE" = "hybrid" ] ; then cargo chef cook --release --target=$ARCH-unknown-linux-musl --features redis-cache --recipe-path recipe.json ; \
23
+ else if [ "$CACHE" = "no-cache" ] ; then cargo chef cook --release --target=$ARCH-unknown-linux-musl --no-default-features --recipe-path recipe.json ; fi ; fi ; fi ; fi
24
+ # Copy the source code and public folder
25
+ COPY ./src ./src
26
+ COPY ./public ./public
27
+ # Build the application
28
+ RUN export ARCH=$(uname -m) && \
29
+ if [ "$CACHE" = "memory" ] ; then cargo build --release --target=$ARCH-unknown-linux-musl ; \
30
+ else if [ "$CACHE" = "redis" ] ; then cargo build --release --target=$ARCH-unknown-linux-musl --no-default-features --features redis-cache ; \
31
+ else if [ "$CACHE" = "hybrid" ] ; then cargo build --release --target=$ARCH-unknown-linux-musl --features redis-cache ; \
32
+ else if [ "$CACHE" = "no-cache" ] ; then cargo build --release --target=$ARCH-unknown-linux-musl --no-default-features ; fi ; fi ; fi ; fi
33
+ # Optimise binary size with UPX
34
+ RUN export ARCH=$(uname -m) \
35
+ && upx --lzma --best /app/target/$ARCH-unknown-linux-musl/release/websurfx \
36
+ && cp /app/target/$ARCH-unknown-linux-musl/release/websurfx /usr/local/bin/websurfx
37
+
38
+
39
+ FROM --platform=$BUILDPLATFORM scratch
40
+ COPY --from=builder /app/public/ /opt/websurfx/public/
41
+ VOLUME ["/etc/xdg/websurfx/"]
42
+ COPY --from=builder /usr/local/bin/websurfx /usr/local/bin/websurfx
43
+ CMD ["websurfx"]
websurfx/config.lua CHANGED
@@ -5,13 +5,13 @@ threads = 10 -- the amount of threads that the app will use to run (the value sh
5
 
6
  -- ### Server ###
7
  port = "8080" -- port on which server should be launched
8
- binding_ip = "127.0.0.1" --ip address on the which server should be launched.
9
  production_use = false -- whether to use production mode or not (in other words this option should be used if it is to be used to host it on the server to provide a service to a large number of users (more than one))
10
  -- if production_use is set to true
11
  -- 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.
12
  request_timeout = 30 -- timeout for the search requests sent to the upstream search engines to be fetched (value in seconds).
13
  rate_limiter = {
14
- number_of_requests = 20, -- The number of request that are allowed within a provided time limit.
15
  time_limit = 3, -- The time limit in which the quantity of requests that should be accepted.
16
  }
17
 
@@ -24,7 +24,7 @@ rate_limiter = {
24
  -- 3 - High
25
  -- 4 - Aggressive
26
  -- }}
27
- safe_search = 2
28
 
29
  -- ### Website ###
30
  -- The different colorschemes provided are:
 
5
 
6
  -- ### Server ###
7
  port = "8080" -- port on which server should be launched
8
+ binding_ip = "0.0.0.0" --ip address on the which server should be launched.
9
  production_use = false -- whether to use production mode or not (in other words this option should be used if it is to be used to host it on the server to provide a service to a large number of users (more than one))
10
  -- if production_use is set to true
11
  -- 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.
12
  request_timeout = 30 -- timeout for the search requests sent to the upstream search engines to be fetched (value in seconds).
13
  rate_limiter = {
14
+ number_of_requests = 50, -- The number of request that are allowed within a provided time limit.
15
  time_limit = 3, -- The time limit in which the quantity of requests that should be accepted.
16
  }
17
 
 
24
  -- 3 - High
25
  -- 4 - Aggressive
26
  -- }}
27
+ safe_search = 0
28
 
29
  -- ### Website ###
30
  -- The different colorschemes provided are: