From 8b489354e4f63237384c0202556d1eafec418d41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Sun, 4 May 2025 18:45:46 +0800 Subject: [PATCH] Undeprecate the `block` outbound --- docs/configuration/outbound/block.md | 4 ---- docs/configuration/outbound/block.zh.md | 4 ---- option/outbound.go | 2 +- 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/docs/configuration/outbound/block.md b/docs/configuration/outbound/block.md index 1be04dd5..6e232263 100644 --- a/docs/configuration/outbound/block.md +++ b/docs/configuration/outbound/block.md @@ -2,10 +2,6 @@ icon: material/delete-clock --- -!!! failure "Deprecated in sing-box 1.11.0" - - Legacy special outbounds are deprecated and will be removed in sing-box 1.13.0, check [Migration](/migration/#migrate-legacy-special-outbounds-to-rule-actions). - ### Structure ```json diff --git a/docs/configuration/outbound/block.zh.md b/docs/configuration/outbound/block.zh.md index 822478ce..93227476 100644 --- a/docs/configuration/outbound/block.zh.md +++ b/docs/configuration/outbound/block.zh.md @@ -2,10 +2,6 @@ icon: material/delete-clock --- -!!! failure "已在 sing-box 1.11.0 废弃" - - 旧的特殊出站已被弃用,且将在 sing-box 1.13.0 中被移除,参阅 [迁移指南](/migration/#migrate-legacy-special-outbounds-to-rule-actions). - `block` 出站关闭所有传入请求。 ### 结构 diff --git a/option/outbound.go b/option/outbound.go index 5cadd3e2..dc7a6f52 100644 --- a/option/outbound.go +++ b/option/outbound.go @@ -39,7 +39,7 @@ func (h *Outbound) UnmarshalJSONContext(ctx context.Context, content []byte) err return E.New("missing outbound options registry in context") } switch h.Type { - case C.TypeBlock, C.TypeDNS: + case C.TypeDNS: deprecated.Report(ctx, deprecated.OptionSpecialOutbounds) } options, loaded := registry.CreateOptions(h.Type)