[webkit-gtk] [Q] block all network accesses – how?

Albrecht Dreß albrecht.dress at posteo.de
Thu Aug 3 11:48:51 PDT 2023

Am 02.08.23 23:45 schrieb(en) Michael Catanzaro:
> Another problem is that HTTP requests are probably not the only way that network usage can happen, e.g. WebRTC or WebSockets presumably won't go through send-request. Not sure what to do about that.

Good point…

> On Wed, Aug 2 2023 at 06:46:04 PM +0000, Albrecht Dreß <albrecht.dress at posteo.de> wrote:
>> 	g_signal_connect(web_page, "send-request", G_CALLBACK(send_request_cb), NULL);
>> and the latter callback changes the request URI to
>> 	webkit_uri_request_set_uri(request, "about:blank");
> It's probably better to return TRUE to block the request.

Doesn't change the result – the connect() still happens, and in the case of a https request even the tls handshake is performed (which is even worse IMHO, as it discloses more information about the system).

>> I see… so I should create a bug report in bugzilla?
> Yes, if the problem still occurs after changing your code to return TRUE (likely), then please do. The simpler your reproducer, the better chance of it getting fixed.

See <https://bugs.webkit.org/show_bug.cgi?id=259787>, includes the test case and the tcpdump output from my box.

Thanks a lot for your help,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.webkit.org/pipermail/webkit-gtk/attachments/20230803/26eb98c3/attachment.bin>

More information about the webkit-gtk mailing list