Yaak Proxy: name the host when decryption isn't configured for it

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Gregory SchierandClaude Opus 5.5 authored and Stetta task tk_mwb56agvne2hw21h committed 2026-11-10 22:30:40 -07:00
1 parent f5ff9cb63e
commit ae666adfb7
2 files changed
+25 -5

No files matched your search

+11 -1
View File
@@ -91,7 +91,7 @@ describe("the card of an encrypted connection", () => {
test("something else listed: not on the list, with the same choices", () => {
const c = card({ list: [...user("host:api.stripe.com"), ...BUILT_INS] });
expect(c.why).toBe("Not on the decrypt list");
expect(c.why).toBe("Decryption not configured for www.google.com");
expect(c.actions.map((a) => a.label)).toEqual([
"Decrypt www.google.com",
"Decrypt Dia",
@@ -106,6 +106,16 @@ describe("the card of an encrypted connection", () => {
expect(c.actions.map((a) => a.label)).toEqual(["Decrypt www.google.com", "Decrypt Everything"]);
});
test("names the host nothing on the list covers, its port only when not 443", () => {
const list = [...user("host:api.stripe.com"), ...BUILT_INS];
expect(card({ list, flow: { ...tunnel, url: "t.yaak.app:443" } }).why).toBe(
"Decryption not configured for t.yaak.app",
);
expect(card({ list, flow: { ...tunnel, url: "home.ts.net:8317" } }).why).toBe(
"Decryption not configured for home.ts.net:8317",
);
});
test("a port off 443 is part of the host it writes", () => {
const c = card({ flow: { ...tunnel, url: "home.ts.net:8317" } });
expect(c.actions[0]?.hint).toBe("host:home.ts.net:8317");