Closed VadimBoev closed 2 months ago
Have you considered using an empty string instead of *
? The matching function provided below is supposed to always return true
when given an empty string.
/**
* @brief Matches an application name pattern against the process details.
*
* This function determines whether the application name pattern includes a path (by checking for "/" or "\\").
* If a path is present in the pattern, the function matches it against the process's `path_name`.
* Otherwise, it matches the pattern against the process's `name`. The comparison is case-insensitive.
*
* @param app The application name or pattern to compare against the process details.
* @param process The process details to be checked against the application pattern.
* @return true if the process details match the application pattern, false otherwise.
*/
static bool match_app_name(const std::wstring& app, const std::shared_ptr<iphelper::network_process>& process)
{
return (app.find(L'\\') != std::wstring::npos || app.find(L'/') != std::wstring::npos)
? (to_upper(process->path_name).find(app) != std::wstring::npos)
: (to_upper(process->name).find(app) != std::wstring::npos);
}
It sounds crazy, but the idea is that all applications and programs that work with the network send traffic to a proxy server, I need it. I think we need to add the '*' parameter to the appNames to enable this idea.