FAQ
Effective Stash

Writing Efficient Configuration Files

Due to the memory limitations of iOS Network Extension, which restricts usage to 15 MB in iOS 14 and 50 MB in iOS 15+, having an unreasonable configuration file may cause Stash to be closed by iOS. Here are some suggestions to help you write efficient configuration files.

Configure Reasonable DNS Servers

Stash will query all DNS servers simultaneously and cache the DNS query results using the LRU algorithm. On mobile devices, configuring 1 to 2 DNS servers should meet your needs.

  • Using DoH, DoT, DoQ consumes more resources and generally has higher latency compared to traditional UDP-based queries.
  • Stash uses Fake IP to avoid the need for proxy requests to perform local DNS queries. For Chinese users, it is recommended to use domestic DNS servers. Configuring foreign DNS services like 8.8.8.8 / 1.1.1.1 has no meaning.

Use Rule Sets

For scenarios requiring a large number of rules such as ad blocking, traffic routing based on IP geolocation, etc., using domain / ipcidr rule sets can reduce memory usage and improve matching speed.

⚠️

It is not recommended to use a large number of classical rule sets as this significantly increases Stash's memory usage.

Disable QUIC Protocol

The HTTP3 / QUIC protocol is based on UDP and is less efficient in the current network environment. It is recommended to disable it using Script Shortcuts.

script:
  shortcuts:
    quic: network == 'udp' and dst_port == 443
 
rules:
  - SCRIPT,quic,REJECT