English
Client with a subscription
A computer with a local SOCKS5/HTTP proxy: the servers come from the provider's subscription, the fastest one is chosen automatically, and in the dashboard you can switch to a direct connection. Ads from a list are dropped, the local network goes directly.
Configuration
yaml
inbounds:
local:
mixed:
listen: 127.0.0.1:1080
outbounds:
direct:
direct:
subscriptions:
provider:
remote:
url: https://panel.example.com/sub/abc
update: 6h
exclude: '(?i)expire|traffic'
group:
rank:
delay:
probe:
interval: 5m
groups:
proxy:
members: [provider, direct]
rank:
manual:
default: provider
rule_sets:
ads:
remote:
url: https://example.org/ads.srs
update: 24h
via: proxy
route:
rules:
- match:
rule_set: ads
to: block
- match:
ip_is_private: true
to:
outbound: direct
final:
group: proxy
cache:
path: ours-cache
admin:
listen: 127.0.0.1:9090- The subscription
providerbecomes the outboundsprovider/<server>and the groupprovider, which picks the server with the lowest delay. The formats the download understands (links, Clash YAML, Xray JSON) are in Subscription formats. excluderemoves the service "servers" that panels use to show the expiry date and the remaining traffic.proxyis a manual choice between the subscription and a direct connection; with nothing chosen, the subscription.cacheremembers the choice across restarts, as well as the last download of the subscription and of the rule-set: when there is no network at startup they are taken from there.adsis downloaded throughproxyonce a day;urlis any rule-set in sing-box.srsor JSON format (Rule-sets).adminopens the dashboard on127.0.0.1:9090; the address with a random login token is printed at startup (Dashboard).
Running
sh
ours run -c config.yaml
curl -x socks5h://127.0.0.1:1080 https://www.example.com/In the browser or the system, set the SOCKS5 proxy 127.0.0.1:1080 (or HTTP on the same port). With socks5h, and in browsers with "DNS through the proxy", names are resolved by the server, not by the local DNS.
If the provider serves the subscription only to "its own" clients, set its User-Agent in headers (Subscriptions). To check the download without running: ours check -c config.yaml --fetch.
If something does not work, see Troubleshooting.