Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

possibility of deploying custom lists? #531

Closed
vtknightmare opened this issue Jul 26, 2015 · 14 comments
Closed

possibility of deploying custom lists? #531

vtknightmare opened this issue Jul 26, 2015 · 14 comments

Comments

@vtknightmare
Copy link

I was wondering if it was possible to deploy a custom list of 3rd party filters. I am deploying ublock origin across my domain and have also tweeted to you in hopes of hearing if there is a possibility of making this happen. By giving us systems guys such capability we can ensure our users are not hindered by the various lists while also tweaking as needed to enable access to the sites that might be blocked but needed.

@gorhill
Copy link
Owner

gorhill commented Jul 26, 2015

have also tweeted to you in hopes of hearing if there is a possibility of making this happen

Sorry, I visit Twitter once in a while, so it's not the best place to contact me, GitHub is really where I am most of the time.

Admin stuff is really not my expertise, so I am not sure about what can be done. What browser are we talking about here?

Someone on Wilders Security posted a link to this page, so it appears someone is deploying uBlock Origin, though I don't know if using only default or using custom settings.

@vtknightmare
Copy link
Author

Thanks for getting back to me. Well, what I was hoping for was the ability
to push a file (or registry key) post-deployment which overrode the 3rd
party filters uBlock-0 used. This way, for example say we got a ticket
where we identified one of the default lists was blocking a site we needed
the users to be using, or we (the systems people) wanted to push exception
sites list i.e. ignore *.domain.com to ensure uBlock wasn't the problem
when debugging a webapp etc.

Do you think you could help? I am a systems engineer for an academic
institution and plan on rolling out your plugin to roughly 150+ systems
next week. Such a feature would come in quite handy in case of any
"oopsies" post-deployment.

Thanks and looking forward to your reply friend :)
On Jul 26, 2015 8:28 AM, "Raymond Hill" [email protected] wrote:

have also tweeted to you in hopes of hearing if there is a possibility of
making this happen

Sorry, I visit Twitter once in a while, so it's not the best place to
context me, GitHub is really where I am most of the time.

Admin stuff is really not my expertise, so I am not sure about what can be
done. What browser are we talking about here?

Someone on Wilders Security posted a link
http://www.wilderssecurity.com/threads/ublock-a-lean-and-fast-blocker.365273/page-55#post-2506161
to this page http://decentsecurity.com/ublock-for-firefox-deployment/,
so it appears someone is deploying uBlock Origin, though I don't know if
using only default or using custom settings.


Reply to this email directly or view it on GitHub
#531 (comment).

@gorhill
Copy link
Owner

gorhill commented Jul 26, 2015

push a file (or registry key)

uBlock as an extension can't access local file system or registry -- extensions are isolated from the system on which they run, except through whatever API the browser provide.

For Chromium-based browsers, it seems chrome.storage.managed is what is needed:

Items in the managed storage area are set by the domain administrator, and are read-only for the extension; trying to modify this namespace results in an error.

For Firefox, an about:config entry could be used I suppose, if an admin could push such setting to all computers.

@vtknightmare
Copy link
Author

Yes I can push about:config settings via CCK2. My question is what would
the setting(s) be to be able to override the 3rd party filters in use, or
to be able to push out custome domain exceptions as mentioned before.
On Jul 26, 2015 4:34 PM, "Raymond Hill" [email protected] wrote:

push a file (or registry key)

uBlock as an extension can't access local file system or registry --
extensions are isolated from the system on which they run, except through
whatever API the browser provide.

For Chromium-based browsers, it seems chrome.storage.manage is what is
needed:

Items in the managed storage area are set by the domain administrator, and
are read-only for the extension; trying to modify this namespace results in
an error.

For Firefox, an about:config could be used I suppose, if an admin could
push such setting to all computers.


Reply to this email directly or view it on GitHub
#531 (comment).

@gorhill
Copy link
Owner

gorhill commented Jul 26, 2015

