- Swift 58.9%
- JavaScript 25.4%
- HTML 12.1%
- Shell 3.6%
| .github | ||
| BrowSync | ||
| BrowSync.xcodeproj | ||
| BrowSyncExtension | ||
| ChromiumExtension | ||
| screenshots | ||
| Sparkle/bin | ||
| .gitignore | ||
| appcast.xml | ||
| badge.png | ||
| BrowSync.entitlements | ||
| BrowSyncExtension.entitlements | ||
| CNAME | ||
| disabled-domains.json | ||
| index.html | ||
| LICENSE | ||
| package.sh | ||
| privacy.html | ||
| project.yml | ||
| README.md | ||
| README_zh.md | ||
| release-to-brew.sh | ||
| release.sh | ||
| test.sh | ||
BrowSync
[English] | 简体中文
BrowSync is a cross-browser routing and sync hub for macOS. It unites Safari and all Chromium-based browsers, intelligently routing links and syncing bookmarks and sessions in real-time.
brew install --cask chentao1006/tap/browsync
Important
Local Execution BrowSync's synchronization and URL routing happen locally on your device via a WebSocket daemon. Browsing data (bookmarks, cookies, local storage, active tabs) is stored on your machine without external server involvement.
🚀 Features
- URL Routing: Register BrowSync as the default macOS browser to direct links to specific browsers based on domain, URL patterns, query strings, source application, or time of day.
- Bookmark Sync: Sync bookmarks in real-time across Safari and all Chromium-based browsers.
- State Sync: Sync Cookies, LocalStorage, and sessionStorage across supported browsers to maintain login states.
- Tab Sharing: View active tabs across browsers. It filters out incognito tabs and non-HTTP(S) local pages, and deduplicates URLs.
- Sync Strategies: Supports unidirectional (master-slave), last-write-wins (based on access time), and bidirectional merging.
- Site Control: Manage sync scope with whitelist/blacklist rules and per-site policies.
- Local Network: Communication is handled locally via a WebSocket daemon (
ws://127.0.0.1:62333). No external servers are used. - Native macOS App: Built with SwiftUI. Supports Dark/Light themes, Menu Bar integration, and Launch at Login.
- iCloud Sync: Automatically sync your routing rules, settings, and site preferences across all your Mac devices via iCloud.
📸 Screenshots
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
🛠 Installation & Setup
1. Requirements
| Tool | Version |
|---|---|
| macOS | 14.0+ |
| Xcode | 15.0+ |
| Swift | 5.10+ |
| Homebrew | Latest |
| XcodeGen | 2.40+ |
2. Homebrew Cask
You can install BrowSync with Homebrew:
brew install --cask chentao1006/tap/browsync
Or tap the repository first:
brew tap chentao1006/tap
brew install --cask browsync
3. Build from Source
# 1. Clone the repo
git clone https://github.com/chentao1006/browsync.git
cd browsync
# 2. Generate Xcode project using XcodeGen
xcodegen generate
# 3. Open the generated project
open BrowSync.xcodeproj
Then in Xcode:
- Select the BrowSync target → Signing & Capabilities
- Set your Development Team
- Press ⌘R to build and run
4. Install Browser Extension
Chromium-based Browsers: You can install the BrowSync extension directly from the Chrome Web Store: Install from Chrome Web Store
Safari: The app includes a native Safari extension. After running the BrowSync app, you can enable it directly in Safari's Settings -> Extensions.
🔍 Architecture & Protocol
System Architecture
Safari Extension Chromium Extension
│ │
└──────────── WebSocket ─────────────┘
│
BrowSync Daemon
ws://127.0.0.1:62333
│
BrowSync App
(macOS native, SwiftUI)
Directory Structure
BrowSync/
├── BrowSync/ # macOS App (Swift/SwiftUI)
│ ├── App/ # Entry point, AppState
│ ├── Views/ # Multi-tab UI (Browsers, Rules, Sync)
│ ├── Core/ # DaemonServer, BrowserScanner, BrowserLauncher
│ ├── Models/ # Data models (Browser, Rule, SyncModels, WSMessage)
│ ├── Services/ # RulesEngine, SyncService, SettingsService
│ └── Resources/ # Info.plist, Localizable.strings (en + zh-Hans)
│
├── BrowSyncExtension/ # Safari Web Extension target
│ ├── SafariWebExtensionHandler.swift
│ └── Resources/
│ ├── manifest.json
│ ├── background.js # WebSocket client, bookmark/cookie/tab sharing
│ ├── content.js # localStorage/sessionStorage proxy
│ ├── popup.html
│ └── popup.js
│
├── ChromiumExtension/ # Shared MV3 extension (Chromium-based)
│ ├── manifest.json
│ ├── background/
│ │ └── service-worker.js # Same logic as Safari background.js
│ ├── content/
│ │ └── content-script.js
│ ├── popup/
│ │ ├── popup.html
│ │ └── popup.js
│ └── _locales/
│ ├── en/messages.json
│ └── zh_CN/messages.json
│
├── project.yml # XcodeGen configuration
├── BrowSync.entitlements # App entitlements (Sandbox: NO)
├── package.sh # Script to package the app
├── release.sh # Script to automate releases
├── test.sh # Script to run tests
├── index.html # Landing page
└── privacy.html # Privacy policy
WebSocket Protocol
All browser extensions connect to the BrowSync daemon at ws://127.0.0.1:62333.
- Registration:
{ "type": "register", "browser": "chrome", "instanceId": "chrome-main" } - Heartbeat (every 30s):
{ "type": "heartbeat" } - Sync:
{
"type": "sync",
"browser": "safari",
"site": "chatgpt.com",
"category": "bookmarks",
"payload": { "kind": "bookmarks", "bookmarks": [...] },
"messageId": "uuid",
"timestamp": 1234567890
}
📁 Data Directory & Identifiers
BrowSync stores its data locally in your Application Support folder:
~/Library/Application Support/BrowSync/
├── sites/ # Per-site sync state
├── bookmarks/ # Synced bookmark snapshots
├── logs/ # sync-YYYY-MM-DD.log
└── settings.json # All app settings
Bundle IDs:
- App:
com.ct106.browsync - Safari Extension:
com.ct106.browsync.extension - App Group:
group.com.ct106.browsync
🎯 Feature Status (MVP)
| Feature | Status |
|---|---|
| Browser detection & extension status | ✅ |
| WebSocket Daemon | ✅ |
| URL routing rules & Default browser handling | ✅ |
| Bookmark real-time sync | ✅ |
| localStorage & sessionStorage cross-browser sync | ✅ |
| Cookie cross-browser sync | ✅ |
| Real-time Tab Sharing (w/ deduplication & privacy filter) | ✅ |
| Granular site sync control | ✅ |
| Safari & Chromium MV3 Extensions | ✅ |
| Dark/Light/System theme & EN/zh-Hans localization | ✅ |
| iCloud Sync for rules and settings | ✅ |
⚠️ Important Notes
- Default Browser: To utilize the URL routing feature, BrowSync must be set as your default system browser in macOS Settings.
🛡 License
This project is licensed under the MIT License. See LICENSE.







