documentation: Add rule action

This commit is contained in:
世界
2025-01-13 15:14:29 +08:00
parent 467b1bbeeb
commit 28ec898a8c
22 changed files with 1076 additions and 43 deletions
+1 -1
View File
@@ -34,7 +34,7 @@ func (h *Inbound) UnmarshalJSONContext(ctx context.Context, content []byte) erro
}
registry := service.FromContext[InboundOptionsRegistry](ctx)
if registry == nil {
return E.New("missing inbound options registry in context")
return E.New("missing Inbound fields registry in context")
}
options, loaded := registry.CreateOptions(h.Type)
if !loaded {
-6
View File
@@ -148,9 +148,6 @@ func (r *RouteActionOptions) UnmarshalJSON(data []byte) error {
if err != nil {
return err
}
if r.Outbound == "" {
return E.New("missing outbound")
}
return nil
}
@@ -189,9 +186,6 @@ func (r *DNSRouteActionOptions) UnmarshalJSONContext(ctx context.Context, data [
if err != nil {
return err
}
if r.Server == "" {
return E.New("missing server")
}
if r.DisableCache || r.RewriteTTL != nil || r.ClientSubnet != nil {
deprecated.Report(ctx, deprecated.OptionLegacyDNSRouteOptions)
}