-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-proxy.ts
More file actions
28 lines (23 loc) · 989 Bytes
/
test-proxy.ts
File metadata and controls
28 lines (23 loc) · 989 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/env bun
console.log('🧪 Testing proxy connection...\n');
console.log('Make sure your iPhone is connected to proxy:');
console.log(` Server: 10.0.0.62`);
console.log(` Port: 8080\n`);
// Simple proxy test server
const server = Bun.serve({
port: 8080,
fetch(req) {
const url = new URL(req.url);
console.log(`✅ Proxy request received: ${req.method} ${url.hostname}${url.pathname}`);
// Look for smartbed-related traffic
if (url.hostname.toLowerCase().includes('bed') ||
url.hostname.toLowerCase().includes('sleep') ||
url.hostname.toLowerCase().includes('smart')) {
console.log('🛏️ POTENTIAL SMARTBED TRAFFIC DETECTED!');
}
return new Response('Proxy test successful', { status: 200 });
}
});
console.log(`Proxy test server listening on port ${server.port}`);
console.log('\nNow open any app on your iPhone to test the connection.');
console.log('Then open your smartbed app to capture its traffic.\n');