I am using Geckofx v18 for a C# application.
Is it possible to configure it to block certain domains? If so, how.
Update: I want to do this to block certain external images from loading on a website as they are consuming excess bandwidth. Also, I use ip:port proxies, so it should work with that set too.
You can block images from loading from domain using firefox. how to block images from domains using firefox
Firefox writes this into a permissions.sqlite file.
Add the domains you wish to block to firefox then if you copy this file over to the geckofx profile directory and replace the permissions.sqlite file there it will cause geckofx to block the required images.
Your Geckofx profile will likely be in a folder like:
C:\Users\%USER%\AppData\Local\Geckofx\DefaultProfile
Your Firefox profile will likely be in a folder something like:
C:\Users\%USER%\AppData\Roaming\Mozilla\Firefox\Profiles\2boeeqja.default
To set permissions from C# (rather than in Firefox and copying the permissions.sqlite file) you can prolly use the nsIPermissionManager interface. you can create an instance of one like so:
var instance = Xpcom.CreateInstance<nsIPermissionManager>("@mozilla.org/permissionmanager;1");
More information about nsIPermissionManager can be found here