Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions BaoLianDeng/Views/SettingsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ struct SettingsView: View {
}
}

// App-extension builds (Mac App Store) have no system extension
// to uninstall — the provider lives inside the app bundle.
// App-extension builds (MAS / local) have no system extension
// to uninstall — the provider lives in PlugIns as an .appex.
if !VPNManager.providerIsAppExtension {
Section("System Extension") {
Button("Uninstall System Extension") {
Expand Down Expand Up @@ -122,7 +122,7 @@ struct SettingsView: View {
Text("Proxy Method")
} footer: {
if vpnManager.engineMode == .localProxy {
Text("Runs the engine inside the app as an HTTP/SOCKS5 proxy on 127.0.0.1 — no system extension or VPN configuration needed. Apps must be pointed at the proxy manually. Switching method or port takes effect on the next start.")
Text("Runs the engine inside the app as an HTTP/SOCKS5 proxy on 127.0.0.1 — no network extension or VPN configuration needed. Apps must be pointed at the proxy manually. Switching method or port takes effect on the next start.")
} else {
Text("Intercepts all traffic system-wide via the Network Extension.")
}
Expand Down
2 changes: 1 addition & 1 deletion BaoLianDengTests/ProxyEngineIntegrationTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import Testing
@testable import BaoLianDeng

/// Integration tests that start/stop the mihomo engine directly via bridge
/// functions — no VPN tunnel, no system extension, CI-compatible.
/// functions — no VPN tunnel, no network extension, CI-compatible.
///
/// All engine tests must be serialized because BridgeSetHomeDir and the
/// proxy listener ports (chosen ephemerally per run, but still
Expand Down
5 changes: 4 additions & 1 deletion BaoLianDengTests/Utilities/ProxyEngineHelper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,10 @@ enum ProxyEngineHelper {
socksPort: UInt16,
timeout: Int = 10
) -> (output: String, exitCode: Int32) {
curl(url: url, proxyArgs: ["--socks5", "127.0.0.1:\(socksPort)"], timeout: timeout)
// socks5h: send the hostname to the engine. `--socks5` resolves
// locally first, which fails when system DNS is still holding a
// leftover fake-ip (or a hanging AAAA) from a previous tunnel.
curl(url: url, proxyArgs: ["--socks5-hostname", "127.0.0.1:\(socksPort)"], timeout: timeout)
}

/// Run curl through the HTTP side of the mixed listener — the path
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ macOS VPN proxy app powered by [meow-rs](https://github.com/madeye/meow-rs), a C
│ │ Nodes │ Editor │& Stats│ Logs │ │
│ └──────────┴────────┴───────┴───────────┘ │
│ ┌───────────────────────────────────────┐ │
│ │ VPNManager (NETunnelProviderManager) │ │
│ │ VPNManager (NETransparentProxyManager)│ │
│ └──────────────────┬────────────────────┘ │
├─────────────────────┼───────────────────────┤
System Extension (TransparentProxy)
App Extension (PlugIns/TransparentProxy) │
│ ┌──────────────────┴────────────────────┐ │
│ │ NETransparentProxyProvider │ │
│ │ ┌──────────────────────────────┐ │ │
Expand Down Expand Up @@ -75,9 +75,9 @@ cp Local.xcconfig.template Local.xcconfig

> **Finding your Team ID:** Apple Developer portal → Membership → Team ID (10-character string, e.g. `AB12CD34EF`).

Both targets require these capabilities (already configured in entitlements):
The app and the provider require these capabilities (already configured in entitlements):
- **App Sandbox**
- **Network Extensions** — Packet Tunnel Provider
- **Network Extensions** — App Proxy Provider (transparent proxy)

#### 3. Build and run

Expand Down
Loading
Loading