0
mirror of https://github.com/XTLS/Xray-core.git synced 2025-06-19 06:39:48 +03:00

Config: Remove more legacy fields (#3817)

This commit is contained in:
Kobe Arthur Scofield
2024-09-19 09:05:59 +08:00
committed by GitHub
parent f406b2dee0
commit 57a41f3b4b
52 changed files with 569 additions and 1157 deletions

View File

@ -54,12 +54,6 @@ func NewServer(ctx context.Context, config *ServerConfig) (*Server, error) {
func (s *Server) policy() policy.Session {
config := s.config
p := s.policyManager.ForLevel(config.UserLevel)
if config.Timeout > 0 {
errors.PrintDeprecatedFeatureWarning("Socks timeout", "Policy level")
}
if config.Timeout > 0 && config.UserLevel == 0 {
p.Timeouts.ConnectionIdle = time.Duration(config.Timeout) * time.Second
}
return p
}