Proxy Protocols
Proxy Providers

Remote Proxy Set

Proxies declared directly in the configuration file cannot be automatically updated in the background. We recommend using remote proxy sets (proxy-provider), which can automatically update the strategy group from the URL in the background.

To use remote proxy sets, they must be defined under proxy-providers and referenced in proxy-groups.

proxy-providers:
  provider-a:
    url: https://raw.githubusercontent.com/STASH-NETWORKS-LIMITED/stash-example/main/config.yaml
    interval: 3600
    filter: 'example'
 
  provider-b:
    url: https://raw.githubusercontent.com/STASH-NETWORKS-LIMITED/stash-example/main/config.yaml
    interval: 3600
 
proxy-groups:
  - name: auto
    type: url-test
    interval: 300
    use:
      - provider-a # reference to provider-a
      - provider-b # reference to provider-b

A valid remote proxy set must contain the proxies field:

proxies:
  - name: 'ss1'
    type: ss
    server: server
    port: 443
    cipher: AEAD_CHACHA20_POLY1305
    password: 'password'
  - name: 'ss2'
    type: ss
    server: server
    port: 443
    cipher: AEAD_CHACHA20_POLY1305
    password: 'password'

Remote proxy sets support filtering proxy names using regular expressions through the filter field. When the remote proxy set is empty, it defaults to DIRECT.

Shortcut for Using Remote Proxy Sets

Stash also supports using use-url to quickly reference remote proxy sets in strategy groups. In this case, update time and name cannot be specified.

proxy-groups:
  - name: auto
    type: url-test
    interval: 300
    use-url:
      - https://raw.githubusercontent.com/STASH-NETWORKS-LIMITED/stash-example/main/config.yaml