Skip to content

Providers ​

Some proxy tools load proxies or rules from separate files or URLs, called providers. Specola Core does not have providers. This page lists what Core does with provider settings it finds, and what to use instead.

What Core does with provider settings ​

SettingResult
[[proxy-provider]]error: Unsupported top-level field 'proxy-provider'; supported: general, proxy, proxy-group, route, dns, sniffer, enhanced-mode. ...
use = [...] in a [[proxy-group]]error: proxy-group[<n>]: unknown field 'use'
rule-providersignored with the warning Ignoring configuration field 'rule-providers' in the minimal build
RULE-SET,<name>,... naming a rule providererror, because no [route] rule-set has that name

Sharing proxies between profiles ​

List proxies as [[proxy]] in the profile, and refer to them by name in groups:

toml
[[proxy]]
name = "team-tokyo"
type = "trojan"
server = "tokyo.example.org"
port = 443
password = "replace-with-password"
tls = { server-name = "tokyo.example.org" }

[[proxy]]
name = "team-frankfurt"
type = "trojan"
server = "frankfurt.example.org"
port = 443
password = "replace-with-password"
tls = { server-name = "frankfurt.example.org" }

[[proxy-group]]
name = "team"
type = "url-test"
proxies = ["team-tokyo", "team-frankfurt"]
url = "https://www.gstatic.com/generate_204"
interval = 300

To use the same proxies in several profiles, put them in a module and apply the module to each profile. A group in a module can list proxies from the module and from the profile. When a proxy changes, edit the module once and activate the profile again.

Group members must be proxies, DIRECT or REJECT; a group cannot contain another group. See Proxy Groups.

Reusing and downloading rules ​

Lists of rules go in [route] rule-set and are used with a RULE-SET rule:

toml
[route]
rules = [
  "RULE-SET,ads,REJECT",
  "RULE-SET,dev-sites,work",
  "FINAL,DIRECT",
]
rule-set = [
  { name = "dev-sites", type = "inline", behavior = "classical", rules = ["DOMAIN-SUFFIX,github.com", "DOMAIN-SUFFIX,npmjs.org"] },
  { name = "ads", type = "remote", behavior = "domain", url = "https://rules.example.org/ads.txt" },
]

This is a fragment: work must be a proxy or group in the profile.

typeSource
inlinethe rules array in the profile
locala file, by default rule-sets/<name>.txt, which must exist
remotea URL, downloaded every time the profile loads; the cached copy is used when the download fails, and the load fails when there is no copy yet. proxy names a proxy to download through.

A remote rule set is not refreshed while the profile runs: activate the profile again to download it again. update_interval is accepted but has no effect. GeoIP and GeoSite data can also be downloaded, on the schedule set by geo-update. See Rules for rule sets, behavior, GeoIP and GeoSite.

Rule sets can live in a module too, and merge by name: a module's rule set replaces the profile's rule set of the same name.

Converting a profile from another tool ​

Move each provider's proxies into [[proxy]] entries, replace a group's use with the proxy names in proxies, and turn each rule provider into a rule-set entry. Then validate:

bash
specola-core --test-config --config converted.toml