add direct http proxy support

This commit is contained in:
Karl Seguin
2025-05-13 18:21:16 +08:00
parent 7bb6506709
commit e918a0bf26
5 changed files with 121 additions and 52 deletions

View File

@@ -30,6 +30,7 @@ pub const App = struct {
run_mode: RunMode,
gc_hints: bool = false,
tls_verify_host: bool = true,
http_proxy: ?std.Uri = null,
};
pub fn init(allocator: Allocator, config: Config) !*App {
@@ -54,6 +55,7 @@ pub const App = struct {
.app_dir_path = app_dir_path,
.notification = notification,
.http_client = try HttpClient.init(allocator, 5, .{
.http_proxy = config.http_proxy,
.tls_verify_host = config.tls_verify_host,
}),
.config = config,