Choose style:

Author Topic: UnlockMe App  (Read 848 times)

0 Members and 1 Guest are viewing this topic.

Offline ralphy

  • nOOb
  • *
  • Posts: 18
  • Karma: 6
  • New Forum User
    • View Profile
  • Peppermint version(s): 8
Re: UnlockMe App
« Reply #15 on: February 09, 2018, 02:10:22 am »
A new feature was added to UnlockMe at GH; Blacklist Generator.

Blacklist Generator is somewhat similar to Peppermint Advert Blocker in its concept. I have used these generated lists mostly for pfsense security appliances so why not bring it to UnlockMe after all :)

Blacklist Generator creates dnsmasq blacklists and applies it to the system via Network Manager instead of using the /etc/hosts file. It gets well known/maintained blacklists from Github and few other sources depending on user's selection, allowing users to block not only advertising but also tracking, adware, malware, porn, fake news, social and gambling domains. Additionally, it also allows users to whitelist domains.












Online PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 20422
  • Karma: 2319
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 8 Respin & 9 Alpha
Re: UnlockMe App
« Reply #16 on: February 09, 2018, 08:25:01 am »
I love the idea of being able to whitelist and the ability to add your own blocks .. that's a definite improvement over our advert-blocker, as is the fact it's finer grained in the blocklist selection :)

I'm seriously tempted to take advantage of the GPL2 here and steal borrow appropriate make use of the freedoms accorded :))

ralphy, can I make a very mall suggestion .. [Quit] [Authenticate] [Continue] doesn't quite look right, and doesn't fit the layout of most Linux dialogs .. wouldn't:-

[Authenticate] [Cancel] [Continue]

be more consistent with most other system dialogs ?

Surely [Quit] and [Continue] should be next to each other (?) .. but [Quit] is generally [Cancel] in the rest of the system these days.

I know it's a small niggle, but it was the first thing that struck me as soon as I saw the first pic .. maybe I'm being overly critical and possibly even incorrect but something about those buttons jumped out at me as wrong/awkward ???
« Last Edit: February 09, 2018, 08:48:32 am by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline ralphy

  • nOOb
  • *
  • Posts: 18
  • Karma: 6
  • New Forum User
    • View Profile
  • Peppermint version(s): 8
Re: UnlockMe App
« Reply #17 on: February 09, 2018, 12:33:47 pm »
Yes, you're right! 



I actually replaced advert-blocker.sh with this in my system. I would happily send you the code. There are small differences between the two. For example, advert-blocker users gksu/gksudo while I prefer pkexec which allows to execute the application from a standard user account.  gksu doesn't prompt for username and password, only for password; so in a multi-user system you cannot elevate and use the application if running it from a non sudoer account.

With that said, advert-blocker.sh in my peppermint uses gksu instead of pkexec, leaving pkexec for UnlockMe only.
« Last Edit: February 09, 2018, 01:22:14 pm by ralphy »

Online PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 20422
  • Karma: 2319
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 8 Respin & 9 Alpha
Re: UnlockMe App
« Reply #18 on: February 09, 2018, 03:14:18 pm »
That's much better and has quietened my tendency towards anal retentiveness :)

Yes please, could you PM me the code (or a link), I'd appreciate that my mate.
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline ralphy

  • nOOb
  • *
  • Posts: 18
  • Karma: 6
  • New Forum User
    • View Profile
  • Peppermint version(s): 8
Re: UnlockMe App
« Reply #19 on: February 09, 2018, 07:32:02 pm »
Yes please, could you PM me the code (or a link), I'd appreciate that my mate.

PM sent.

Offline ralphy

  • nOOb
  • *
  • Posts: 18
  • Karma: 6
  • New Forum User
    • View Profile
  • Peppermint version(s): 8
Re: UnlockMe App
« Reply #20 on: February 11, 2018, 12:09:03 am »
PCNetSpec,

I just noticed that at least one of the lists adds bad records to the final blacklist causing dnsmasq and unbound to crash. It wouldn't be so bad if it wasn't because the Internet connection stops working until the blacklist is removed and the Network Manager is restarted  :'(

The good thing about it is that I now have an idea as to what to look for in those lists to do additional cleanups during final blacklist generation; which allows us to add even more lists to the multi-selection section. I had previously removed about eight (8) known lists because of this same issue since I didn't want to put efforts into finding out why it was happening.

