Skip to content

GOWA - WhatsApp REST API with support for UI, Multi Account, Webhooks, and MCP, and Chatwoot. Built with Golang for efficient memory use.

488 B
Raw Blame
package whatsapp

import "testing"

func TestRedactProxyURLMasksUserinfo(t *testing.T) {
	for raw, want := range map[string]string{
		"ftp://[email protected]:1080": "ftp://***@proxy.internal:1080",
		"socks5://user:[email protected]:1080": "socks5://***@proxy.internal:1080",
		"http://proxy.internal:8080":             "http://proxy.internal:8080",
	} {
		if got := redactProxyURL(raw); got != want {
			t.Fatalf("redactProxyURL(%q) = %q, want %q", raw, got, want)
		}
	}
}