1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-06-23 03:10:00 -04:00

announce deprecated proto settings

This commit is contained in:
Darien Raymond
2018-09-21 16:54:06 +02:00
parent 97f232cd5d
commit 909cb9b27a
6 changed files with 18 additions and 0 deletions

View File

@@ -37,6 +37,9 @@ func NewServer(ctx context.Context, config *ServerConfig) (*Server, error) {
func (s *Server) policy() core.Policy {
config := s.config
p := s.v.PolicyManager().ForLevel(config.UserLevel)
if config.Timeout > 0 {
core.PrintDeprecatedFeatureWarning("Socks timeout")
}
if config.Timeout > 0 && config.UserLevel == 0 {
p.Timeouts.ConnectionIdle = time.Duration(config.Timeout) * time.Second
}