I am thinking about a JSON string, which would contains the uBlock settings which must override the local ones -- and that the layout of this JSON string would match that of the one created when uBlock creates a backup.

  1. See if said setting in about:config is present;
  2. If so, parse as JSON string;
  3. For each property, overwrite the local one;
  4. Once done, continue initializing uBlock the usual way;

So admin configure uBlock, create a backup, take backup and remove whatever is not meant to be locally overwritten, use the resulting JSON as a string in the about:config entry (after removing newlines?), and uBlock will make use of this entry according to steps above.

@vtknightmare
Copy link
Author

That would be PERFECT! Looking forward to it.
On Jul 26, 2015 5:01 PM, "Raymond Hill" [email protected] wrote:

I am thinking about a JSON string, which would contains the uBlock
settings which must override the local ones -- and that the layout of this
JSON string would match that of the one created when uBlock creates a
backup.

  1. See if said setting in about:config is present;
  2. If so, parse as JSON string;
  3. For each property, overwrite the local one;
  4. Once done, continue initializing uBlock the usual way;

So admin configure uBlock, create a backup, take backup and remove
whatever is not meant to be locally overwritten, use the resulting JSON as
a string in the about:config entry (after removing newlines?), and uBlock
will make use of this entry according to steps above.


Reply to this email directly or view it on GitHub
#531 (comment).

gorhill added a commit that referenced this issue Jul 27, 2015
@gorhill
Copy link
Owner

gorhill commented Jul 27, 2015

For Firefox, the following about:config entry is looked up:

extensions.ublock0.adminSettings

Must be valid, parsable json string. Layout is same as that created through uBlock's backup file. Admins can remove entries, those which are left to the user's choice.

Keep in mind the extensions.ublock0.adminSettings is removed when uBlock is uninstalled. If it is an issue, I could read this setting from another config location.

For Chromium, the adminSettings entry is looked up in the localStorage of the extension itself (probably will require change to use the proper managed storage).

In latest release (1.0.0.1).

@vtknightmare
Copy link
Author

gorhill,

Is this already implemented, or to be implemented?

On Mon, Jul 27, 2015 at 10:17 AM, Raymond Hill [email protected]
wrote:

For Firefox, the following about:config entry is looked up:

extensions.ublock0.adminSettings

Must be valid, parsable json string. Layout is same as that created
through uBlock's backup file. Admins can removed entries, those which are
left to the user's choice.

For Chromium, the adminSettings entry is looked up in the localStorage of
the extension itself.


Reply to this email directly or view it on GitHub
#531 (comment).

@gorhill
Copy link
Owner

gorhill commented Jul 28, 2015

It's implemented, in the latest dev build.

@ghost
Copy link

ghost commented Aug 4, 2015

By any chance, would it be possible to implement a "subscription" feature (it could work with the admin if needed).

Basically, subscribe to blocking rules, update them on server, extension fetches update. Admin could simply include the lists.

I manage lots of txt files with "profiles", especially because I use some browsers, but don't want to enable sync (if that even works), and it has gotten very tedious at this point to continue managing them, then importing all the changes (and removing old stuff) from the extension.

@gorhill
Copy link
Owner

gorhill commented Aug 14, 2015

By any chance, would it be possible to implement a "subscription" feature (it could work with the admin if needed).

I will give some thoughts to this. One "bad" side effect though is this could delay uBlock's startup time if it needs to fetch settings from a remote location. But then this would affect only those who use such feature. In any case, it sort of fits well with what has been implemented here.

@gorhill
Copy link
Owner

gorhill commented Aug 14, 2015

I did not receive feedback regarding this feature from OP, but I did receive sort-of feedback through issue #592 (i.e. looks like it's working as intended).

@quertest
Copy link

I would like to use a Mozilla.cfg file to predefine ublock0 admin settings like this:

pref("extensions.ublock0.adminSettings.externalLists", "! Examples:\n! https://.....");
lockPref("extensions.ublock0.adminSettings.cloudStorageEnabled", true);
lockPref("extensions.ublock0.adminSettings.webrtcIPAddressHidden", true);

Is this possible?

@gorhill
Copy link
Owner

gorhill commented Mar 22, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants