Browse Source

Mark deprecated features

世界 2 years ago
parent
commit
a1449ee40e
4 changed files with 17 additions and 2 deletions
  1. 13 0
      docs/deprecated.md
  2. 1 1
      inbound/default_tcp.go
  3. 2 1
      mkdocs.yml
  4. 1 0
      outbound/shadowsocksr.go

+ 13 - 0
docs/deprecated.md

@@ -0,0 +1,13 @@
+# Deprecated Feature List
+
+The following features will be marked deprecated in 1.5.0 and removed entirely in 1.6.0.
+
+#### ShadowsocksR
+
+ShadowsocksR support has never been enabled by default, since the most commonly used proxy sales panel in the
+illegal industry stopped using this protocol, it does not make sense to continue to maintain it.
+
+#### Proxy Protocol
+
+Proxy Protocol is added by Pull Request, has problems, is only used by the backend of HTTP multiplexers such as nginx,
+is intrusive, and is meaningless for proxy purposes.

+ 1 - 1
inbound/default_tcp.go

@@ -35,7 +35,7 @@ func (a *myInboundAdapter) ListenTCP() (net.Listener, error) {
 		a.logger.Info("tcp server started at ", tcpListener.Addr())
 		a.logger.Info("tcp server started at ", tcpListener.Addr())
 	}
 	}
 	if a.listenOptions.ProxyProtocol {
 	if a.listenOptions.ProxyProtocol {
-		a.logger.Debug("proxy protocol enabled")
+		a.logger.Warn("Proxy Protocol is deprecated, see https://sing-box.sagernet.org/deprecated")
 		tcpListener = &proxyproto.Listener{Listener: tcpListener, AcceptNoHeader: a.listenOptions.ProxyProtocolAcceptNoHeader}
 		tcpListener = &proxyproto.Listener{Listener: tcpListener, AcceptNoHeader: a.listenOptions.ProxyProtocolAcceptNoHeader}
 	}
 	}
 	a.tcpListener = tcpListener
 	a.tcpListener = tcpListener

+ 2 - 1
mkdocs.yml

@@ -30,9 +30,10 @@ theme:
     - navigation.sections
     - navigation.sections
     - header.autohide
     - header.autohide
 nav:
 nav:
-  - Getting Started:
+  - Home:
       - index.md
       - index.md
       - Features: features.md
       - Features: features.md
+      - Deprecated: deprecated.md
       - Support: support.md
       - Support: support.md
       - Change Log: changelog.md
       - Change Log: changelog.md
   - Installation:
   - Installation:

+ 1 - 0
outbound/shadowsocksr.go

@@ -37,6 +37,7 @@ type ShadowsocksR struct {
 }
 }
 
 
 func NewShadowsocksR(ctx context.Context, router adapter.Router, logger log.ContextLogger, tag string, options option.ShadowsocksROutboundOptions) (*ShadowsocksR, error) {
 func NewShadowsocksR(ctx context.Context, router adapter.Router, logger log.ContextLogger, tag string, options option.ShadowsocksROutboundOptions) (*ShadowsocksR, error) {
+	logger.Warn("ShadowsocksR is deprecated, see https://sing-box.sagernet.org/deprecated")
 	outboundDialer, err := dialer.New(router, options.DialerOptions)
 	outboundDialer, err := dialer.New(router, options.DialerOptions)
 	if err != nil {
 	if err != nil {
 		return nil, err
 		return nil, err