From 636579945e1a9b2ac59922ca4ae915893f3981c8 Mon Sep 17 00:00:00 2001 From: xavo95 Date: Fri, 1 Nov 2024 20:31:55 +0100 Subject: [PATCH] Remove /index.json redirect and allow customizable config server by env --- src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib.rs b/src/lib.rs index 1be75d3..caae7d5 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -82,6 +82,7 @@ unsafe extern "win64" fn on_kurohttp_get(reg: *mut Registers, _: usize) { if let Some(result) = replacer.replace(url.as_str()) { println!("Redirecting to: {result}"); + // TODO: Track https://doc.rust-lang.org/nightly/unstable-book/library-features/str-from-utf16-endian.html to replace widestring when stabilized let new_url = widestring::U16String::from_str(result.as_str()); let new_wstr = PCWSTR::from_raw(new_url.as_ptr()); std::ptr::copy_nonoverlapping(new_wstr.as_ptr(), wstr, new_wstr.as_wide().len() + 2);