tnodir / fort

Fort Firewall for Windows
GNU General Public License v3.0
1.53k stars 129 forks source link

Enhancement & bug fix #18

Closed anwar-alsilwy closed 2 years ago

anwar-alsilwy commented 2 years ago

Hi I tested Fort Firewall for a week, and it's a masterpiece. But I suggest some features, and I detected a serious bug. Suggested features: 1- add option to [import/export] added programs & all user settings to a file. 2- add option to stop internet traffic when daily/monthly quota exceeded ( not just a warning message). 3- change the system tray icon colors to Gray when filters are disabled, and Red when stop traffic or stop internet traffic. 4- add dark theme for all UI.

Bug: Sometimes when I stop/start traffic or internet traffic it says (Service isn't available) and sometimes it's appear without known reasons, The workaround solution is to restart FortFirewallSvc from services then close FortFirewall from system tray and open it again. I hope you fix this critical issue soon.

I'm using latest version & Win10 21H2 Thanks.

tnodir commented 2 years ago

Hi Thanks for feedback.

Let me create separate issues for suggested features.

Bug: Sometimes when I stop/start traffic or internet traffic it says (Service isn't available) ...

Please send me your <PROFILE_PATH>/logs/ folder. I hope it contains log or crash (.dmp) files.

I have to reproduce the bug..

tnodir commented 2 years ago

Are you using the FortFirewall-3.5.6-windows-x86.exe or FortFirewall-3.5.6-windows10-x86_64.exe?

anwar-alsilwy commented 2 years ago

First of all, Thank you for your time & your hard work. I just remembered one more feature:

I'm using FortFirewall-3.5.6-windows10-x86_64.exe, My OS is x64

BTW, should I enable log debug messages & show log messages in console from options to collect errors ??

tnodir commented 2 years ago

should I enable log debug messages & show log messages in console from options to collect errors ??

No. It just outputs some additional debug messages. Error messages are always stored in the logs/. Please check the logs/ folder.

anwar-alsilwy commented 2 years ago

Ok give me sometime please.

anwar-alsilwy commented 2 years ago

Unfortunately, logs/ folder is empty, and the issue didn't happen for some reason, that's weird !! If I face this issue again I will send logs/. folder on this issue or new separate issue. Anyway, this is my profile settings if you will find any mistakes I did: https://www.mediafire.com/file/4owg09dg8kqz61t/Fort+Firewall_profile.zip/file

Thanks.

tnodir commented 2 years ago

Unfortunately, logs/ folder is empty, and the issue didn't happen for some reason, that's weird !!

When the bug happens again, restart just a FortFirewall program (not FortFirewallSvc from services) - will it work fine or not?

tnodir commented 2 years ago

Also this bug can happen, when you restart FortFirewallSvc by hand.

anwar-alsilwy commented 2 years ago

If you restart FortFirewallSvc it keeps saying service isn't available until you quit FortFirewall.exe from system tray then open it again. Also, sometimes when I stop traffic/internet traffic, the connection will lost and that's fine, but when I enable traffic again the connection still lost until I restart FortFirewallSvc. That's weird bug.

tnodir commented 2 years ago

Also, sometimes when I stop traffic/internet traffic, the connection will lost and that's fine

It’s not fine, but an actual bug. I still can’t reproduce it. Maybe I miss some specific conditions…

anwar-alsilwy commented 2 years ago

I mean sometimes when I stop traffic or internet traffic the bandwidth will stop, but the bug happen when I start the traffic or internet traffic option, the internet still stopped.

tnodir commented 2 years ago

@anwar-alsilwy Can you please do:

Thanks.

anwar-alsilwy commented 2 years ago

At the moment I'm at the work, I'm far away from my PC. My apologies, maybe tonight or tomorrow.

tnodir commented 2 years ago

My apologies, maybe tonight or tomorrow.

No problem, I'll wait.

anwar-alsilwy commented 2 years ago

Ok, Am I suppose to reproduce the bug by restarting FortFirewallSvc, by my hand ? Or just enable/disable internet traffic and wait until the bug happen by itself ?

tnodir commented 2 years ago

The bug is when the UI program loses connection with the service (FortFirewallSvc) by "Service isn't available" warning.

Am I suppose to reproduce the bug by restarting FortFirewallSvc, by my hand ?

It's easily reproducible. But it's not a bug, because users shouldn't restart the service by hand.

Or just enable/disable internet traffic and wait until the bug happen by itself ?

Yes, please.

tnodir commented 2 years ago

Anyway, this is my profile settings ...

You've turned on the Options: "Filter Local Addresses" flag and commented out the "127.0.0.1" IP address.

It means that when traffic (all or only internet) is stopped, then programs can't communicate via local socket connection for IPC. (Fort Firewall uses named pipe for IPC, not local sockets. So it's not affected.)

Maybe this has some effect, but I still can't reproduce the bug with these options too.

anwar-alsilwy commented 2 years ago

First of all, I turned on the Options: "Filter Local Addresses" flag and commented out the "127.0.0.1" IP address, because sometimes I use TOR as a proxy connection, if I let the local connections enabled, the TOR route all traffic through tor proxy via 127.0.0.1 address, and bypass all FortFirewall filters for all blocked apps. So only allowed applications get internet and connect through TOR And believe me, your masterpiece (FortFirewall) working great with TOR proxy. Thanks bro.

anwar-alsilwy commented 2 years ago

Unfortunately, the "Service isn't available" bug didn't happen, I tried everything to reproduce the error (stop/start traffic many times, connect through TOR proxy and reboot, ....etc), that's weird. But you know, like you said, maybe the service restart in background automatically without user knowledge, and program UI unable to connect to service again. I believe you can fix this issue by making connection between program UI and Service more reliable, even if the service restarted by hand or automatically. I mean if you can make Program UI sensitive to any changes happen to service, and reconnect to it immediately. You are the Genius here, not me LOL.

tnodir commented 2 years ago

I believe you can fix this issue by making connection between program UI and Service more reliable, even if the service restarted by hand or automatically.

Yes, I'm considering to add the re-connection somehow.

But I was wondering how the "Service isn't available" can happen without service restarting.

Ok, please let me know if it'll happen again.

anwar-alsilwy commented 2 years ago

Yes, I'm considering to add the re-connection somehow.

Great, and it will be better if program UI reconnect to service automatically even without the user feeling.

But I was wondering how the "Service isn't available" can happen without service restarting.

Yes, me too, when this issue happened for me, I went to services and FortFirewallSvc still running, that's weird.

Ok, please let me know if it'll happen again.

Anytime bro, I'm under your service, and forgive me if I wasted your time.

anwar-alsilwy commented 2 years ago

Hi Today I just tried to test groups speed limit function, I Added new group called 10KB with download limit 10KiB, then tried to apply it for IDM, but suddenly error message appeared "Service isn't Responding". Last time it said "Service isn't available", I don't know what's the difference between them. Also Logs/ folder is empty, see video: https://www.mediafire.com/file/kxjg8ryyfc4jbt9/FortFirewall_Error.mp4/file

after that I tried to enable Log debug option, and reproduce the bug, and it's happened, see logs: https://www.mediafire.com/file/bo8mbmrtw3ucrhj/FortFirewall_Log.zip/file

tnodir commented 2 years ago

@anwar-alsilwy Please try the Fort Firewall v3.5.7-Test. I've added re-connection to service.

anwar-alsilwy commented 2 years ago

Ok, my fault. I will use latest test version from now on, and collect any error will happen. Stay tuned.

anwar-alsilwy commented 2 years ago

Hi I installed latest version 3.5.7 test2, Simply, I restarted FortFirewallSvc by my hand, If you tried to allow/block app, enable/disable internet traffic or what ever you want, the message " Service isn't available" will appear, until I quit and run whole FortFirewall.exe.

I noticed that, if you restart FortFirewallSvc by your hand or by windows itself for any reason, the PID of the service will change every single time, and that's why FortFirewall lose connection with service.

In my opinion, to get rid of this issue forever, make FortFirewall.exe re-establish the connection on every time the user do instruction or command ( like : enable/disable traffic, allow/block app, enable/disable filter & everything else...). Thanks a lot.

tnodir commented 2 years ago

Ok, I've improved the re-connection in v3.5.7 test3. Please test.

anwar-alsilwy commented 2 years ago

On test3 version, I restarted FortFirewallSvc by my hand, and message "Service isn't available" didn't happen. That's nice But, more UI glitches had arrived, After restarting FortFirewallSvc, like: 1- programs UI not refresh immediately after allow/block apps, until you point the mouse to deferent place. 2- programs icon on programs UI sometimes appear as white null icons. 3- Traffic graph no longer response to the network traffic after restarting service until you exit and run FortFirewall.exe again.

Other things like enable/disable filter, traffic, internet traffic are working normally after restarting the service. I think you need to restart the service and test it by yourself to discover more glitches better than me. Thanks

tnodir commented 2 years ago

Thanks for testing. Fixed in v3.5.7. Please check.

anwar-alsilwy commented 2 years ago

WOW, I can't believe my eyes !! To be honest with you, I did every dirty thing to reproduce the bug, but the connection with service now is more and more reliable, the traffic graph response immediately after I restart FortFirewallSvc (that's GREAT !!). And we don't want to talk about how impressive to support IPv6. I don't know how much time you took to make this magic, but literally, you are one of the most respected developers I have ever met.

tnodir commented 2 years ago

Thanks again for testing!

Support for IPv6 was not easy, but straightforward. Because all needed infrastructure was prepended. IPv6 wasn't tested properly, because I have not it. I've checked the IPv6 in VM with local addresses only.

"Network Rules" is not easy and not straightforward. It's a most wanted feature. And it'll be very cool to have it finally.