Worth mentioning that some of those records could make it to /etc/hosts since there is no verification in place (/etc/hosts doesn't care if the domain name is right or not) - they could be passing through unnoticed.

On the other hand dnsmasq and unbound do care about these records... so something like domain..net isn't acceptable while domain.net IS.

I'll get it cleaned up for now and add other lists as time allows.

Online PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 20422
  • Karma: 2319
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 8 Respin & 9 Alpha
Re: UnlockMe App
« Reply #21 on: February 11, 2018, 07:37:40 am »
Ouch, that's not good .. we'd have a lot of pee'd off users if it killed their web connection and they couldn't figure out why.
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline ralphy

  • nOOb
  • *
  • Posts: 18
  • Karma: 6
  • New Forum User
    • View Profile
  • Peppermint version(s): 8
Re: UnlockMe App
« Reply #22 on: February 11, 2018, 06:02:32 pm »
It's been worked out  ;)

Online PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 20422
  • Karma: 2319
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 8 Respin & 9 Alpha
Re: UnlockMe App
« Reply #23 on: February 12, 2018, 02:34:36 pm »
Hi ralphy,

How likely is this to break again in the future if/when the blocklists get updated by the author ? .. what I'm saying is if I'm not mistaken it seems to rely on the blocklists from a third party remaining formatted correctly yet these blocklists may change.

It all looks great, but isn't it overly sensitive to breakage (that also kills networking) introduced by a third party ?
« Last Edit: February 12, 2018, 02:36:07 pm by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline ralphy

  • nOOb
  • *
  • Posts: 18
  • Karma: 6
  • New Forum User
    • View Profile
  • Peppermint version(s): 8
Re: UnlockMe App
« Reply #24 on: February 12, 2018, 03:47:32 pm »
Hi ralphy,
How likely is this to break again in the future if/when the blocklists get updated by the author ?
It is likely to happen from time to time and for different reasons.

What I've done ( I think we are both on the same page) is to put a failsafe in the app to test the internet connection after applying the blacklist. If the test doesn't succeed then the blacklist is automatically removed and the user is prompted to use fewer Additional lists. Those changes are not yet in the version I sent you.

Quote
.. what I'm saying is if I'm not mistaken it seems to rely on the blocklists from a third party remaining formatted correctly yet these blocklists may change.
It all looks great, but isn't it overly sensitive to breakage (that also kills networking) introduced by a third party ?

Not quite.  These blacklists are properly maintained and they do change all the time. Case in point, I have never had a single issue with StevenBlack hosts list. The issue seems to happen with Additional lists (and not all of them actually). Irrespective, I do believe to have enough failsafe in place not to "leave users with a broken the internet connection".

We also have to weight the importance of blacklisting by top level domains. For example, blocking with DNS as this newer version does right now allows for finer control. An easy way to better see this:

If you add 127.0.0.1 peppermintos.com to your /etc/hosts file you won't be able to access this website but you'll be able to access forum.peppermintos.com. On the other hand, using DNS to block peppermintos.com will also block forum.peppermintos.com.

Case in point, just because we block a domain with /etc/hosts does not mean we are effectively blocking all the subdomains:

/etc/hosts
ads.domain top level domain is blocked  but other.ads.domain is getting through.

DNS
if ads.domain top level domain is blocked, other.ads.domain is also blocked.

Ultimately, both /etc/hosts and DNS blocking are limited on what they do since the only way to really block the traffic is to use firewall rules.

Personally, I'd rather implement DNS blocking over /etc/hosts file.

Watch this video => https://unlockforus.com/downloads/peppermint/blacklist-failsafe.mp4
« Last Edit: February 12, 2018, 05:17:45 pm by ralphy »

Offline bella.mor

  • nOOb
  • *
  • Posts: 9
  • Karma: 6
  • New Forum User
    • View Profile
Re: UnlockMe App
« Reply #25 on: February 12, 2018, 06:57:53 pm »
Achievement unlocked! Congratulations!
I will give your app a try to see how it works, thanks for sharing it with us.
BTW, I am also a newbie and I have decided to signed-up to get some ideas for my future project. See you around!

Offline ralphy

  • nOOb
  • *
  • Posts: 18
  • Karma: 6
  • New Forum User
    • View Profile
  • Peppermint version(s): 8
Re: UnlockMe App
« Reply #26 on: February 14, 2018, 09:54:36 pm »
FYI,  UnlockMe got some more love with few new features...

- Easily enable zswap :) 
- Conduct some extra checks and hint users  to prevent installing conflicting apps (zram, zswap, preload, kernel swappines, etc)
- Moved few dialogs to run without elevation.
- minor code cleanup
- included an install.sh script

To install or update, simply run from terminal:

Code: [Select]
cd /tmp && wget https://raw.githubusercontent.com/ralphys/unlockme/master/install.sh && chmod +x install.sh && ./install.sh
... and install.sh will as for elevation as needed.

Cheers all!

Offline ralphy

  • nOOb
  • *
  • Posts: 18
  • Karma: 6
  • New Forum User
    • View Profile
  • Peppermint version(s): 8
Re: UnlockMe App
« Reply #27 on: March 12, 2018, 05:50:54 am »
@PCNetSpec or other Peppermint user that uses Compton.

Could you please test the following compton.conf in your system?:

