Something went wrong. Try again.
jetstream v2 in zig stream.waow.tech
Something went wrong. Try again.
123456789101112131415161718192021222324const std = @import("std");const fetched_car = @import("internal/ingest/backfill/fetched_car.zig");
pub fn main(init: std.process.Init) !void { const allocator = init.gpa; const io = init.io; for ([_][]const u8{ "https://dv-g3b-emudhra.we-have-a-problem.com", "https://dv-g3b-aaa-emudhra.we-have-a-problem.com", "https://emudhra.divy.zone", "https://atproto.com", }, 0..) |url, index| { var host: fetched_car.FinalHost = .{}; var outcome = fetched_car.fetchOnce(allocator, io, "/tmp/stream-tls-probe", url, "did:plc:tlsprobe", &host) catch |err| { if (index == 3 or (err != error.TlsCertificateNotVerified and err != error.TlsInitializationFailed)) return err; std.debug.print("{s}: TLS rejected ({s})\n", .{ url, @errorName(err) }); continue; }; if (outcome == .ok) outcome.ok.deinit(io); if (index != 3) return error.CompromisedCertificateAccepted; std.debug.print("{s}: valid control accepted\n", .{url}); }}