Commit Graph

24 Commits

Author SHA1 Message Date
Alexandr Stelnykovych f943e1eaf9 fix(api): remove unauthenticated updates/from-url endpoint
Issue:
The updates/from-url endpoint was registered with PermitAnyone, so any
local process could call it without authentication. Its handler passed the
request body as an index URL to UpdateFromURL, which ran the update with
the version checks and the auto-download/auto-apply settings bypassed.
Signatures were still verified, but a caller could point Portmaster at a
copy of any older signed index and have it installed without asking the
user, e.g. to bring back a version with an already fixed vulnerability.

Change:
- Remove the endpoint. It was left over from an unfinished feature and
  nothing (UI, tray app, scripts) calls it.
- Remove Updater.UpdateFromURL, which had no other callers.

ForceUpdate is unchanged: it is only used by the command line tools and
always uses the configured index URLs.

Fixes #2292
2026-10-15 13:04:44 +03:00
Alexandr Stelnykovych 989175aab4 feat(UI): implement "Open Data Directory" in the Tauri app
Related ticket: #1834

The Tauri integration never implemented the action: the install dir
lookup rejected with "not yet supported", the rejection was unhandled,
and the shell plugin would not open local paths from JS anyway. The app
also cannot know the data directory from its arguments, as --data is not
passed on Windows and points to the v1 location on Linux.

Add a read-only core/paths endpoint to the core API (bin, data and log
directories) and an open_dir command in the Tauri app that takes a
directory kind (bin, data, logs), queries the endpoint and opens the
directory natively: ShellExecuteW with the default verb on Windows,
which honors a third-party file manager registered for folders, and
the open crate elsewhere. No path is accepted from the webview, and
further "open directory" actions only need UI changes.
2026-10-01 13:06:55 +03:00
Alexandr Stelnykovych 14a8df4b11 Restart UI process (Tauri) after automatic update
https://github.com/safing/portmaster-shadow/issues/40
2026-04-10 13:12:04 +03:00
Alexandr Stelnykovych 287c498bf1 removed obsolete command line argument "disable-shutdown-event" 2025-10-24 16:08:24 +03:00
Alexandr Stelnykovych ec2d4ca9eb Merge branch 'master' into merge/master-into-v2-with-history (v1 into v2)
# Conflicts:
#	Earthfile
#	base/config/main.go
#	base/database/dbmodule/db.go
#	base/database/main.go
#	go.mod
#	go.sum
#	service/core/base/global.go
2025-05-28 11:52:15 +03:00
Alexandr Stelnykovych 15bd31adb5 [desktop] Fix: Failed to display "News" on the dashboard 2025-03-21 13:38:10 +02:00
Daniel b68646c689 Use transaction for PutMany and cursor Query 2025-02-26 16:52:34 +01:00
Daniel 130c4a427c Fix timing on database root path initialization 2025-02-26 13:25:55 +01:00
Daniel 90ead7d5e5 Switch core and cache databases to use sqlite when bbold db is not present 2025-02-25 13:49:49 +01:00
Vladimir Stoilov fed64e6fbd Fix loggin dir 2024-12-12 16:33:02 +02:00
Vladimir Stoilov 0997f1ce26 Fix broadcast notifications 2024-12-11 16:13:06 +02:00
Vladimir Stoilov 22253c4e9e [service] Fix windows permissions 2024-12-06 12:00:20 +02:00
Daniel 706ce222d0 WIP 2024-11-27 16:16:15 +01:00
Daniel 7bc1c3b764 Replace dataroot module with BinDir and DataDir on instance, adapt modules 2024-11-06 10:48:02 +01:00
Daniel 0f3f3c360f [WIP] Simplify update system 2024-10-31 16:38:12 +01:00
Vladimir Stoilov 8b68243cc6 [WIP] Add update from custom url functionality 2024-10-09 11:44:59 +03:00
Vladimir Stoilov 61babe2822 [WIP] Add restart command to instance 2024-09-26 13:51:42 +03:00
Vladimir Stoilov b3ff6f14f1 [WIP] Error and state handleing improvments, better logs 2024-09-19 12:38:23 +03:00
Vladimir Stoilov 1a866584a4 [WIP] Refactoring and bug fixes 2024-09-18 18:34:42 +03:00
Vladimir Stoilov 9bae1afd73 [WIP] New updater first working prototype 2024-09-05 10:25:57 +03:00
Daniel 57f08eccd7 [service] Add worker info system 2024-08-27 16:32:23 +02:00
Daniel Hååvi 80664d1a27 Restructure modules (#1572)
* Move portbase into monorepo

* Add new simple module mgr

* [WIP] Switch to new simple module mgr

* Add StateMgr and more worker variants

* [WIP] Switch more modules

* [WIP] Switch more modules

* [WIP] swtich more modules

* [WIP] switch all SPN modules

* [WIP] switch all service modules

* [WIP] Convert all workers to the new module system

* [WIP] add new task system to module manager

* [WIP] Add second take for scheduling workers

* [WIP] Add FIXME for bugs in new scheduler

* [WIP] Add minor improvements to scheduler

* [WIP] Add new worker scheduler

* [WIP] Fix more bug related to new module system

* [WIP] Fix start handing of the new module system

* [WIP] Improve startup process

* [WIP] Fix minor issues

* [WIP] Fix missing subsystem in settings

* [WIP] Initialize managers in constructor

* [WIP] Move module event initialization to constrictors

* [WIP] Fix setting for enabling and disabling the SPN module

* [WIP] Move API registeration into module construction

* [WIP] Update states mgr for all modules

* [WIP] Add CmdLine operation support

* Add state helper methods to module group and instance

* Add notification and module status handling to status package

* Fix starting issues

* Remove pilot widget and update security lock to new status data

* Remove debug logs

* Improve http server shutdown

* Add workaround for cleanly shutting down firewall+netquery

* Improve logging

* Add syncing states with notifications for new module system

* Improve starting, stopping, shutdown; resolve FIXMEs/TODOs

* [WIP] Fix most unit tests

* Review new module system and fix minor issues

* Push shutdown and restart events again via API

* Set sleep mode via interface

* Update example/template module

* [WIP] Fix spn/cabin unit test

* Remove deprecated UI elements

* Make log output more similar for the logging transition phase

* Switch spn hub and observer cmds to new module system

* Fix log sources

* Make worker mgr less error prone

* Fix tests and minor issues

* Fix observation hub

* Improve shutdown and restart handling

* Split up big connection.go source file

* Move varint and dsd packages to structures repo

* Improve expansion test

* Fix linter warnings

* Fix interception module on windows

* Fix linter errors

---------

Co-authored-by: Vladimir Stoilov <vladimir@safing.io>
2024-08-09 18:15:48 +03:00
Patrick Pacher 61176af14e Fix linting errors 2024-03-27 16:17:58 +01:00
Patrick Pacher 8579430db9 wip: migrate to mono-repo. SPN has already been moved to spn/ 2024-03-20 09:45:32 +01:00