From 22a644ba01e94b3a7a3d531af7199f3d0a612db6 Mon Sep 17 00:00:00 2001 From: sjorsdonkers <72333389+sjorsdonkers@users.noreply.github.com> Date: Fri, 4 Jul 2025 09:53:13 +0200 Subject: [PATCH] rename tls_in_tls to tlsproxy --- src/http/client.zig | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/http/client.zig b/src/http/client.zig index cbb0f546..462a26e7 100644 --- a/src/http/client.zig +++ b/src/http/client.zig @@ -322,7 +322,7 @@ const Connection = struct { const TLSClient = union(enum) { blocking: tls.Connection(std.net.Stream), - blocking_tls_in_tls: struct { + blocking_tlsproxy: struct { proxy: tls.Connection(std.net.Stream), // Note, self-referential field. Proxy should be pinned in memory. destination: tls.Connection(*tls.Connection(std.net.Stream)), }, @@ -331,7 +331,7 @@ const Connection = struct { fn close(self: *TLSClient) void { switch (self.*) { .blocking => |*tls_client| tls_client.close() catch {}, - .blocking_tls_in_tls => |*tls_in_tls| { + .blocking_tlsproxy => |*tls_in_tls| { tls_in_tls.destination.close() catch {}; tls_in_tls.proxy.close() catch {}; }, @@ -698,13 +698,13 @@ pub const Request = struct { if (self._request_secure) { // If secure endpoint, create the main TLS stream encapsulated into the TLS stream proxy self._connection.?.tls = .{ - .blocking_tls_in_tls = .{ + .blocking_tlsproxy = .{ .proxy = proxy_conn.tls.*, .destination = undefined, }, }; - const proxy = &self._connection.?.tls.?.blocking_tls_in_tls.proxy; - self._connection.?.tls.?.blocking_tls_in_tls.destination = try tls.client(proxy, tls_config); + const proxy = &self._connection.?.tls.?.blocking_tlsproxy.proxy; + self._connection.?.tls.?.blocking_tlsproxy.destination = try tls.client(proxy, tls_config); } else { // Otherwise, just use the TLS stream proxy self._connection.?.tls = .{ .blocking = proxy_conn.tls.* }; @@ -1778,8 +1778,8 @@ const SyncHandler = struct { .blocking => |*blocking| { break :blk .{ .tls = blocking }; }, - .blocking_tls_in_tls => |*blocking_tls_in_tls| { - break :blk .{ .tls_in_tls = &blocking_tls_in_tls.destination }; + .blocking_tlsproxy => |*blocking_tlsproxy| { + break :blk .{ .tls_in_tls = &blocking_tlsproxy.destination }; }, } }