gngr icon indicating copy to clipboard operation
gngr copied to clipboard

Request manager button should show a summary of the request statistics

Open hrj opened this issue 10 years ago • 24 comments

uMatrix shows a graphical icon to indicate how many requests have been blocked / allowed.

The Request Manager button in gngr (on the top right side of the window) needs to show similar information. The user-interface of uMatrix seems fine to me, but I am open to other ideas as well.

uMatrix is constrained in its icon, because it's a plugin. However, we have more freedom to stylise the Request Manager in gngr.

hrj avatar Sep 24 '15 13:09 hrj

Do you have someone working on this currently? If not I'd be willing to fork it and start working on this.

conruggles avatar Aug 08 '16 19:08 conruggles

Hi @rugglcon, No one is working on this AFAIK. Please go ahead!

(Someone on IRC said they will take this up a month ago, but I haven't heard back from them yet.)

hrj avatar Aug 09 '16 03:08 hrj

Sweet, do we just want a number showing the amount, or also a menu that shows the specific sites and cookies blocked?

conruggles avatar Aug 09 '16 14:08 conruggles

@rugglcon To make things easy for development you could start off with a number. For example, a fraction showing accepted requests v/s total requests would be fine. It could look be shown like this: 5/10.

But we have the choice to make it more detailed in the next stage. Have you used uMatrix? It shows a thumbnail of the request matrix in a tiny icon. In gngr, we can afford to use more horizontal space and present the thumbnail in a more readable manner.

hrj avatar Aug 09 '16 15:08 hrj

I haven't used it before, no, but that sounds good.

On a side note, for some reason when I try to build and run gngr, it gives me errors. I'm using Eclipse.

On Tue, Aug 9, 2016 at 10:50 AM, hrj [email protected] wrote:

@rugglcon https://github.com/rugglcon To make things easy for development you could start off with a number. For example, a fraction showing accepted requests v/s total requests would be fine. It could look be shown like this: 5/10.

But we have the choice to make it more detailed in the next stage. Have you used uMatrix? It shows a thumbnail of the request matrix in a tiny icon. In gngr, we can afford to use more horizontal space and present the thumbnail in a more readable manner.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/UprootLabs/gngr/issues/171#issuecomment-238597502, or mute the thread https://github.com/notifications/unsubscribe-auth/ANp3MrW52d1mD6piVKuZPTs9v98afif8ks5qeKHMgaJpZM4GDFYY .

conruggles avatar Aug 09 '16 15:08 conruggles

What sort of errors? Did you read this wiki page? Feel free to post details here or in chat. I am online in our gitter room as well as IRC room #gngr on freenode.

hrj avatar Aug 09 '16 16:08 hrj

Yeah I followed the instructions there, but then when I tried to Run it there was no gngr option for launch configuration. The initial exception is ExceptionInInitializerError.

On Tue, Aug 9, 2016 at 11:12 AM, hrj [email protected] wrote:

What sort of errors? Did you read this wiki page https://github.com/UprootLabs/gngr/wiki/Developer:Setup? Feel free to post details here or in chat. I am online in our gitter room https://gitter.im/UprootLabs/gngr as well as IRC room #gngr on freenode.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/UprootLabs/gngr/issues/171#issuecomment-238604263, or mute the thread https://github.com/notifications/unsubscribe-auth/ANp3MpNYHbY5dXsBJRErUvACgRQG2nO2ks5qeKbVgaJpZM4GDFYY .

conruggles avatar Aug 09 '16 16:08 conruggles

@rugglcon Slight error in the wiki; the name of the launch configuration should be gngrDev, not gngr. Do you see it? It should be under "Java application".

launchscreen

hrj avatar Aug 09 '16 17:08 hrj

Yeah, it says access is denied in another exception. I'm not sure what to do to fix that.

On Tue, Aug 9, 2016 at 12:10 PM, hrj [email protected] wrote:

@rugglcon https://github.com/rugglcon Slight error in the wiki; the name of the launch configuration should be gngrDev, not gngr. Do you see it? It should be under "Java application".

[image: launchscreen] https://cloud.githubusercontent.com/assets/345879/17525862/4acadcb8-5e82-11e6-80bc-dc880fca360c.png

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/UprootLabs/gngr/issues/171#issuecomment-238622041, or mute the thread https://github.com/notifications/unsubscribe-auth/ANp3Mo8j82tbt-MAjOiYYJIq7TsKYlEWks5qeLSYgaJpZM4GDFYY .

conruggles avatar Aug 09 '16 17:08 conruggles

Please provide more details. You can copy paste the exception here.

hrj avatar Aug 09 '16 18:08 hrj

Aug 09, 2016 1:05:03 PM org.lobobrowser.main.ReuseManager launch WARNING: Another instance of the application must have been running but was not shut down properly. Deleting residues of the last instance and creating a new instance. Codesource: file:/C:/Program%20Files/Java/jre1.8.0_91/lib/ext/access-bridge-64.jar Exception in thread "main" java.lang.ExceptionInInitializerError at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at java.lang.Class.newInstance(Unknown Source) at java.awt.Toolkit.loadAssistiveTechnologies(Unknown Source) at java.awt.Toolkit.getDefaultToolkit(Unknown Source) at javax.swing.UIManager.(Unknown Source) at org.lobobrowser.main.PlatformInit.initLookAndFeel(PlatformInit.java:171) at org.lobobrowser.main.PlatformInit.init(PlatformInit.java:325) at org.lobobrowser.main.ReuseManager.launch(ReuseManager.java:159) at org.lobobrowser.main.EntryPoint.launch(EntryPoint.java:63) at org.lobobrowser.main.EntryPoint.lambda$0(EntryPoint.java:79) at java.security.AccessController.doPrivileged(Native Method) at org.lobobrowser.main.EntryPoint.privilegedLaunch(EntryPoint.java:78) at org.lobobrowser.main.EntryPoint.main(EntryPoint.java:56) Caused by: java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "loadLibrary.JavaAccessBridge-64") at java.security.AccessControlContext.checkPermission(Unknown Source) at java.security.AccessController.checkPermission(Unknown Source) at java.lang.SecurityManager.checkPermission(Unknown Source) at java.lang.SecurityManager.checkLink(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at com.sun.java.accessibility.AccessBridgeLoader$1.run(AccessBridgeLoader.java:38) at java.security.AccessController.doPrivileged(Native Method) at java.security.AccessController.doPrivileged(Unknown Source) at com.sun.java.accessibility.AccessBridgeLoader.(AccessBridgeLoader.java:35) ... 16 more Returning permissions: java.security.Permissions@497470ed ( ("java.security.SecurityPermission" "putProviderProperty.") ("java.lang.RuntimePermission" "accessClassInPackage.") ("java.lang.RuntimePermission" "loadLibrary.sunec") ("java.io.FilePermission" "C:\Program Files\Java\jre1.8.0_91-" "read,execute") )

conruggles avatar Aug 09 '16 18:08 conruggles

@rugglcon I just pushed a commit to master branch which might fix that exception. It looks like this particular JDK + OS combination was not tested before. Let me know if it works for you.

hrj avatar Aug 09 '16 18:08 hrj

So still getting errors, but they're different this time. I copied them below. Is this an issue with not being able to see files on my computer, and not with the loader itself?

Aug 09, 2016 1:28:17 PM org.lobobrowser.main.ReuseManager launch WARNING: Another instance of the application must have been running but was not shut down properly. Deleting residues of the last instance and creating a new instance. Codesource: file:/C:/Program%20Files/Java/jre1.8.0_91/lib/ext/access-bridge-64.jar Returning permissions: java.security.Permissions@497470ed ( ("java.security.SecurityPermission" "putProviderProperty.") ("java.lang.RuntimePermission" "accessClassInPackage.") ("java.lang.RuntimePermission" "loadLibrary.*") ("java.io.FilePermission" "C:\Program Files\Java\jre1.8.0_91-" "read,execute") )

Exception in thread "main" java.lang.ExceptionInInitializerError at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at java.lang.Class.newInstance(Unknown Source) at java.awt.Toolkit.loadAssistiveTechnologies(Unknown Source) at java.awt.Toolkit.getDefaultToolkit(Unknown Source) at javax.swing.UIManager.(Unknown Source) at org.lobobrowser.main.PlatformInit.initLookAndFeel(PlatformInit.java:171) at org.lobobrowser.main.PlatformInit.init(PlatformInit.java:325) at org.lobobrowser.main.ReuseManager.launch(ReuseManager.java:159) at org.lobobrowser.main.EntryPoint.launch(EntryPoint.java:63) at org.lobobrowser.main.EntryPoint.lambda$0(EntryPoint.java:79) at java.security.AccessController.doPrivileged(Native Method) at org.lobobrowser.main.EntryPoint.privilegedLaunch(EntryPoint.java:78) at org.lobobrowser.main.EntryPoint.main(EntryPoint.java:56) Caused by: java.security.AccessControlException: access denied ("java.io.FilePermission" "C:\Program%20Files\Java\jre1.8.0_91\lib\ext\amd64\JavaAccessBridge-64.dll" "read") at java.security.AccessControlContext.checkPermission(Unknown Source) at java.security.AccessController.checkPermission(Unknown Source) at java.lang.SecurityManager.checkPermission(Unknown Source) at java.lang.SecurityManager.checkRead(Unknown Source) at java.io.File.exists(Unknown Source) at sun.misc.Launcher$ExtClassLoader.findLibrary(Unknown Source) at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at com.sun.java.accessibility.AccessBridgeLoader$1.run(AccessBridgeLoader.java:38) at java.security.AccessController.doPrivileged(Native Method) at java.security.AccessController.doPrivileged(Unknown Source) at com.sun.java.accessibility.AccessBridgeLoader.(AccessBridgeLoader.java:35) ... 16 more

conruggles avatar Aug 09 '16 18:08 conruggles

No, this is a problem with gngr's security policy. We have kept it very conservative by default, and only expand it when needed. I am opening a new issue for this.

hrj avatar Aug 09 '16 18:08 hrj

That makes sense. Well if that helped to discover an issue for potential Windows users I'm glad I could help, for now I have a Linux box I can do this on as well. I can start building it on there and let you know if there's anything else I find out.

conruggles avatar Aug 09 '16 18:08 conruggles

Hello, It seems that this was building some momentum and has halted. I would like to take a crack at it. Any information would be great!

jtprichett avatar Jul 04 '17 03:07 jtprichett

@JoshuaTPritchett Cool! Please go ahead. You can begin by displaying two numbers: requests that were allowed v/s total number of requests. The information should be available in the vicinity of the RequestManager class.

Unfortunately, I am very busy this week, so I can't guide you immediately. But feel free to ask questions and I will get to them eventually.

hrj avatar Jul 04 '17 03:07 hrj

Excellent, I have some ideas of how to implement this feature, I will attempt tomorrow to get everything up and running on my Ubuntu instance, and make the required pull request.

jtprichett avatar Jul 04 '17 04:07 jtprichett

Hello, I've noticed that this issue hasn't been closed yet. Do you still need someone to modify the request manager button so that it shows a summary of the request statistics?

behrens-web avatar Apr 13 '21 05:04 behrens-web

@behrens-web Yeah, that would be great!

hrj avatar Apr 13 '21 06:04 hrj

Alright, I'll see what I can do!

behrens-web avatar Apr 13 '21 06:04 behrens-web

Sorry about the radio silence, I'm a university student, so I've been busy with exams. You mentioned that I should be able to find the number of allowed requests and the number of total requests around request manager, do you know where, exactly? Because I can't seem to find those numbers.

behrens-web avatar May 10 '21 20:05 behrens-web

No worries @behrens-web. As it happens I am also busy with other things this week, else would have jumped in to help you in detail.

All I can say for now is, the numbers may not be readily available. You might have to add a counter to keep track of requests as they get accepted / rejected inside the RequestManager.

hrj avatar May 11 '21 04:05 hrj

I see, Does every task have to get accepted/rejected inside RequestManager? If so, does it happen inside isRequestPermitted? (I wanna make sure we're on the same page here.)

behrens-web avatar May 11 '21 05:05 behrens-web