Skip to content

About

ShadowRocket Scripts

Resources

Stars

2 stars

Watchers

1 watching

Forks

Latest commit

 

History

118 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Shadowrocket Configuration

A comprehensive Shadowrocket configuration repository with optimized proxy rules, domain lists, and server configurations for enhanced privacy and access control.

📋 Overview

This repository contains Shadowrocket configuration files designed to provide:

  • Smart routing based on geographical location and service type
  • Ad blocking and privacy protection
  • Optimized access to various services and platforms
  • Country-specific proxy configurations

🗂️ Project Structure

shadowrocket/
├── README.md                 # This file
├── CNAME                     # Custom domain configuration (e.g., shadowrocket.ebac.dev)
├── ru.conf                   # Main configuration (static rules)
├── ru2.conf                  # Alternative configuration using hosted RULE-SETs
├── happ.conf.tpl             # HAPP config template with embedded routing payload
├── happ.routing.json         # Source routing JSON for happ.conf.tpl
├── happ-auto.conf.tpl        # HAPP JSON subscription: full Xray configs with ordered failover
├── happ-auto.routing.json    # Source routing profile for happ-auto.conf.tpl
├── ebac-happ.conf.tpl        # HAPP JSON subscription for ebac: failover + routing by lists/
├── contabo.conf.tpl          # Contabo server config template (copy → contabo.conf)
├── cloudflare-worker.js      # Optional Cloudflare Worker for rules hosting
└── lists/                    # Domain and service-specific lists (hosted)
    ├── ads.list             # Advertisement/analytics domains
    ├── apple-private.list   # Apple private relay and related
    ├── binance.list         # Binance-related domains
    ├── chatgpt.list         # ChatGPT/OpenAI domains
    ├── claude.list          # Claude/Anthropic domains
    ├── google.list          # Google services
    ├── meta.list            # Meta/Facebook services
    ├── rutracker.list       # RuTracker domains
    ├── telegram.list        # Telegram servers
    ├── tiktok.list          # TikTok domains
    ├── twitter.list         # Twitter/X domains
    ├── whatsapp.list        # WhatsApp domains
    └── zoom.list            # Zoom meeting domains

⚙️ Configuration Files

Main Configurations

  • ru.conf - Primary configuration with local inline rules
  • ru2.conf - Alternative configuration that references hosted RULE-SETs
  • happ.conf.tpl - HAPP configuration template with embedded base64 routing JSON
  • happ.routing.json - Source routing JSON for happ.conf.tpl
  • happ-auto.conf.tpl - HAPP JSON subscription (see below)
  • ebac-happ.conf.tpl - HAPP JSON subscription for ebac, routed by lists/ (see below)
  • contabo.conf.tpl - Template for Contabo servers (copy to contabo.conf and fill in)
  • cloudflare-worker.js - Worker script to serve lists/configs via Cloudflare

Updating happ.conf.tpl

When changing routing rules in happ.routing.json, update the timestamp fields in that file as well:

  • LastUpdated
  • lastUpdatedDate

Then encode the routing JSON and copy it to the clipboard:

base64 -i happ.routing.json | tr -d '\n' | pbcopy

Paste the resulting value after happ://routing/onadd/ in happ.conf.tpl.

happ-auto.conf.tpl (HAPP JSON subscription)

