Commit Graph

22 Commits

Author SHA1 Message Date
Siyuan Miao 338d8fd55e chore: change logging verbosity 2025-04-13 03:11:15 +02:00
Siyuan Miao edba5c94f5 feat(display): show cloud connection status 2025-04-12 22:46:48 +02:00
Siyuan Miao f712cb1719 refactor(network): rewrite network and timesync component 2025-04-12 18:46:03 +02:00
Siyuan Miao 7ebf7ba9fb chore(network): improve connectivity check 2025-04-11 19:18:30 +02:00
Siyuan Miao 94e83249ef chore(cloud): use request id from the cloud 2025-04-11 16:03:46 +02:00
Siyuan Miao e08ff425c3 chore(log): add webRtcLogger 2025-04-11 08:05:04 +02:00
Siyuan Miao 4c37f7e079 refactor: use structured logging 2025-04-11 00:43:46 +02:00
Aveline dc1ce03697 chore(websocket): logging and metrics improvement (#347)
* chore(websocket): only show warning if websocket is closed abnormally

* chore(websocket): add counter for ping requests received
2025-04-11 00:43:46 +02:00
Aveline 66a3352e5d feat(websocket): handle ping messages sent from react and add logging (#346) 2025-04-11 00:43:46 +02:00
Adam Shiervani 1a30977085
Feat/Trickle ice (#336)
* feat(cloud): Use Websocket signaling in cloud mode

* refactor: Enhance WebRTC signaling and connection handling

* refactor: Improve WebRTC connection management and logging in KvmIdRoute

* refactor: Update PeerConnectionDisconnectedOverlay to use Card component for better UI structure

* refactor: Standardize metric naming and improve websocket logging

* refactor: Rename WebRTC signaling functions and update deployment script for debug version

* fix: Handle error when writing new ICE candidate to WebRTC signaling channel

* refactor: Rename signaling handler function for clarity

* refactor: Remove old http local http endpoint

* refactor: Improve metric help text and standardize comparison operator in KvmIdRoute

* chore(websocket): use MetricVec instead of Metric to store metrics

* fix conflicts

* fix: use wss when the page is served over https

* feat: Add app version header and update WebRTC signaling endpoint

* fix: Handle error when writing device metadata to WebRTC signaling channel

---------

Co-authored-by: Siyuan Miao <i@xswan.net>
2025-04-09 00:10:38 +02:00
Siyuan Miao 73e715117e feat(cloud): disconnect from cloud immediately when cloud URL changes or user requests to deregister 2025-04-04 13:16:38 +02:00
Siyuan Miao f3b5011d65 feat(cloud): add metrics for cloud connections 2025-04-03 19:06:21 +02:00
Siyuan Miao 1e9adf81d4 chore: skip websocket client if net isn't up or time sync hasn't complete 2025-04-03 18:16:41 +02:00
SuperQ d3641bb4b9
Chore: Fix up various linting issues
In prep to add golangci-lint, fix various linting issues.
* Make the `kvm` package a fully-qualified public package.

Signed-off-by: SuperQ <superq@gmail.com>
2025-03-11 18:22:45 +01:00
SuperQ 34e33e45bf
Cleanup logging
Make sure all logging output is called via the main logger instead of
stdlib `"log"` or `fmt.Print(f|ln)`.

Signed-off-by: SuperQ <superq@gmail.com>
2025-03-11 16:53:54 +01:00
Adam Shiervani e4bb4f288c
feat(cloud): Add support for custom cloud app URL configuration (#207)
* feat(cloud): Add support for custom cloud app URL configuration

- Extend CloudState and Config to include CloudAppURL
- Update RPC methods to handle both API and app URLs
- Modify cloud adoption and settings routes to support custom app URLs
- Remove hardcoded cloud app URL environment file
- Simplify cloud URL configuration in UI

* fix(cloud): Improve cloud URL configuration and adoption flow

- Update error handling in cloud URL configuration RPC method
- Modify cloud adoption route to support dynamic cloud URLs
- Remove hardcoded default cloud URLs in device access settings
- Refactor cloud adoption click handler to be more flexible

* refactor(cloud): Simplify cloud URL configuration RPC method

- Update rpcSetCloudUrl to return only an error
- Remove unnecessary boolean return value
- Improve error handling consistency

* refactor(ui): Simplify cloud provider configuration and URL handling
2025-02-28 13:48:52 +01:00
Adam Shiervani 7304e6b672
feat(cloud): Add custom cloud API URL configuration support (#181)
* feat(cloud): Add custom cloud API URL configuration support

- Implement RPC methods to set, get, and reset cloud URL
- Update cloud registration to remove hardcoded cloud API URL
- Modify UI to allow configuring custom cloud API URL in developer settings
- Remove environment-specific cloud configuration files
- Simplify cloud URL configuration in UI config

* fix(ui): Update cloud app URL to production environment in device mode

* refactor(ui): Remove SIGNAL_API env & Rename to DEVICE_API to make clear distinction between  CLOUD_API and DEVICE_API.

* feat(ui): Only show Cloud API URL Change on device mode

* fix(cloud): Don't override the CloudURL on deregistration from the cloud.
2025-02-25 16:10:46 +01:00
Aveline 591d512b11
add extra logging and tune timeout settings for cloud (#167)
* chore(config): merge userConfig with defaultConfig and add a lock

* chore(cloud): add extra logging and tune timeout settings
2025-02-18 17:22:03 +01:00
Aveline 0d7efe5c0e
feat: add ICE servers and local IP address returned by the API to fix connectivity issues behind NAT (#146)
Add ICE servers and local IP address returned by the API to fix connectivity issues behind NAT
2025-02-11 15:45:14 +01:00
Cameron Fleming a9767b650c
fix(cloud): only start WS Client if config.CloudToken is set (#27) 2025-02-11 14:51:18 +01:00
Cameron Fleming 8ffe66a1bc
chore: use github.com/coder/websocket instead of nhooyr.io/websocket (#14)
nhooyr.io/websocket has been deprecated and is now maintained by Coder,
https://github.com/coder/websocket.

Also bumps to 1.8.12 which is compatible.
2025-01-02 23:51:29 +01:00
Adam Shiervani 20780b65db Release 202412292127 2024-12-29 21:27:42 +01:00