henrypp / simplewall

Simple tool to configure Windows Filtering Platform (WFP) which can configure network activity on your computer.
GNU General Public License v3.0
6.04k stars 479 forks source link

[Feature] A fix for apps using dynamic/temporary paths - (& apps installed via scoop) #1345

Open t3dium opened 1 year ago

t3dium commented 1 year ago

Checklist

App version

latest

Problem you are trying to solve

When updating apps installed using scoop, a package manager, since they're portable apps (with a folder named current, symlinking to the newest portable files), when updating the folder named after the version number changes, and simplewall re-prompts for allowing/disallowing internet access.

Suggested solution

For simplewall to detect scoop apps, and set rules for the symlinks (permanent) and not the specific file within the version folder (which changes).

Screenshots / Drawings / Technical details

Example of what scoop's file hierarchy looks like:

ApplicationFrameHost_OOmzGRLg5Y ApplicationFrameHost_ilCUSF7tYZ

symlink'd exe to the current version's exe ApplicationFrameHost_h1nPOxUHeL

Krulk commented 1 year ago

I was going to create the same thread. Block application by filename, not by path+filename. In W10, updating C:\program files (x86)\microsoft\edgewebview\application\108.0.1462.46\msedgewebview2.exe C:\program files\windowsapps\microsoft.yourphone_1.22102.229.0_x64__8wekyb3d8bbwe\phoneexperiencehost.exe constantly creates a new folder with the version number. Can I block him by name? Or by the name and part of the path to it, which does not include the version number, which is constantly changing, for example C:\program files (x86)\microsoft\edgewebview\application\ and in it all applications msedgewebview2.exe

Xelbayria commented 1 year ago

I was going to create a similar issue. I have discord via scoop and a few more apps not via scoop. it has filename\version\filename.exe. these apps often updating to the latest version so it created a new folder for version to put these files in and use them. scoop used a similar system except it links them to a folder named current

I wasn't able to find a good solution to have SimpleWall keep allowing them without me having to do anything. it's a bit annoying, tho.

This is what Kruik mentioned.

the only 2 simple solutions i can think of to be implement into SimpleWall is that it must have the capability where we can choose the path to the filename.exe (that include symlink). so Simplewall will just keep using the current as the latest version version so we won't get the notification to allow/deny.

the other solution is to use REGEX so it will look for the latest version of the software to keep allowing.

Krulk commented 1 year ago

Make a checkbox so that a specific file name is blocked from anywhere. Make a separate window with a list of program names so that simplewall itself auto blocks these programs together with any route to them. Other programs are blocked along the way manually.

Xelbayria commented 1 year ago

Make a checkbox so that a specific file name is blocked from anywhere. Make a separate window with a list of program names so that simplewall itself auto blocks these programs together with any route to them. Other programs are blocked along the way manually.

I am confused by what you said above?? can you clarify?

Krulk commented 1 year ago

You don't have to do anything. This feature should be added to simplewall. So that it automatically blocks the program by file name, and not by path + name. Or automatically blocked the path + file name if the file name is in the list of blocked ones. Now there is no such possibility. Although some programs constantly change the path to the file by updating. \version_number\application_name. Or even worse \path\version_number.exe At least in 1 case it should be possible to block them. Case 2 is generally difficult, it is necessary to block all applications that are along the path... simplewall does not give such an opportunity for some reason.

Xelbayria commented 1 year ago

You don't have to do anything. This feature should be added to simplewall. So that it automatically blocks the program by file name, and not by path + name. Or automatically blocked the path + file name if the file name is in the list of blocked ones. Now there is no such possibility. Although some programs constantly change the path to the file by updating. \version_number\application_name. Or even worse \path\version_number.exe At least in 1 case it should be possible to block them. Case 2 is generally difficult, it is necessary to block all applications that are along the path... simplewall does not give such an opportunity for some reason.

ah ok i understand now. Unfortunately, such a feature is not implemented into SimpleWall. Thanks for the explanation.

sylph520 commented 1 year ago

I use scoop a lot, and it would be nice for simplewall to handle this situation automatically or manually. Perhaps by adding an option to enable network access under scoop/apps/some_app_name/current folder as well when an app is requesting network access under scoop/apps/some_app_name/specific_app_version folder.

TLCPlusPlus commented 1 year ago

+1 to this suggestion.

Discord does this as well with each version update as the directory changes with each version number folder (right now its "app-1.0.9016", but will block Discord connections if say the next update is "app-1.0.9017"). Element (matrix client) does as well. Id say at least less then half my programs do this.

if I could at least do something like:

Instead of being forced to do: C:\Users\TLCPlusPlus\AppData\Local\Discord\app-1.0.9016\Discord.exe

to allow all to run after Discord, this would be great as I don't have to worry about maintaining simplewall after every app update, and having to purge as much dead entries as often. For those that are paranoid about app updates, just keep pointing right at the exe like above.

redactedscribe commented 1 year ago

As a Scoop user, and user of Discord and other apps which change path each version, this feature is sorely missing. It's laborious to update simplewall paths each time apps update, which is often.

herrenP commented 1 year ago

I also would like to see a fix for this. Maybe the title could be changed to something like: "Support dynamic path" or similar? I don't use Scoop but there are several softwares that uses dynamic or temporary paths.

skupjoe commented 11 months ago

Right- the way Scoop manager installs and updates is another good reason why I'd like support for:

463

1451

1441

379

Etc..

eugenesvk commented 2 months ago

Would a general solution be to just block an app by its hash, ignoring the path altogether?