
BLE-based HTTP proxy system routing browser traffic through an iOS device. Supports HTTP/HTTPS, data compression, and mock mode for testing without hardware.
A Bluetooth Low Energy (BLE) based HTTP proxy system that routes web browser traffic through an iOS device. This allows web browsing through the iOS device's internet connection using BLE as the transport layer.
Browser → Windows Proxy → BLE/TCP → iOS/Mock Service → WiFi → Internet
← Windows Proxy ← BLE/TCP ← iOS/Mock Service ← WiFi ←
windows-proxy/)127.0.0.1:8080 (default)mock-ios-service/)127.0.0.1:9999 (default)Terminal 1 - Start Mock iOS Service:
cd mock-ios-service
npm install
npm start
Terminal 2 - Start Windows Proxy in Mock Mode:
cd windows-proxy
npm install
npm run mock
Configure Browser:
127.0.0.1:8080Terminal 1 - Start Windows Proxy:
cd windows-proxy
npm install
npm start
iOS Device:
Configure Browser:
127.0.0.1:8080All data is transmitted in compressed, chunked format:
[4-byte length header][compressed JSON payload]
// Request
{
id: "uuid", // Unique request ID
method: "GET", // HTTP method
url: "https://...", // Target URL
headers: {}, // HTTP headers
body: "base64...", // Request body (base64)
isConnect: false // HTTPS CONNECT flag
}
// Response
{
id: "uuid", // Matching request ID
statusCode: 200, // HTTP status
headers: {}, // Response headers
body: "base64...", // Response body (base64)
success: true // For CONNECT requests
}
// windows-proxy/config.js
{
proxy: {
host: "127.0.0.1",
port: 8080,
timeout: 30000
},
ble: {
serviceUUID: "a1b2c3d4-...",
// ... other UUIDs
}
}
# Mock mode
MOCK_MODE=true
# Proxy settings
PROXY_HOST=127.0.0.1
PROXY_PORT=8080
# BLE UUIDs
BLE_SERVICE_UUID=a1b2c3d4-e5f6-7890-1234-567890abcdef
# Mock service
MOCK_SERVICE_HOST=127.0.0.1
MOCK_SERVICE_PORT=9999
127.0.0.1:8080127.0.0.1:8080localhost, 127.0.0.1127.0.0.1 Port: 8080127.0.0.1 Port: 8080ble_proxy/
├── windows-proxy/ # Windows BLE Central + HTTP Proxy
│ ├── proxy.js # Main proxy server
│ ├── ble-client.js # Real BLE client
│ ├── mock-ble-client.js # Mock BLE client (TCP)
│ ├── config.js # Configuration
│ └── demo.js # Demo script
├── mock-ios-service/ # Mock iOS BLE Peripheral
│ ├── mock-ios.js # Main TCP server
│ ├── http-client.js # HTTP request handler
│ └── demo.js # Demo script
└── ios-app/ # iOS Native App (future)
Unit Tests:
# Test Windows proxy
cd windows-proxy
npm test
# Test mock service
cd mock-ios-service
npm test
Integration Test:
# Start both services and test with curl
curl -x http://127.0.0.1:8080 https://httpbin.org/ip
Enable Debug Logging:
# Windows proxy
NODE_ENV=development npm start
# Mock service
NODE_ENV=development npm start
BLE Debugging (Windows):
# Check BLE adapter status
Get-PnpDevice | Where-Object {$_.Name -like "*Bluetooth*"}
# Monitor BLE traffic (requires tools)
# BLE not working
npm run mock # Use mock mode instead
# Port already in use
netstat -ano | findstr :8080
# Dependencies failing
npm run install-build-tools
# Port 9999 in use
netstat -ano | findstr :9999
# Connection refused
# Ensure mock service starts before proxy
# Clear proxy settings
# Check Windows proxy settings
# Disable other VPNs/proxies
⚠️ This is a development/testing tool. Consider security implications:
git checkout -b feature/name)MIT License - see LICENSE file for details
Status: ✅ Mock testing ready | 🚧 iOS app in development | 📋 Production features planned