mirror of
https://github.com/neon-mmd/websurfx.git
synced 2024-11-21 21:48:21 -05:00
Merge branch 'rolling' into optimize-and-make-code-idiomatic
This commit is contained in:
commit
82a78e3b42
7
.github/workflows/rust.yml
vendored
7
.github/workflows/rust.yml
vendored
@ -21,9 +21,10 @@ jobs:
|
|||||||
- stable
|
- stable
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: leafo/gh-actions-lua@v10
|
- name: Install LuaJIT and Lua
|
||||||
with:
|
run: |
|
||||||
luaVersion: 'luajit'
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y --no-install-recommends liblua5.4-dev liblua5.3-dev liblua5.2-dev liblua5.1-0-dev libluajit-5.1-dev
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- run: rustup toolchain install stable --profile minimal
|
- run: rustup toolchain install stable --profile minimal
|
||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
|
7
.github/workflows/rust_format.yml
vendored
7
.github/workflows/rust_format.yml
vendored
@ -13,9 +13,10 @@ jobs:
|
|||||||
name: Rust project
|
name: Rust project
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: leafo/gh-actions-lua@v10
|
- name: Install LuaJIT and Lua
|
||||||
with:
|
run: |
|
||||||
luaVersion: 'luajit'
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y --no-install-recommends liblua5.4-dev liblua5.3-dev liblua5.2-dev liblua5.1-0-dev libluajit-5.1-dev
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Install minimal stable with clippy and rustfmt
|
- name: Install minimal stable with clippy and rustfmt
|
||||||
uses: actions-rs/toolchain@v1
|
uses: actions-rs/toolchain@v1
|
||||||
|
32
Cargo.lock
generated
32
Cargo.lock
generated
@ -209,9 +209,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "actix-web-codegen"
|
name = "actix-web-codegen"
|
||||||
version = "4.2.1"
|
version = "4.2.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "8cc9afd177d10afc1e7842eaf6b8b24a38f4d22088b197a2b9395b102c4413eb"
|
checksum = "eb1f50ebbb30eca122b188319a4398b3f7bb4a8cdf50ecfb73bfc6a3c3ce54f5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"actix-router",
|
"actix-router",
|
||||||
"proc-macro2 1.0.66",
|
"proc-macro2 1.0.66",
|
||||||
@ -248,9 +248,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "aho-corasick"
|
name = "aho-corasick"
|
||||||
version = "1.0.4"
|
version = "1.0.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "6748e8def348ed4d14996fa801f4122cd763fff530258cdc03f64b25f89d3a5a"
|
checksum = "0c378d78423fdad8089616f827526ee33c19f2fddbd5de1629152c9593ba4783"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"memchr",
|
"memchr",
|
||||||
]
|
]
|
||||||
@ -1723,9 +1723,9 @@ checksum = "490cc448043f947bae3cbee9c203358d62dbee0db12107a74be5c30ccfd09771"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "memchr"
|
name = "memchr"
|
||||||
version = "2.6.1"
|
version = "2.6.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "f478948fd84d9f8e86967bf432640e46adfb5a4bd4f14ef7e864ab38220534ae"
|
checksum = "5486aed0026218e61b8a01d5fbd5a0a134649abb71a0e53b7bc088529dced86e"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "memoffset"
|
name = "memoffset"
|
||||||
@ -2040,19 +2040,20 @@ checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pest"
|
name = "pest"
|
||||||
version = "2.7.2"
|
version = "2.7.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "1acb4a4365a13f749a93f1a094a7805e5cfa0955373a9de860d962eaa3a5fe5a"
|
checksum = "d7a4d085fd991ac8d5b05a147b437791b4260b76326baf0fc60cf7c9c27ecd33"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"memchr",
|
||||||
"thiserror",
|
"thiserror",
|
||||||
"ucd-trie",
|
"ucd-trie",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pest_derive"
|
name = "pest_derive"
|
||||||
version = "2.7.2"
|
version = "2.7.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "666d00490d4ac815001da55838c500eafb0320019bbaa44444137c48b443a853"
|
checksum = "a2bee7be22ce7918f641a33f08e3f43388c7656772244e2bbb2477f44cc9021a"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"pest",
|
"pest",
|
||||||
"pest_generator",
|
"pest_generator",
|
||||||
@ -2060,9 +2061,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pest_generator"
|
name = "pest_generator"
|
||||||
version = "2.7.2"
|
version = "2.7.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "68ca01446f50dbda87c1786af8770d535423fa8a53aec03b8f4e3d7eb10e0929"
|
checksum = "d1511785c5e98d79a05e8a6bc34b4ac2168a0e3e92161862030ad84daa223141"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"pest",
|
"pest",
|
||||||
"pest_meta",
|
"pest_meta",
|
||||||
@ -2073,9 +2074,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pest_meta"
|
name = "pest_meta"
|
||||||
version = "2.7.2"
|
version = "2.7.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "56af0a30af74d0445c0bf6d9d051c979b516a1a5af790d251daee76005420a48"
|
checksum = "b42f0394d3123e33353ca5e1e89092e533d2cc490389f2bd6131c43c634ebc5f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"pest",
|
"pest",
|
||||||
@ -3696,7 +3697,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "websurfx"
|
name = "websurfx"
|
||||||
version = "0.18.2"
|
version = "0.18.6"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"actix-cors",
|
"actix-cors",
|
||||||
"actix-files",
|
"actix-files",
|
||||||
@ -3714,6 +3715,7 @@ dependencies = [
|
|||||||
"md5",
|
"md5",
|
||||||
"mimalloc",
|
"mimalloc",
|
||||||
"mlua",
|
"mlua",
|
||||||
|
"once_cell",
|
||||||
"rand 0.8.5",
|
"rand 0.8.5",
|
||||||
"redis",
|
"redis",
|
||||||
"regex",
|
"regex",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "websurfx"
|
name = "websurfx"
|
||||||
version = "0.18.2"
|
version = "0.18.6"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
description = "An open-source alternative to Searx that provides clean, ad-free, and organic results with incredible speed while keeping privacy and security in mind."
|
description = "An open-source alternative to Searx that provides clean, ad-free, and organic results with incredible speed while keeping privacy and security in mind."
|
||||||
repository = "https://github.com/neon-mmd/websurfx"
|
repository = "https://github.com/neon-mmd/websurfx"
|
||||||
@ -19,10 +19,11 @@ serde_json = {version="1.0.105"}
|
|||||||
fake-useragent = {version="0.1.3"}
|
fake-useragent = {version="0.1.3"}
|
||||||
env_logger = {version="0.10.0"}
|
env_logger = {version="0.10.0"}
|
||||||
log = {version="0.4.20"}
|
log = {version="0.4.20"}
|
||||||
mlua = {version="0.8.10", features=["luajit"]}
|
mlua = {version="0.8.10",features=["luajit"]}
|
||||||
redis = {version="0.23.2", features=["tokio-comp", "connection-manager"]}
|
redis = {version="0.23.2",features=["tokio-comp","connection-manager"]}
|
||||||
md5 = {version="0.7.0"}
|
md5 = {version="0.7.0"}
|
||||||
rand={version="0.8.5"}
|
rand={version="0.8.5"}
|
||||||
|
once_cell = {version="1.18.0"}
|
||||||
error-stack = {version="0.4.0"}
|
error-stack = {version="0.4.0"}
|
||||||
async-trait = {version="0.1.73"}
|
async-trait = {version="0.1.73"}
|
||||||
regex = {version="1.9.4", features=["perf"]}
|
regex = {version="1.9.4", features=["perf"]}
|
||||||
|
@ -19,7 +19,7 @@ COPY . .
|
|||||||
RUN cargo install --path .
|
RUN cargo install --path .
|
||||||
|
|
||||||
# We do not need the Rust toolchain to run the binary!
|
# We do not need the Rust toolchain to run the binary!
|
||||||
FROM gcr.io/distroless/cc-debian11
|
FROM gcr.io/distroless/cc-debian12
|
||||||
COPY --from=builder /app/public/ /opt/websurfx/public/
|
COPY --from=builder /app/public/ /opt/websurfx/public/
|
||||||
COPY --from=builder /app/websurfx/config.lua /etc/xdg/websurfx/config.lua
|
COPY --from=builder /app/websurfx/config.lua /etc/xdg/websurfx/config.lua
|
||||||
COPY --from=builder /usr/local/cargo/bin/* /usr/local/bin/
|
COPY --from=builder /usr/local/cargo/bin/* /usr/local/bin/
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<b align="center"><a href="README.md">Readme</a></b> |
|
<b align="center"><a href="README.md">Readme</a></b> |
|
||||||
<b><a href="https://discord.gg/SWnda7Mw5u">Discord</a></b> |
|
<b><a href="https://discord.gg/SWnda7Mw5u">Discord</a></b> |
|
||||||
<b><a href="https://github.com/neon-mmd/websurfx">GitHub</a></b> |
|
<b><a href="https://github.com/neon-mmd/websurfx">GitHub</a></b> |
|
||||||
<b><a href="./docs/README.md">Documentation</a></b>
|
<b><a href="../../tree/HEAD/docs/">Documentation</a></b>
|
||||||
<br /><br />
|
<br /><br />
|
||||||
<a href="#">
|
<a href="#">
|
||||||
<img
|
<img
|
||||||
|
@ -109,7 +109,7 @@ colorscheme = "catppuccin-mocha" -- the colorscheme name which should be used fo
|
|||||||
theme = "simple" -- the theme name which should be used for the website
|
theme = "simple" -- the theme name which should be used for the website
|
||||||
|
|
||||||
-- ### Caching ###
|
-- ### Caching ###
|
||||||
redis_connection_url = "redis://redis:6379" -- redis connection url address on which the client should connect on.
|
redis_url = "redis://redis:6379" -- redis connection url address on which the client should connect on.
|
||||||
|
|
||||||
-- ### Search Engines ###
|
-- ### Search Engines ###
|
||||||
upstream_search_engines = { DuckDuckGo = true, Searx = false } -- select the upstream search engines from which the results should be fetched.
|
upstream_search_engines = { DuckDuckGo = true, Searx = false } -- select the upstream search engines from which the results should be fetched.
|
||||||
|
@ -214,6 +214,7 @@ async fn results(
|
|||||||
.await?
|
.await?
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
results.add_style(&config.style);
|
results.add_style(&config.style);
|
||||||
redis_cache
|
redis_cache
|
||||||
.clone()
|
.clone()
|
||||||
|
Loading…
Reference in New Issue
Block a user