
نظام وكيل HTTP قائم على BLE يوجه حركة مرور المتصفح عبر جهاز iOS. يدعم HTTP/HTTPS وضغط البيانات ووضع المحاكاة للاختبار بدون أجهزة.
نظام وسيط HTTP قائم على تقنية Bluetooth Low Energy (BLE) يوجّه حركة مرور متصفح الويب عبر جهاز iOS. يتيح هذا التصفح عبر اتصال الإنترنت لجهاز iOS باستخدام BLE كطبقة نقل.
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 (افتراضي)mock-ios-service/)127.0.0.1:9999 (افتراضي)الطرفية 1 - تشغيل خدمة محاكاة iOS:
cd mock-ios-service
npm install
npm start
الطرفية 2 - تشغيل وسيط ويندوز في وضع المحاكاة:
cd windows-proxy
npm install
npm run mock
تكوين المتصفح:
127.0.0.1:8080الطرفية 1 - تشغيل وسيط ويندوز:
cd windows-proxy
npm install
npm start
جهاز iOS:
تكوين المتصفح:
127.0.0.1:8080تُنقل جميع البيانات بتنسيق مضغوط ومجزأ:
[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 المنفذ: 8080127.0.0.1 المنفذ: 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)
اختبارات الوحدة:
# Test Windows proxy
cd windows-proxy
npm test
# Test mock service
cd mock-ios-service
npm test
اختبار التكامل:
# Start both services and test with curl
curl -x http://127.0.0.1:8080 https://httpbin.org/ip
تفعيل تسجيل التصحيح:
# Windows proxy
NODE_ENV=development npm start
# Mock service
NODE_ENV=development npm start
تصحيح أخطاء BLE (ويندوز):
# 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
⚠️ هذه أداة تطوير/اختبار. ضع في اعتبارك الآثار الأمنية:
git checkout -b feature/name)رخصة MIT - راجع ملف LICENSE للتفاصيل
الحالة: ✅ اختبار المحاكاة جاهز | 🚧 تطبيق iOS قيد التطوير | 📋 ميزات الإنتاج مخطط لها