a2acalling 0.6.17 → 0.6.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/cli.js +30 -3
- package/package.json +1 -1
package/bin/cli.js
CHANGED
|
@@ -1402,10 +1402,37 @@ https://github.com/onthegonow/a2a_calling`;
|
|
|
1402
1402
|
if (externalIp) {
|
|
1403
1403
|
const verifyUrl = `http://${publicHost}/api/a2a/ping`;
|
|
1404
1404
|
if (serverPort !== 80) {
|
|
1405
|
-
|
|
1406
|
-
|
|
1405
|
+
// Check what's using port 80
|
|
1406
|
+
const port80Status = await isPortListening(80, '127.0.0.1', { timeoutMs: 250 });
|
|
1407
|
+
|
|
1408
|
+
console.log(`\n ━━━ Reverse Proxy Setup ━━━`);
|
|
1409
|
+
console.log(` Server running on port ${serverPort}, but external callers expect port 80/443.`);
|
|
1410
|
+
if (port80Status.listening) {
|
|
1411
|
+
console.log(` Port 80: in use (likely nginx, caddy, or another web server)`);
|
|
1412
|
+
} else {
|
|
1413
|
+
console.log(` Port 80: available (but A2A is on ${serverPort})`);
|
|
1414
|
+
}
|
|
1415
|
+
console.log(`\n RECOMMENDED: Configure your web server to proxy A2A requests:\n`);
|
|
1416
|
+
console.log(` For nginx, add to your server block:`);
|
|
1417
|
+
console.log(` location /api/a2a/ {`);
|
|
1418
|
+
console.log(` proxy_pass http://127.0.0.1:${serverPort}/api/a2a/;`);
|
|
1419
|
+
console.log(` proxy_http_version 1.1;`);
|
|
1420
|
+
console.log(` proxy_set_header Host $host;`);
|
|
1421
|
+
console.log(` }`);
|
|
1422
|
+
console.log(`\n For Caddy:`);
|
|
1423
|
+
console.log(` handle /api/a2a/* {`);
|
|
1424
|
+
console.log(` reverse_proxy 127.0.0.1:${serverPort}`);
|
|
1425
|
+
console.log(` }`);
|
|
1426
|
+
console.log(`\n After configuring, update the invite hostname to use port 80:`);
|
|
1427
|
+
console.log(` Current: ${publicHost}`);
|
|
1428
|
+
console.log(` Should be: ${externalIp} (without port, defaults to 80)`);
|
|
1429
|
+
console.log(`\n Or open port ${serverPort} directly in your firewall if no proxy is used.`);
|
|
1430
|
+
console.log(` ━━━━━━━━━━━━━━━━━━━━━━━━━━━`);
|
|
1431
|
+
console.log(`\n ACTION REQUIRED: Ask your owner if they want to configure a reverse proxy.`);
|
|
1432
|
+
console.log(` If they say yes, help them add the nginx/caddy config above.`);
|
|
1433
|
+
console.log(` If they say no or skip, the invite will use port ${serverPort} directly.`);
|
|
1407
1434
|
}
|
|
1408
|
-
console.log(
|
|
1435
|
+
console.log(`\n Verify: curl -s ${verifyUrl}`);
|
|
1409
1436
|
}
|
|
1410
1437
|
|
|
1411
1438
|
// Save server config and advance onboarding state to awaiting_disclosure.
|