henrygd
b5d55ead4a
send websocket close message to agent
2025-07-12 18:49:40 -04:00
henrygd
4f879ccc66
Fix universal tokens registering multiple systems
2025-07-12 17:11:53 -04:00
henrygd
402a1584d7
Add CBOR and agent initiated WebSocket connections ( #51 , #490 , #646 , #845 , etc)
...
- Add version exchange between hub and agent.
- Introduce ConnectionManager for managing WebSocket and SSH connections.
- Implement fingerprint generation and storage in agent.
- Create expiry map package to store universal tokens.
- Update config.yml configuration to include tokens.
- Enhance system management with new methods for handling system states and alerts.
- Update front-end components to support token / fingerprint management features.
- Introduce utility functions for token generation and hub URL retrieval.
Co-authored-by: nhas <jordanatararimu@gmail.com >
2025-07-08 18:41:36 -04:00
henrygd
7caf7d1b31
Clear system's active alerts when system is paused
2025-05-08 20:41:44 -04:00
henrygd
f4fb7a89e5
Add tests for GetSSHKey and handle read errors on key file
2025-05-08 18:54:14 -04:00
henrygd
5439066f4d
hub.MakeLink method to assure URLs are formatted properly ( #805 )
...
- Updated AlertManager to replace direct app references with a hub interface.
- Changed AlertManager.app to AlertManager.hub
- Add tests for MakeLink
2025-05-08 17:47:15 -04:00
henrygd
63af81666b
Refactor SSH configuration and key management
...
- Restrict to specific key exchanges / MACs / ciphers.
- Refactored GetSSHKey method to return an ssh.Signer instead of byte array.
- Added common package.
Co-authored-by: nhas <jordanatararimu@gmail.com >
2025-05-07 20:03:21 -04:00
henrygd
5837b4f25c
Refactor hub initialization and error handling
2025-03-15 00:25:42 -04:00
henrygd
ae22334645
pass hub version through html and update dependencies
...
- Changed Vite configuration to replace version during development.
2025-03-13 02:15:03 -04:00
henrygd
b1fc715ec9
fix: prevent 404 on initial startup by moving h.initialize after hooks
...
- I don't know why this works. Need to look further into it tomorrow :)
2025-03-06 05:38:33 -05:00
henrygd
dd21c18939
feat: add SHARE_ALL_SYSTEMS env var
2025-03-06 01:28:36 -05:00
henrygd
25b73bfb85
fix: make sure system alerts are checked after records are committed
2025-03-05 23:39:01 -05:00
henrygd
9e56f4611f
refactor: restructure hub initialization and startup process
...
- Separated hub initialization logic into distinct methods
- Move command specific things to cmd/hub
- Add compatibility with new systems package
2025-03-03 23:54:25 -05:00
henrygd
f8a1d9fc5d
refactor: optimize system updates and create systems package
...
- Created SystemManager to handle system lifecycle and events
- Created tests for system management operations
- Added test helpers for creating and managing test systems
- Introduced optional port configuration in system config
2025-03-03 23:50:19 -05:00
henrygd
c22b57ce67
refactor(dev): use ENV var to enable hub dev mode
2025-02-26 18:42:34 -05:00
henrygd
25b70af196
feat: add unix socket support for system connections
2025-02-19 20:29:45 -05:00
henrygd
2ab2cc83de
refactor(hub): embed pocketbase fields in hub struct
2025-02-11 19:18:36 -05:00
henrygd
3376a97bea
refactor(hub): replace sync.map with app.store
2025-02-11 19:18:28 -05:00
henrygd
6b2a9463ca
feat: edit system dialog in dashboard
2025-02-11 14:12:25 -05:00
henrygd
a94cfff965
fix: web ui should only respond to get requests
2025-02-11 11:04:19 -05:00
Henry Dollman
58085bf300
feature: support serving from subpath ( #33 )
...
Co-authored-by: Karthik T <karthikt.holmes+github@gmail.com >
2025-02-04 21:22:40 -05:00
Henry Dollman
7170b24160
config: prefix environment variables with BESZEL_HUB_ ( #502 )
2025-01-29 19:25:12 -05:00
Chuangbo Li
0c9bc47a3a
refactor: simplify startSystemUpdateTicker using time.Tick ( #347 )
...
According to the Go 1.23 documentation, the garbage collector can now recover unreferenced tickers created with time.Tick, making time.NewTicker method unnecessary in most cases.
Reference:
* time.Tick: https://pkg.go.dev/time#Tick
2024-12-28 17:07:32 -05:00
Henry Dollman
59bdc0ce0d
add USER_CREATION env var and update migrations
2024-12-04 17:36:36 -05:00
Henry Dollman
6e08507dde
remove todo comments
2024-11-29 17:16:40 -05:00
Henry Dollman
87f7390eca
use new batch api for setting global alerts
2024-11-27 17:07:44 -05:00
Henry Dollman
ed01752546
update admin creation for pocketbase 0.23.0
2024-11-27 16:32:23 -05:00
Henry Dollman
46002a2171
remove echo dependency
2024-11-24 18:34:42 -05:00
Henry Dollman
14716d36a6
refactor go code for pocketbase 0.23.0 ( #300 )
2024-11-24 18:15:24 -05:00
Henry Dollman
87ef769086
Merge branch 'main' of https://github.com/wwng2333/beszel
2024-11-17 11:23:06 -05:00
D
bcefb8e43c
fix IPv6 connection problem
...
use net.JoinHostPort to fix ipv6 address at createSystemConnection
2024-11-17 16:34:05 +08:00
Henry Dollman
a1641c5bcc
change ssh related timeouts from 5s to 4s
2024-11-15 16:29:36 -05:00
Henry Dollman
e6839480d9
use sync.Map for system connections
2024-11-15 15:35:26 -05:00
Henry Dollman
f8f1e01cb4
add settings page and api route for generating config.yml
2024-10-23 18:30:24 -04:00
Henry Dollman
c7463f2b9f
limit collection lookups and other small refactoring
...
* adds error handling for collection lookup (#216 )
2024-10-23 13:10:39 -04:00
Henry Dollman
a975466fc7
add declarative system management with config.yml ( #70 , #206 )
2024-10-22 18:46:52 -04:00
Henry Dollman
6b6d3fabc0
change disk alert to monitor usage of any disk, not only root
2024-10-16 17:21:05 -04:00
Henry Dollman
703a3c41c9
empty info for systems that are paused
2024-10-15 18:31:03 -04:00
Henry Dollman
10d348c052
temperature alerts
2024-10-12 14:57:46 -04:00
Henry Dollman
5b0fac429b
move update functions to agent / hub packages
2024-10-10 18:36:01 -04:00
Henry Dollman
98563d643d
refactor alerts and move managers to hub struct
...
- resource alerts called from updateSystem to avoid needing to pull from db after update
2024-09-29 13:35:38 -04:00
Henry Dollman
f350d61ee2
add CSP env var to set a custom Content-Security-Policy header value
2024-09-24 15:22:47 -04:00
Henry Dollman
138cbc13d6
rename package user to users
2024-09-14 16:44:53 -04:00
Henry Dollman
8ce605d65e
create UserManager
2024-09-14 15:45:57 -04:00
Henry Dollman
9710d0d2f1
shoutrrr alerts / settings page
2024-09-12 19:39:27 -04:00
Henry Dollman
9bc7773607
further progress on settings / alerts
2024-09-10 19:03:08 -04:00
Henry Dollman
b4a3cb9ce6
add timeout to ssh session creation to avoid hanging
2024-08-30 19:06:16 -04:00
Henry Dollman
d053f16058
add agent version to getkey route
2024-08-20 14:00:15 -04:00
Henry Dollman
b7934931cf
refactor hub requestJsonFromAgent
2024-08-18 18:30:44 -04:00
Henry Dollman
0566433aa1
move longer records creation to a scheduled job
2024-08-18 18:23:17 -04:00