Remove legacy mode.

- Deleted the legacy WebSocket client implementation (`wstoclient.go`) and its test file (`wstoclient_test.go`).
- Removed legacy handling from the HTTP manager, including legacy proxy setup and routing.
- Cleaned up session management by removing legacy host checks and related functions.
- Eliminated the legacy WebRTC handler and its associated logic.
- Updated session interface to remove legacy methods.
- Removed legacy API documentation and configuration options from migration guide and help files.
This commit is contained in:
Miroslav Šedivý
2026-10-16 20:23:56 +02:00
parent ff6dd395c9
commit 3191dbb058
29 changed files with 97 additions and 2679 deletions
+5 -22
View File
@@ -47,16 +47,11 @@ func (session *SessionCtx) profileChanged() {
}
if (!session.profile.CanConnect || !session.profile.CanLogin || !session.profile.CanWatch) && session.state.IsWatching {
// TODO: Needed for legacy implementation. Websocket must die before webrtc and deliver signal close message
// otherwise webrtc destroy would trigger websocket reconnect. In case of kick event, webrtc destroy is called
// before websocket destroy that delivers the information about the kick.
time.AfterFunc(time.Second, func() {
// The peer may have been removed if the user disconnected while
// waiting for the delayed teardown.
if webrtcPeer := session.GetWebRTCPeer(); webrtcPeer != nil {
webrtcPeer.Destroy()
}
})
// The peer may have been removed if the user disconnected while
// waiting for the delayed teardown.
if webrtcPeer := session.GetWebRTCPeer(); webrtcPeer != nil {
webrtcPeer.Destroy()
}
}
if (!session.profile.CanConnect || !session.profile.CanLogin) && session.state.IsConnected {
@@ -77,18 +72,6 @@ func (session *SessionCtx) IsHost() bool {
return session.manager.isHost(session)
}
// only needed for legacy webrtc handler
func (session *SessionCtx) LegacyIsHost() bool {
settings := session.manager.Settings()
if !session.profile.CanHost || session.PrivateModeEnabled() {
return false
}
if settings.LockedControls && !session.profile.IsAdmin {
return false
}
return settings.ImplicitHosting || session.manager.isHost(session)
}
func (session *SessionCtx) SetAsHost() {
session.manager.setHost(session, session)
}