Skip to main content

Policies

Loon processes traffic in the following order:

Receive request → Match rule → Select policy → Choose node

A rule specifies a policy, and the policy determines the final node. A policy can be a node, a built-in policy, or a policy group.

Node policies

A rule can specify a node directly:

# The node name is "Hong Kong 01"
DOMAIN,google.com,Hong Kong 01

Built-in policies

DIRECT

Connect to the destination directly without a proxy:

DOMAIN,apple.com,DIRECT

Reject policies

Reject policies are commonly used to block ads or unwanted requests:

PolicyBehavior
REJECTReturns 404 with an empty response body
REJECT-IMGReturns 200 with a 1×1 GIF
REJECT-DICTReturns 200 with an empty JSON object
REJECT-ARRAYReturns 200 with an empty JSON array
REJECT-DROPDrops the request without returning a response

Some apps retry immediately after a connection failure. Use REJECT-DROP with care if this causes a request storm.