Commit Graph
12 Commits
Author SHA1 Message Date
naiba e816e94fca feat: server transfer rotation 2026-05-25 10:17:34 +00:00
naibaandnaiba/CloudCode 8add559ec8 fix(rpc): bind io streams to target agents
Co-authored-by: naiba/CloudCode <hi+cloudcode@nai.ba>
2026-05-21 02:01:54 +00:00
naibaandnaiba/CloudCode 6661d6a7fc fix(rpc): bind io_stream sessions to creator to prevent terminal/fm hijack
createTerminal and createFM correctly check server ownership before
issuing a stream UUID, but terminalStream and fmStream only verified
that the UUID existed. Any authenticated user holding a valid stream
UUID could attach to it, gaining the original creator's live shell or
file-manager session — and the UUID is exposed via URL path (referer
leaks, access logs, browser history, frontend error reporters).

Bind the creator user ID into ioStreamContext at CreateStream time,
expose StreamOwnership and IsStreamAuthorizedForUser, and check
ownership in terminalStream/fmStream before the WebSocket upgrade so a
rejected attempt does not tear down the legitimate stream via defer.

NAT streams are also routed through CreateStream(_, 0); they are not
reachable from /ws/terminal or /ws/file so a sentinel user ID is fine.

Co-authored-by: naiba/CloudCode <hi+cloudcode@nai.ba>
2026-05-18 15:16:40 +00:00
UUBulb 1d2f8d24f6 feat: update to go1.24 & support listening https (#1002)
* feat: support listening https

* refactor

* modernize

* support snake case in config

* more precise control of config fields

* update goreleaser config

* remove kubeyaml

* fix: expose agent_secret

* chore
2025-02-28 22:02:54 +08:00
UUBulb 91bef2882a refactor: simplify server & service manipulation (#993)
* refactor: simplify server & service manipulation

* update

* fix

* update for nat, ddns & notification

* chore

* update cron

* update dependencies

* use of function iterators

* update default dns servers
2025-02-21 23:08:12 +08:00
UUBulb 653d0cf2e9 feat: user roles (#852)
* [WIP] feat: user roles

* update

* update

* admin handler

* update

* feat: user-specific connection secret

* simplify some logics

* cleanup

* update waf

* update user api error handling

* update waf api

* fix codeql

* update waf table

* fix several problems

* add pagination for waf api

* update permission checks

* switch to runtime check

* 1

* cover?

* some changes
2024-12-22 00:05:41 +08:00
naiba 3cce7ebf01 rename repo 2024-11-28 19:38:54 +08:00
UUBulb 07989705d2 fix: only close user/agentIo connect channel once (#21) 2024-11-26 09:18:13 +08:00
UUBulb be79b11e58 allow cors from loopback addresses in debug mode (#9) 2024-11-18 13:26:41 +08:00
uubulb 5114fc2854 feat: add i18n support 2024-11-01 05:07:04 +08:00
UUBulb 380973a200 prevent writing response to websocket connections (#457) 2024-10-25 21:45:05 +08:00
UUBulb d086e98711 add fm api (#456) 2024-10-25 09:09:08 +08:00