mirror of
https://github.com/neon-mmd/websurfx.git
synced 2025-01-05 02:58:23 -05:00
Merge branch 'rolling' into FEAT/427_export-import-settings-to-and-from-a-json-file-support-for-the-ui
This commit is contained in:
commit
8d15709648
19
.mergify.yml
19
.mergify.yml
@ -1,13 +1,14 @@
|
||||
pull_request_rules:
|
||||
- name: Automatic merge on approval
|
||||
conditions:
|
||||
queue_rules:
|
||||
- name: default
|
||||
queue_conditions:
|
||||
- "#approved-reviews-by>=2"
|
||||
- check-success=build (stable)
|
||||
- check-success=CodeFactor
|
||||
- check-success=Rust project
|
||||
actions:
|
||||
queue:
|
||||
method: squash
|
||||
merge_conditions: []
|
||||
merge_method: squash
|
||||
|
||||
pull_request_rules:
|
||||
- name: automatic update of pull requests where more 5 commits behind
|
||||
conditions:
|
||||
- "#commits-behind>5"
|
||||
@ -17,4 +18,8 @@ pull_request_rules:
|
||||
conditions:
|
||||
- merged
|
||||
actions:
|
||||
delete_head_branch: {}
|
||||
delete_head_branch: {}
|
||||
- name: Automatic merge on approval
|
||||
conditions: []
|
||||
actions:
|
||||
queue:
|
||||
|
1070
Cargo.lock
generated
1070
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
10
Cargo.toml
10
Cargo.toml
@ -26,13 +26,13 @@ tokio = { version = "1.41.0", features = [
|
||||
"fs",
|
||||
"io-util",
|
||||
], default-features = false }
|
||||
serde = { version = "1.0.209", default-features = false, features = ["derive"] }
|
||||
serde = { version = "1.0.215", default-features = false, features = ["derive"] }
|
||||
serde_json = { version = "1.0.122", default-features = false }
|
||||
bincode = {version="1.3.3", default-features=false}
|
||||
maud = { version = "0.26.0", default-features = false, features = [
|
||||
"actix-web",
|
||||
] }
|
||||
scraper = { version = "0.20.0", default-features = false }
|
||||
scraper = { version = "0.21.0", default-features = false }
|
||||
actix-web = { version = "4.9.0", features = [
|
||||
"cookies",
|
||||
"macros",
|
||||
@ -52,7 +52,7 @@ redis = { version = "0.27.5", features = [
|
||||
"connection-manager",
|
||||
"tcp_nodelay"
|
||||
], default-features = false, optional = true }
|
||||
blake3 = { version = "1.5.4", default-features = false }
|
||||
blake3 = { version = "1.5.5", default-features = false }
|
||||
error-stack = { version = "0.5.0", default-features = false, features = [
|
||||
"std",
|
||||
] }
|
||||
@ -79,7 +79,7 @@ base64 = { version = "0.21.5", default-features = false, features = [
|
||||
"std",
|
||||
], optional = true }
|
||||
cfg-if = { version = "1.0.0", default-features = false, optional = true }
|
||||
keyword_extraction = { version = "1.4.3", default-features = false, features = [
|
||||
keyword_extraction = { version = "1.5.0", default-features = false, features = [
|
||||
"tf_idf",
|
||||
"rayon",
|
||||
] }
|
||||
@ -96,7 +96,7 @@ actix-multipart = { version = "0.7.2", default-features = false, features = [
|
||||
[dev-dependencies]
|
||||
rusty-hook = { version = "^0.11.2", default-features = false }
|
||||
criterion = { version = "0.5.1", default-features = false }
|
||||
tempfile = { version = "3.13.0", default-features = false }
|
||||
tempfile = { version = "3.14.0", default-features = false }
|
||||
|
||||
[build-dependencies]
|
||||
lightningcss = { version = "1.0.0-alpha.57", default-features = false, features = [
|
||||
|
@ -53,6 +53,8 @@ pub struct Config {
|
||||
pub proxy: Option<Proxy>,
|
||||
/// It stores the number of https connections to keep in the pool.
|
||||
pub number_of_https_connections: u8,
|
||||
/// It stores the operating system's TLS certificates for https requests.
|
||||
pub operating_system_tls_certificates: bool,
|
||||
}
|
||||
|
||||
impl Config {
|
||||
@ -132,6 +134,8 @@ impl Config {
|
||||
});
|
||||
|
||||
Ok(Config {
|
||||
operating_system_tls_certificates: globals
|
||||
.get::<_, bool>("operating_system_tls_certificates")?,
|
||||
port: globals.get::<_, u16>("port")?,
|
||||
binding_ip: globals.get::<_, String>("binding_ip")?,
|
||||
style: Style::new(
|
||||
|
@ -83,6 +83,8 @@ pub async fn aggregate(
|
||||
.tcp_keepalive(Duration::from_secs(config.tcp_connection_keep_alive as u64))
|
||||
.pool_max_idle_per_host(config.number_of_https_connections as usize)
|
||||
.connect_timeout(Duration::from_secs(config.request_timeout as u64)) // Add timeout to request to avoid DDOSing the server
|
||||
.use_rustls_tls()
|
||||
.tls_built_in_root_certs(config.operating_system_tls_certificates)
|
||||
.https_only(true)
|
||||
.gzip(true)
|
||||
.brotli(true)
|
||||
|
@ -19,6 +19,8 @@ rate_limiter = {
|
||||
-- Set whether the server will use an adaptive/dynamic HTTPS window size, see https://httpwg.org/specs/rfc9113.html#fc-principles
|
||||
https_adaptive_window_size = false
|
||||
|
||||
operating_system_tls_certificates = true -- Set whether the server will use operating system's tls certificates alongside rustls certificates while fetching search results from the upstream engines.
|
||||
|
||||
number_of_https_connections = 10 -- the number of https connections that should be available in the connection pool.
|
||||
-- Set keep-alive timer in seconds; keeps clients connected to the HTTP server, different from the connection to upstream search engines
|
||||
client_connection_keep_alive = 120
|
||||
|
Loading…
Reference in New Issue
Block a user