https://github.com/ralphys/unlockme/blob/master/usr/share/unlockme/tools/compton.conf

I just want to make sure it is good under Peppermint LXCE before I enable the option in UnlockMe app. I've included Compton tweak in UnlockMe but it is enabled for Xfce only at this point with that configuration by default because I've seen issues when resizing dialogs in Peppermint while compton is enabled... but I'm not sure if the issue is related to the specific virtual machine I'm using for testing - I don't have bare metal hardware right now where to test it myself.

Eventually I'm planning on also adding GUI options to manage Compton parameters. So far, the application can backup and restore configurations, use the one included in UnlockMe by default and push the configuration file to all users accounts... It adds and removes autostart as compton gets enabled or disabled.








Online PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 20422
  • Karma: 2319
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 8 Respin & 9 Alpha
Re: UnlockMe App
« Reply #28 on: March 12, 2018, 11:47:50 am »
Your compton.conf seems to work fine if manually loaded with say
Code: [Select]
compton --config /home/mark/unlockme-compton-conf-test/compton.conf
if that's what you're asking ?

(obviously I had to install compton, and disable the Xfwm4 compositor first)



A GUI for the compton options would be a nice addition .. simply because I'm not a fan of window "fade", it looks cool enough but it gives the "impression" of a slower responding system (though the tooltip fade is nice) ;)

I'm more a fan of click > gone where windows are concerned :)



[EDIT]

I am seeing some minor errors in the terminal when I open some apps such as this for xed
Code: [Select]
[   180.59 ] error 3 (BadWindow) request 20 minor 0 serial 94722 ("BadWindow (invalid Window parameter)")
[   180.59 ] error 3 (BadWindow) request 20 minor 0 serial 94723 ("BadWindow (invalid Window parameter)")
[   180.59 ] error 3 (BadWindow) request 20 minor 0 serial 94724 ("BadWindow (invalid Window parameter)")
[   180.59 ] error 3 (BadWindow) request 20 minor 0 serial 94725 ("BadWindow (invalid Window parameter)")
[   209.53 ] error 3 (BadWindow) request 20 minor 0 serial 109439 ("BadWindow (invalid Window parameter)")
[   209.53 ] error 3 (BadWindow) request 20 minor 0 serial 109440 ("BadWindow (invalid Window parameter)")
[   209.53 ] error 3 (BadWindow) request 20 minor 0 serial 109441 ("BadWindow (invalid Window parameter)")
[   209.53 ] error 3 (BadWindow) request 20 minor 0 serial 109442 ("BadWindow (invalid Window parameter)")
or this for synaptic
Code: [Select]
[   618.93 ] error 3 (BadWindow) request 138 minor 7 serial 717443 ("BadWindow (invalid Window parameter)")
[   618.93 ] error 140 (BadRegion) request 138 minor 17 serial 717444 ("BadRegion (invalid Region parameter)")
[   618.93 ] error 140 (BadRegion) request 138 minor 14 serial 717445 ("BadRegion (invalid Region parameter)")
[   618.93 ] error 140 (BadRegion) request 138 minor 10 serial 717446 ("BadRegion (invalid Region parameter)")
[   618.93 ] error 3 (BadWindow) request 129 minor 5 serial 717451 ("BadWindow (invalid Window parameter)")
but there doesn't seem to be any adverse affects in either the app, or how compton is working.

I got this earlier
Code: [Select]
[   653.95 ] error 9 (BadDrawable) request 14 minor 0 serial 977509 ("BadDrawable (invalid Pixmap or Window parameter)")
glx_bind_pixmap(0x0461db98): Failed to query Pixmap info.
win_paint_win(0x00e03903): Failed to bind texture. Expect troubles.
win_paint_win(0x00e03903): Missing painting data. This is a bad sign.
[   653.95 ] error 9 (BadDrawable) request 14 minor 0 serial 977517 ("BadDrawable (invalid Pixmap or Window parameter)")
[   653.95 ] error 4 (BadPixmap) request 54 minor 0 serial 977518 ("BadPixmap (invalid Pixmap parameter)")
but again noticed no adverse effects .. problem is I can't tell you what caused that as i wasn't really paying attention, and can't seem to reproduce.

As I said, non seemed to cause any issues, and they're probably not compton related anyway because only a few specific apps cause the errors .. just letting you know.

« Last Edit: March 12, 2018, 12:20:18 pm by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline ralphy

  • nOOb
  • *
  • Posts: 18
  • Karma: 6
  • New Forum User
    • View Profile
  • Peppermint version(s): 8
Re: UnlockMe App
« Reply #29 on: March 12, 2018, 02:40:49 pm »
Thanks!!

In terms of the errors log that's usually X server shutting down while applications were still drawing their windows and so on. Not really anything to worry about, nor I believe it is compton related either as you said.
« Last Edit: March 13, 2018, 02:53:36 am by ralphy »