mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-14 14:11:23 -04:00
add some more test for URL encoded IPs (safelog)
This commit is contained in:
parent
839d221883
commit
11c3333856
1 changed files with 25 additions and 0 deletions
|
@ -82,6 +82,31 @@ func TestLogScrubberMessages(t *testing.T) {
|
|||
"error dialing relay: wss://snowflake.torproject.net/?client_ip=6201%3ac8%3A3004%3A%3A1234",
|
||||
"error dialing relay: wss://snowflake.torproject.net/?client_ip=[scrubbed]\n",
|
||||
},
|
||||
{
|
||||
// make sure url encoded IPv6 IPs get scrubbed (%3a)
|
||||
"http2: panic serving [fd00%3a111%3af000%3a777%3a9999%3abbbb%3affff%3adddd]:58344: xxx",
|
||||
"http2: panic serving [scrubbed]: xxx\n",
|
||||
},
|
||||
{
|
||||
// make sure url encoded IPv6 IPs get scrubbed (%3A)
|
||||
"http2: panic serving [fd00%3a111%3af000%3a777%3a9999%3abbbb%3affff%3adddd]:58344: xxx",
|
||||
"http2: panic serving [scrubbed]: xxx\n",
|
||||
},
|
||||
{
|
||||
// make sure url encoded IPv6 IPs get scrubbed, different URL (%3A)
|
||||
"error dialing relay: wss://snowflake.torproject.net/?client_ip=fd00%3A8888%3Abbbb%3Acccc%3Adddd%3Aeeee%3A2222%3A123 = dial tcp xxx",
|
||||
"error dialing relay: wss://snowflake.torproject.net/?client_ip=[scrubbed] = dial tcp xxx\n",
|
||||
},
|
||||
{
|
||||
// make sure url encoded IPv6 IPs get scrubbed (%3A), compressed
|
||||
"http2: panic serving [1%3A2%3A3%3A%3Ad%3Ae%3Af]:55: xxx",
|
||||
"http2: panic serving [scrubbed]: xxx\n",
|
||||
},
|
||||
{
|
||||
// make sure url encoded IPv6 IPs get scrubbed (%3A), compressed
|
||||
"error dialing relay: wss://snowflake.torproject.net/?client_ip=1%3A2%3A3%3A%3Ad%3Ae%3Af = dial tcp xxx",
|
||||
"error dialing relay: wss://snowflake.torproject.net/?client_ip=[scrubbed] = dial tcp xxx\n",
|
||||
},
|
||||
} {
|
||||
var buff bytes.Buffer
|
||||
log.SetFlags(0) //remove all extra log output for test comparisons
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue