Skip to content

Latest commit

 

History

26 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Surge Enhancer

Proxy subscription manager that bridges Surge with Mihomo (Clash.Meta), enabling Surge to use proxy protocols it doesn't natively support (SS, VMess, VLESS, Trojan, Hysteria2, etc.) via a single Mihomo process.

Problem

Surge's external-proxy feature spawns one process per node — unacceptable for 50–200 nodes. Surge Enhancer uses Mihomo as a single-process middleware with one SOCKS5 listener per node, so Surge connects to each as a regular socks5 proxy.

Surge → (socks5) → Mihomo (127.0.0.1:PORT) → (ss/vmess/...) → Remote Server

Implementations

Backend Mihomo
Language Rust
Build cargo build --release

Features

  • Multi-subscription support — fetch from multiple providers, each as a "group"
  • Format auto-detection — Clash YAML (including flow mappings), base64-encoded URI lists, plain URI lists
  • Mihomo config generation — merges proxies + listeners into your mihomo template
  • Surge-compatible HTTP APIpolicy-path=http://127.0.0.1:9300/surge/group/ProviderA
  • HTMX dashboard — view node status, trigger refreshes, test delays
  • Scheduled refresh — periodically re-fetches subscriptions and reloads mihomo
  • Regex filtering — include/exclude nodes by name pattern per group
  • Disk-level subscription cache — falls back on fetch failure; only updated after successful parse
  • CRUD API — add/update/delete groups at runtime

Prerequisites

  • Mihomo installed and available in PATH

Install

Download binary (recommended)

Download from Releases:

  • surge-enhancer-macos-arm64

Build from source

cargo build --release

Quick Start

  1. Create config.yaml (see config.example.yaml)
  2. Prepare a mihomo template YAML with your DNS/rules
  3. Run:
surge-enhancer config.yaml
  1. Point Surge to http://127.0.0.1:9300/surge/group/YourGroup
  2. Open http://127.0.0.1:9300 for the dashboard

License

MIT

About

External proxy server for surge.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages