Skip to content

ClashConnectRules/Self-Configuration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

12 Commits
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ”ฎ Self-Configuration

Personal Proxy Tool Configuration Collection

ไธชไบบไปฃ็†ๅทฅๅ…ท้…็ฝฎๆ–‡ไปถ้›†ๅˆ

Clash Surge License

Features โ€ข Clash โ€ข Surge โ€ข Providers โ€ข Sources

๐Ÿ‡จ๐Ÿ‡ณ ็ฎ€ไฝ“ไธญๆ–‡ | ๐Ÿ‡บ๐Ÿ‡ธ English


โœจ Features

  • ๐Ÿš€ High Performance - Optimized configurations for maximum speed
  • ๐ŸŽฏ Smart Routing - Intelligent traffic splitting and regional selection
  • ๐Ÿ›ก๏ธ Privacy Protection - Built-in ad blocking and tracker prevention
  • ๐ŸŒ Global Streaming - Netflix, Disney+, YouTube, TikTok unlock support
  • ๐Ÿค– AI Services - Dedicated routing for ChatGPT, Claude, Gemini
  • ๐Ÿ“ฑ Cross-Platform - Support for Clash, Surge, Stash, and more
  • โšก Auto Failover - Automatic URL testing for optimal node selection
  • ๐Ÿ”„ Easy Updates - Integrated subscription management

๐Ÿ“ File Structure

Self-Configuration/
โ”œโ”€โ”€ Clash.yaml      # Clash / Clash Meta configuration
โ””โ”€โ”€ README.md       # Documentation

 ๐Ÿ”ถ Surge Configuration โ†’ https://github.com/ClashConnectRules/Surge

๐Ÿ”ท Clash Configuration

Compatible Clients: Clash ยท Clash for Windows ยท Clash Meta ยท Stash ยท FlClash

โš™๏ธ Basic Settings

Setting Value Description
Mixed Port 7890 Shared HTTP/SOCKS5 port
Controller 9090 Web dashboard port
Mode Rule Rule-based routing mode
Allow LAN true Allow LAN connections
IPv6 true IPv6 support enabled
Enhanced Mode Fake-IP Enhanced performance mode

๐ŸŒ DNS Configuration

Type Server Provider
DoT tls://223.5.5.5:853 Alibaba DNS
DoT tls://223.6.6.6:853 Alibaba DNS
DoH https://doh.pub/dns-query DNSPod
DoH https://dns.alidns.com/dns-query Alibaba DNS

๐ŸŽฏ Proxy Groups

๐Ÿš€ Main Selection Groups

Group Type Description
่Š‚็‚น้€‰ๆ‹ฉ select Main entry point for policy selection
ๆ‰‹ๅŠจๅˆ‡ๆข select Manual node selection
่‡ชๅŠจ้€‰ๆ‹ฉ url-test Auto-select lowest latency node

๐ŸŒ Regional Groups

Group Filter Pattern Region
๐Ÿ‡ญ๐Ÿ‡ฐ Hong Kong ๆธฏ|HK|Hong Kong Hong Kong SAR
๐Ÿ‡ฏ๐Ÿ‡ต Japan ๆ—ฅ|JP|Japan Japan
๐Ÿ‡บ๐Ÿ‡ธ United States ็พŽ|US|United States USA
๐Ÿ‡ธ๐Ÿ‡ฌ Singapore ๆ–ฐ|SG|Singapore Singapore
๐Ÿ‡น๐Ÿ‡ผ Taiwan ๅฐ|TW|Taiwan Taiwan
๐Ÿ‡ฐ๐Ÿ‡ท Korea ้Ÿฉ|KR|Korea South Korea
๐Ÿ‡ฌ๐Ÿ‡ง United Kingdom ่‹ฑ|UK|United Kingdom UK
๐Ÿ‡ฉ๐Ÿ‡ช Germany ๅพท|DE|Germany Germany
๐Ÿ‡ซ๐Ÿ‡ท France ๆณ•|FR|France France
๐ŸŒ Other Regions Exclude above Other regions

๐Ÿ“ฆ Service-Specific Groups

Group Default Purpose
๐Ÿค– AIๆœๅŠก Proxy ChatGPT, Claude, Gemini
๐Ÿ“น YouTube Proxy YouTube videos
๐Ÿ” ่ฐทๆญŒๆœๅŠก Proxy Google Search, Maps
๐Ÿ“ง Google FCM Proxy Push notifications
โœˆ๏ธ Telegram Proxy Messaging service
๐ŸŽ AppleๆœๅŠก DIRECT Apple services
โ“‚๏ธ ๅพฎ่ฝฏๆœๅŠก DIRECT Microsoft services
๐ŸŒ ๅ›ฝๅค–ๅช’ไฝ“ Proxy Netflix, Disney+, etc.
๐ŸŽฏ ๅ›ฝๅ†…ๆต้‡ DIRECT Mainland China sites
๐Ÿซง WeChat DIRECT WeChat messaging
๐Ÿšซ ๅนฟๅ‘Šๆ‹ฆๆˆช REJECT Ad blocking

