mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-04-30 01:08:33 +00:00
Errors: Add PrintRemovedFeatureError & PrintDeprecatedFeatureWarning (#3804)
This commit is contained in:
parent
3fed0c773f
commit
5f0642a671
8 changed files with 32 additions and 25 deletions
|
@ -16,7 +16,6 @@ import (
|
|||
"github.com/xtls/xray-core/common/signal"
|
||||
"github.com/xtls/xray-core/common/task"
|
||||
"github.com/xtls/xray-core/core"
|
||||
"github.com/xtls/xray-core/features"
|
||||
"github.com/xtls/xray-core/features/policy"
|
||||
"github.com/xtls/xray-core/features/routing"
|
||||
"github.com/xtls/xray-core/proxy/http"
|
||||
|
@ -56,7 +55,7 @@ func (s *Server) policy() policy.Session {
|
|||
config := s.config
|
||||
p := s.policyManager.ForLevel(config.UserLevel)
|
||||
if config.Timeout > 0 {
|
||||
features.PrintDeprecatedFeatureWarning("Socks timeout")
|
||||
errors.PrintDeprecatedFeatureWarning("Socks timeout", "Policy level")
|
||||
}
|
||||
if config.Timeout > 0 && config.UserLevel == 0 {
|
||||
p.Timeouts.ConnectionIdle = time.Duration(config.Timeout) * time.Second
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue