Skip to content

block ​

Refuse a connection. In ours this is not an outbound but a route action: a rule with to: block or route.final: block. The loader rejects a block: outbound: there is no block outbound: refuse with the route action to: block.

A connection that ends up in block is closed without trying to connect to the target.

Example ​

yaml
inbounds:
  local:
    mixed:
      listen: 127.0.0.1:1080
outbounds:
  direct:
    direct:
route:
  rules:
    - match:
        domain_suffix: ads.example.org
      to: block
  final:
    outbound: direct

Forbid everything the rules do not allow:

yaml
outbounds:
  direct:
    direct:
route:
  rules:
    - match:
        domain_suffix: example.com
      to:
        outbound: direct
  final: block

The rule syntax is in the configuration.

The difference from sing-box: there block is an outbound ("type": "block"), here it is only a route action.

GPL-3.0-or-later