mirror of
https://github.com/m1k1o/neko.git
synced 2026-11-03 08:21:50 -06:00
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:
@@ -266,7 +266,7 @@ func (s *Member) Set() {
|
||||
}
|
||||
|
||||
func (s *Member) SetV2() {
|
||||
enableLegacy := false
|
||||
deprecatedV2ConfigUsed := false
|
||||
|
||||
if viper.IsSet("password") || viper.IsSet("password_admin") {
|
||||
s.Provider = "multiuser"
|
||||
@@ -281,12 +281,10 @@ func (s *Member) SetV2() {
|
||||
s.Multiuser.AdminPassword = "admin"
|
||||
}
|
||||
log.Warn().Msg("you are using v2 configuration 'NEKO_PASSWORD' and 'NEKO_PASSWORD_ADMIN' which are deprecated, please use 'NEKO_MEMBER_MULTIUSER_USER_PASSWORD' and 'NEKO_MEMBER_MULTIUSER_ADMIN_PASSWORD' with 'NEKO_MEMBER_PROVIDER=multiuser' instead")
|
||||
enableLegacy = true
|
||||
deprecatedV2ConfigUsed = true
|
||||
}
|
||||
|
||||
// set legacy flag if any V2 configuration was used
|
||||
if !viper.IsSet("legacy") && enableLegacy {
|
||||
log.Warn().Msg("legacy configuration is enabled because at least one V2 configuration was used, please migrate to V3 configuration, visit https://neko.m1k1o.net/docs/v3/migration-from-v2 for more details")
|
||||
viper.Set("legacy", true)
|
||||
if deprecatedV2ConfigUsed {
|
||||
log.Warn().Msg("deprecated V2 configuration is in use; migrate to V3 configuration, see https://neko.m1k1o.net/docs/v3/migration-from-v2")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user