First line #HAPP,JSON,AUTH; the following #key: value lines are HAPP directives, sent as response headers. The rest is an Xray client config skeleton: the subscription service puts the servers of the sub= group in place of "PROXY_OUTBOUNDS" and routes rules whose balancerTag/outboundTag is "PROXY" to them. The response is a JSON array:

  • Auto (the skeleton's remarks) — every server of the group in the group's order: the first while its health checks pass (burstObservatory, settings from the skeleton), else the next; the last one takes over when all others fail. Switching takes up to interval × sampling.
  • one config per server, to pin one by hand.

HAPP passes JSON configs to Xray as they are, adding the rules of the subscription's routing profile (#routing: → the routing header; source happ-auto.routing.json, base64 after happ://routing/onadd/, bump LastUpdated on every change). That profile is what makes geoip:ru / geosite:category-ru work: HAPP downloads its Geoipurl/Geositeurl and attaches them to the JSON configs — without one, geo rules silently match nothing, and a geoip file without the requested tag stops the core ("section RU is missing"). Hence runetfreedom's geoip (has ru) and v2fly's dlc.dat (has category-ru; runetfreedom's geosite is over jsDelivr's 20 MB limit). The skeleton's own domain rules (.ru, .рф, .su, …) still send Russian sites direct if the geo files fail to download. Only VLESS servers (REALITY, XHTTP) can appear here. Sniffing uses "routeOnly": false: the server gets the sniffed name, not the address the app dialled — apps often dial IPv6 (YouTube on Google's v6), and exits without IPv6 fail those; with the name the server resolves IPv4 itself.

ebac-happ.conf.tpl (HAPP JSON, routed by lists)

The same failover as happ-auto.conf.tpl, routed like ebac.conf.tpl: only the sites in lists/ go through the proxy, everything else goes direct, ads.list is blocked. A routing rule names its lists in "ruleSet": [<list url>, …]; the subscription service expands them into Xray domain / ip rules (NETSET ranges included; IP-ASN has no Xray equivalent and is dropped — keep a NETSET next to it). QUIC (UDP 443) to listed sites is blocked so apps fall back to TCP through the proxy. The final direct rule is required: Xray sends unmatched traffic to its first outbound, which is the proxy. No routing profile is sent — the skeleton has no geo rules. Use it with sub=happ (servers in failover order).

Key Features

Proxy Groups

  • proxy - General proxy with automatic testing
  • il - Israel-specific proxy group
  • br - Brazil-specific proxy group
  • us - United States-specific proxy group

Smart Routing

  • Geographic routing based on IP location
  • Service-specific routing for social media and streaming
  • Local network bypass for internal resources
  • Ad blocking and privacy protection

🎯 Domain Lists

The lists/ directory contains specialized domain lists for different services. These lists are also hosted for remote inclusion.

List Purpose Description
ads.list Ad Blocking Advertisement and tracking domains
apple-private.list Apple Apple Private Relay and related
binance.list Crypto Trading Binance exchange domains
chatgpt.list AI Services ChatGPT and OpenAI domains
claude.list AI Services Claude and Anthropic domains
constructor.list Corporate Constructor Group domains (constr.dev, constructor.tech/.org/.dev)
google.list Google Services Google search, maps, and other services
meta.list Social Media Facebook, Instagram, and Meta services
rutracker.list File Sharing RuTracker torrent tracker
telegram.list Messaging Telegram servers and domains
tiktok.list Social Media TikTok and ByteDance services
twitter.list Social Media Twitter/X platform domains
whatsapp.list Messaging WhatsApp messaging service
zoom.list Video Conferencing Zoom meeting and webinar domains

🌐 Hosted Endpoints

  • Lists base URL: https://s.dimonb.com/lists/
    • Example: https://s.dimonb.com/lists/ads.list
    • Used in ru2.conf via RULE-SET,https://s.dimonb.com/lists/<name>.list,...
  • CNAME: shadowrocket.ebac.dev (for custom hosting/config delivery)

🚀 Quick Start

  1. Clone the repository:

    git clone https://github.com/yourusername/shadowrocket.git
    cd shadowrocket
  2. Choose your configuration:

    • Inline rules (local file): use ru.conf
    • Hosted lists (remote RULE-SETs): use ru2.conf
    • Contabo servers: copy contabo.conf.tpl → contabo.conf and adjust values
  3. Import to Shadowrocket:

    • Open Shadowrocket app
    • Go to Settings → Config
    • Import the chosen configuration file (or a URL if hosted)
  4. Customize domain lists:

    • Modify files in lists/ directory as needed
    • For hosted usage, deploy updated lists to your hosting (see below)

🔧 Configuration Details

DNS Settings

  • Primary: 1.1.1.1 (Cloudflare)
  • Secondary: 1.0.0.1 (Cloudflare)
  • Tertiary: 8.8.8.8 (Google)
  • Fallback: System DNS

Proxy Testing

  • Interval: 600 seconds (10 minutes)
  • Tolerance: 100ms
  • Timeout: 5 seconds
  • Test URL: http://www.gstatic.com/generate_204

Geographic Rules

  • Russia: Direct connection (in ru.conf)
  • China: Direct connection
  • Israel: Israel proxy group
  • Brazil: Brazil proxy group
  • Other countries: General proxy

NetBird (Constructor VPN) alongside Clash

clash-meta.conf.tpl and ebac-clash.conf.tpl let NetBird run in parallel: every constructor.list domain (constr.dev, constructor.tech/.org/.dev, dev-constructor.dev) is excluded from fake-ip, and internal addresses (10.0.0.0/8, 172.16.0.0/12, 100.64.0.0/10) go DIRECT above constructor.list, so they reach the NetBird tunnel instead of PROXY. These rules sit last, just before MATCH: an IP rule resolves the name, so only names no other list matched pay for the lookup. Keep fake-ip-filter in step with constructor.list.

Clash Verge with both TUN and System Proxy on: the subscription cannot set the system proxy bypass, so add *.constr.dev;*.constructor.tech;*.constructor.org;*.constructor.dev;*.dev-constructor.dev;10.*;100.100.* in Settings → System Proxy → Proxy Bypass, or turn System Proxy off (TUN does not need it).

🛡️ Privacy Features

  • Ad blocking for common advertising networks
  • Analytics blocking (e.g., Yandex Metrica)
  • Social media routing through proxies
  • Local network protection

☁️ Hosting Notes

  • Lists are referenced remotely in ru2.conf using https://s.dimonb.com/lists/*.list.
  • You can self-host using a static site/CDN or the provided cloudflare-worker.js.
  • If using a custom domain, set the CNAME (example provided in CNAME).

🔄 Updates

This configuration is regularly updated to:

  • Add new service domains
  • Update proxy server lists
  • Improve routing rules
  • Enhance privacy protection

📝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test thoroughly
  5. Submit a pull request

📄 License

This project is open source. If you need a specific license, add a LICENSE file (e.g., MIT).

⚠️ Disclaimer

This configuration is provided for educational and personal use. Users are responsible for complying with local laws and regulations regarding internet usage and proxy services.

🔗 Links


Last updated: 2026-04-29

About

ShadowRocket Scripts

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages