dudik / blockit

WebKitGTK adblock extension with Brave's Rust-based adblock engine for backend.
GNU General Public License v3.0
53 stars 1 forks source link

Consider showing a message when the server failed to start #4

Open lanodan opened 3 years ago

lanodan commented 3 years ago

Hi With WebKitGTK sandbox activated (as it is in my own browser, badwolf) it shouldn't be possible to start the server, I think there should be an error message (fprintf(stderr, …) or maybe a GTK popup if that can work) instead of silently exiting.

(Also not sure if /tmp/ars is reachable in the sandbox, it probably isn't)

dudik commented 3 years ago

BlocKit should now show a dialog window when the server can't be started. Thank you.

Regarding the sandboxing, I wasn't able to run badwolf on my system as the web process crashes because the browser doesn't have permissions to access /var/cache/fontconfig, so it will take some time.

Overall, I just heard about the sandboxing API and I'm not completely sure how to go about accessing /tmp/ars. Maybe using webkit_web_context_add_path_to_sandbox?

lanodan commented 3 years ago

Regarding the sandboxing, I wasn't able to run badwolf on my system as the web process crashes because the browser doesn't have permissions to access /var/cache/fontconfig, so it will take some time.

Weird kind of issue as it is in the allowed paths:

https://github.com/WebKit/WebKit/blob/main/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp#L443

Overall, I just heard about the sandboxing API and I'm not completely sure how to go about accessing /tmp/ars. Maybe using webkit_web_context_add_path_to_sandbox?

Yeah, this should be the correct function, hopefully ReadWrite permissions in the sandbox are enough to connect to a socket.