Skip to content

Instantly share code, notes, and snippets.

@dismory
Last active January 28, 2026 12:56
Show Gist options
  • Select an option

  • Save dismory/5aa2570c17e2db1cecb788a4de55b08e to your computer and use it in GitHub Desktop.

Select an option

Save dismory/5aa2570c17e2db1cecb788a4de55b08e to your computer and use it in GitHub Desktop.
Surge Module: OrbStack .orb.local 域名直连
#!name=OrbStack Local
#!desc=让 OrbStack 的 .orb.local 域名使用真实 IP 并直连(支持增强模式)
#!system=mac
[General]
always-real-ip = %APPEND% *.orb.local
[Rule]
# 域名直连
DOMAIN-SUFFIX,orb.local,DIRECT
# OrbStack VMs
IP-CIDR,192.168.128.0/17,DIRECT,no-resolve
# OrbStack Docker
IP-CIDR,198.19.0.0/16,DIRECT,no-resolve
# Kubernetes Pod CIDR
IP-CIDR,10.244.0.0/16,DIRECT,no-resolve
# Kubernetes Service CIDR
IP-CIDR,10.96.0.0/12,DIRECT,no-resolve
[Script]
orb-dns = type=dns,script-path=https://gist.githubusercontent.com/dismory/5aa2570c17e2db1cecb788a4de55b08e/raw/surge-orb-dns.js
[Host]
*.orb.local = script:orb-dns
// OrbStack DNS resolver for Surge
// 使用系统/路由器 DNS 解析 .orb.local 域名(绕过增强模式)
$done({ servers: $network.dns })
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment