FAQ
Effective Stash

Writing Efficient Configuration Files

Due to the iOS Network Extension limiting the use of 15 MB memory in iOS 14 and 50 MB memory in iOS 15+, unreasonable configuration files may cause Stash to be shut down by iOS. Here are some suggestions for writing efficient configuration files.

Configure Reasonable DNS Servers

Stash will initiate queries to all DNS servers at the same time, and then cache DNS queries through the LRU algorithm. On mobile devices, configuring 1 to 2 DNS servers is enough to meet usage scenarios.

  • DoH, DoT, DoQ will consume more resources than traditional UDP-based queries, and the delay is generally higher
  • Stash will use Fake IP to avoid the need for proxy requests to perform local DNS queries. For Chinese users, it is recommended to use domestic DNS, and there is no point in configuring 8.8.8.8 / 1.1.1.1 and other foreign DNS services.

Use Rule Sets

For scenarios that use a large number of rules, such as ad blocking and IP geographic information shunting, using domain / ipcidr rule sets will reduce memory usage and improve matching speed.

⚠️

It is not recommended to use a large number of classical rule sets, which will significantly increase the memory usage of Stash.

Disable QUIC Protocol

The HTTP3 / QUIC protocol is based on UDP, which is relatively inefficient in the current network environment. It is recommended to disable it through Script Shortcuts.

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