Skip to content

http_clients — HTTP clients ​

Named HTTP clients through which remote rule-sets are downloaded. They are needed when a download needs its own headers, TLS settings or outbound.

yaml
http_clients:
  lists:
    detour: proxy
    headers:
      User-Agent: my-router
    tls:
      utls:
        fingerprint: chrome

rule_sets:
  ads:
    remote:
      url: https://example.org/ads.srs
      http_client: lists

route:
  final:
    outbound: direct
  default_http_client: lists

The key is the client's name.

FieldMeaning
detourThe outbound or group the requests go through. Without it, the outbound from route.final
headersHeaders of every request
tlsTLS settings for https://, the outbound tls block
versionThe HTTP version: 1, 2 (default), 3. Requests always use HTTP/1.1: 2 and 3 fall back to it
disable_version_fallbackForbid the version fallback. With version 2 or 3 it is a load error
engineOnly go (default)

Who uses a client:

  • a rule-set with http_client: <name>;
  • all remote rule-sets without a client of their own and without via, if route has default_http_client: <name>. Without default_http_client, the first client in http_clients is the default.

A client can also be described right in a rule-set: http_client: {detour: proxy}.

Only detour is supported among connection fields; others (interface, mark and so on) are a load error.

Subscriptions are downloaded by their own client and do not use http_clients.

GPL-3.0-or-later