๐Ÿ“‹ Rule Priority

 1. ๐Ÿšซ Ad Blocking      โ†’ REJECT
 2. โšก Special Rules    โ†’ DIRECT
 3. ๐Ÿค– AI Services      โ†’ Proxy
 4. ๐ŸŽฌ Streaming        โ†’ Proxy
 5. ๐Ÿ“บ CN Media         โ†’ DIRECT
 6. ๐Ÿ’ฌ Messaging        โ†’ Proxy
 7. ๐Ÿ”ง Tech Services    โ†’ Auto
 8. ๐Ÿ’ฐ Cryptocurrency   โ†’ Proxy
 9. ๐ŸŽฎ Gaming           โ†’ Auto
10. ๐Ÿ‡จ๐Ÿ‡ณ CN Rules        โ†’ DIRECT
11. ๐ŸŒ GeoIP CN         โ†’ DIRECT
12. ๐ŸŒ Final Rule       โ†’ Proxy

๐Ÿš€ Quick Start

1. Import Configuration

Download Clash.yaml and import it to your client.

2. Update Subscription URL

Replace the subscription URL in the configuration:

proxy-providers:
  all-proxies:
    type: http
    url: "https://your-subscription-url"
    interval: 3600
    path: ./providers/all-proxies.yaml
    health-check:
      enable: true
      interval: 600
      url: http://www.gstatic.com/generate_204

3. Enable and Select Nodes

Enable the configuration and select your preferred nodes.


๐Ÿ”ถ Surge Configuration

๐Ÿ‘‰ Surge configuration has been moved to: ClashConnectRules/Surge

Surge

Feature Description
๐Ÿš€ Smart Routing Intelligent traffic splitting
๐Ÿ›ก๏ธ Ad Blocking Multi-source ad rules
๐ŸŒ Streaming Unlock Netflix, Disney+, YouTube, TikTok
๐Ÿค– AI Services ChatGPT, Claude, Gemini dedicated routing
๐Ÿ“ฑ Cross-Platform iOS & macOS support

๐Ÿ”— Multiple Proxy Providers

When you have multiple subscription sources, you can integrate them as follows:

1. Configure Multiple Providers

proxy-providers:
  provider-1:
    type: http
    url: "https://subscription-1.com"
    interval: 3600
    path: ./providers/provider-1.yaml
    health-check:
      enable: true
      interval: 600
      url: http://www.gstatic.com/generate_204

  provider-2:
    type: http
    url: "https://subscription-2.com"
    interval: 3600
    path: ./providers/provider-2.yaml
    health-check:
      enable: true
      interval: 600
      url: http://www.gstatic.com/generate_204

2. Integration Methods

Method A: Proxy Groups

proxy-groups:
  # Auto-select fastest node from all providers
  - name: "Auto"
    type: url-test
    use:
      - provider-1
      - provider-2
    url: http://www.gstatic.com/generate_204
    interval: 300

  # Manual selection from all providers
  - name: "Manual"
    type: select
    use:
      - provider-1
      - provider-2

  # Regional groups with filter
  - name: "Hong Kong"
    type: url-test
    use:
      - provider-1
      - provider-2
    filter: "ๆธฏ|HK|Hong Kong"
    url: http://www.gstatic.com/generate_204
    interval: 300

Method B: Load Balancing

proxy-groups:
  - name: "Load-Balance"
    type: load-balance
    use:
      - provider-1
      - provider-2
    strategy: consistent-hashing  # or round-robin
    url: http://www.gstatic.com/generate_204

3. Key Parameters

Parameter Description
use Specify which proxy providers to use
filter Filter nodes by name (supports regex)
url-test Auto-test latency and select fastest
load-balance Distribute traffic across nodes
select Manual selection mode

4. Best Practices

๐Ÿ’ก Tip: Follow these practices for optimal performance

  • Regional Grouping - Use filter to group nodes by region
  • Smart Selection - Use url-test for automatic optimal node selection
  • Regular Updates - Set appropriate interval for subscription updates
  • Health Check - Enable health-check to filter unavailable nodes
  • Backup Sources - Configure multiple subscriptions for higher availability

๐Ÿ“š Rule Sources

Source Description Provider
[dler-io/Rules] Main Clash ruleset @dler-io
[blackmatrix7] Cross-platform rules @blackmatrix7
[SukkaW/Surge] SKK ruleset @SukkaW
[VirgilClyne] ASN rules @VirgilClyne
[Semporia] TikTok unlock @Semporia

โš ๏ธ Important Notes

Item Description
๐Ÿ”— Subscription Must replace with your own subscription URL
๐Ÿ”„ Rule Update Rules auto-update every 7 days
โฑ๏ธ Speed Test 300s interval, 3s timeout
๐Ÿ” MITM Certificate Required for Surge URL rewrite
๐Ÿ” Node Filter Auto-filter nodes with "traffic/reset/expire" keywords

๐Ÿ“„ License

This project is licensed under the MIT License.


Made with โค๏ธ for a better internet experience

โฌ† Back to Top

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages