Skip to content

Commit 5bc58cb

Browse files
committed
EXPERIMENTAL
1 parent d188fef commit 5bc58cb

File tree

4 files changed

+29
-15
lines changed

4 files changed

+29
-15
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "fit-launcher",
3-
"version": "2.3.0-2",
3+
"version": "2.3.0-3",
44
"description": "",
55
"type": "module",
66
"scripts": {

src-tauri/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ fitgirl-decrypt = { version = "0.3.5", default-features = false, features = [
152152
"reqwest",
153153
] }
154154

155+
# TODO: Add Specta.
155156

156157
[features]
157158
# This feature is used for production builds or when a dev server is not specified, DO NOT REMOVE!!

src-tauri/local-crates/fit-launcher-config/src/client/dns.rs

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -209,23 +209,36 @@ impl Resolve for HickoryResolverWithProtocol {
209209
}
210210

211211
// Only ONE custom_dns_client, protocol decided by the DnsConfig file found in the
212+
// pub static CUSTOM_DNS_CLIENT: Lazy<Client> = Lazy::new(|| {
213+
// let dns_config = ensure_and_load_dns_config();
214+
215+
// // * Important : The pool_max_idle_per_host should never be greater than 0 due to the "runtime dropped the dispatch task" error that can happen when running awaiting task into multiple streams.
216+
// // * Even in terms of performance it will only be a 5% to 10% increase but the drawback is too big and this is too unstable.
217+
// let mut client_builder = ClientBuilder::new()
218+
// .use_rustls_tls()
219+
// .gzip(true)
220+
// .brotli(true)
221+
// .user_agent("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36")
222+
// .pool_max_idle_per_host(0);
223+
224+
// // Conditionally set the custom DNS resolver only if sys_conf is disabled
225+
// if !dns_config.system_conf {
226+
// client_builder =
227+
// client_builder.dns_resolver(Arc::new(HickoryResolverWithProtocol::new(dns_config)));
228+
// }
229+
230+
// client_builder
231+
// .build()
232+
// .expect("Failed to build custom DNS reqwest client")
233+
// });
234+
235+
//TODO: test for no client.
212236
pub static CUSTOM_DNS_CLIENT: Lazy<Client> = Lazy::new(|| {
213-
let dns_config = ensure_and_load_dns_config();
237+
// let dns_config = ensure_and_load_dns_config();
214238

215239
// * Important : The pool_max_idle_per_host should never be greater than 0 due to the "runtime dropped the dispatch task" error that can happen when running awaiting task into multiple streams.
216240
// * Even in terms of performance it will only be a 5% to 10% increase but the drawback is too big and this is too unstable.
217-
let mut client_builder = ClientBuilder::new()
218-
.use_rustls_tls()
219-
.gzip(true)
220-
.brotli(true)
221-
.user_agent("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36")
222-
.pool_max_idle_per_host(0);
223-
224-
// Conditionally set the custom DNS resolver only if sys_conf is disabled
225-
if !dns_config.system_conf {
226-
client_builder =
227-
client_builder.dns_resolver(Arc::new(HickoryResolverWithProtocol::new(dns_config)));
228-
}
241+
let client_builder = ClientBuilder::new().pool_max_idle_per_host(0);
229242

230243
client_builder
231244
.build()

src-tauri/tauri.conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
},
3131
"productName": "Fit Launcher",
3232
"mainBinaryName": "Fit Launcher",
33-
"version": "2.3.0-2",
33+
"version": "2.3.0-3",
3434
"identifier": "com.fitlauncher.carrotrub",
3535
"plugins": {
3636
"updater": {

0 commit comments

Comments
 (0)