diff --git a/examples/express-server-over-libp2p/package.json b/examples/express-server-over-libp2p/package.json index 299ef93..a50c15f 100644 --- a/examples/express-server-over-libp2p/package.json +++ b/examples/express-server-over-libp2p/package.json @@ -18,8 +18,8 @@ "dependencies": { "@chainsafe/libp2p-noise": "^17.0.0", "@chainsafe/libp2p-yamux": "^8.0.0", - "@libp2p/http": "^1.0.0", - "@libp2p/http-server": "^1.0.0", + "@libp2p/http": "^2.0.0", + "@libp2p/http-server": "^2.0.0", "@libp2p/tcp": "^11.0.4", "@multiformats/multiaddr": "^13.0.1", "express": "^5.1.0", diff --git a/examples/hono-server-over-libp2p/package.json b/examples/hono-server-over-libp2p/package.json index 0d61813..6e6abf8 100644 --- a/examples/hono-server-over-libp2p/package.json +++ b/examples/hono-server-over-libp2p/package.json @@ -17,8 +17,8 @@ "dependencies": { "@chainsafe/libp2p-noise": "^17.0.0", "@chainsafe/libp2p-yamux": "^8.0.0", - "@libp2p/http": "^1.0.0", - "@libp2p/http-server": "^1.0.0", + "@libp2p/http": "^2.0.0", + "@libp2p/http-server": "^2.0.0", "@libp2p/tcp": "^11.0.4", "@multiformats/multiaddr": "^13.0.1", "hono": "^4.9.9", diff --git a/examples/libp2p-as-http-transport/package.json b/examples/libp2p-as-http-transport/package.json index 12c653f..ce9b881 100644 --- a/examples/libp2p-as-http-transport/package.json +++ b/examples/libp2p-as-http-transport/package.json @@ -17,8 +17,8 @@ "dependencies": { "@chainsafe/libp2p-noise": "^17.0.0", "@chainsafe/libp2p-yamux": "^8.0.0", - "@libp2p/http": "^1.0.0", - "@libp2p/http-server": "^1.0.0", + "@libp2p/http": "^2.0.0", + "@libp2p/http-server": "^2.0.0", "@libp2p/tcp": "^11.0.4", "@multiformats/multiaddr": "^13.0.1", "express": "^5.1.0", diff --git a/examples/libp2p-over-http-server/package.json b/examples/libp2p-over-http-server/package.json index 5368ecd..275d737 100644 --- a/examples/libp2p-over-http-server/package.json +++ b/examples/libp2p-over-http-server/package.json @@ -15,9 +15,9 @@ "test": "test-node-example test/*" }, "dependencies": { - "@libp2p/http": "^1.0.0", - "@libp2p/http-ping": "^1.0.0", - "@libp2p/http-server": "^1.0.0", + "@libp2p/http": "^2.0.0", + "@libp2p/http-ping": "^2.0.0", + "@libp2p/http-server": "^2.0.0", "libp2p": "^3.0.5" }, "devDependencies": { diff --git a/examples/peer-id-auth/package.json b/examples/peer-id-auth/package.json index 5c1aa6e..34a02c9 100644 --- a/examples/peer-id-auth/package.json +++ b/examples/peer-id-auth/package.json @@ -16,9 +16,9 @@ "test": "test-node-example test/*" }, "dependencies": { - "@libp2p/http": "^1.0.0", - "@libp2p/http-peer-id-auth": "^1.0.0", - "@libp2p/http-server": "^1.0.0", + "@libp2p/http": "^2.0.0", + "@libp2p/http-peer-id-auth": "^2.0.0", + "@libp2p/http-server": "^2.0.0", "libp2p": "^3.0.5" }, "devDependencies": { diff --git a/examples/serving-websites-from-web-browsers/package.json b/examples/serving-websites-from-web-browsers/package.json index befffb5..4e33300 100644 --- a/examples/serving-websites-from-web-browsers/package.json +++ b/examples/serving-websites-from-web-browsers/package.json @@ -23,8 +23,8 @@ "@chainsafe/libp2p-noise": "^17.0.0", "@chainsafe/libp2p-yamux": "^8.0.0", "@libp2p/circuit-relay-v2": "^4.0.4", - "@libp2p/http": "^1.0.0", - "@libp2p/http-server": "^1.0.0", + "@libp2p/http": "^2.0.0", + "@libp2p/http-server": "^2.0.0", "@libp2p/identify": "^4.0.4", "@libp2p/ping": "^3.0.4", "@libp2p/utils": "^7.0.4", diff --git a/examples/websockets-over-libp2p/package.json b/examples/websockets-over-libp2p/package.json index 45af3db..a75f867 100644 --- a/examples/websockets-over-libp2p/package.json +++ b/examples/websockets-over-libp2p/package.json @@ -18,8 +18,8 @@ "dependencies": { "@chainsafe/libp2p-noise": "^17.0.0", "@chainsafe/libp2p-yamux": "^8.0.0", - "@libp2p/http": "^1.0.0", - "@libp2p/http-server": "^1.0.0", + "@libp2p/http": "^2.0.0", + "@libp2p/http-server": "^2.0.0", "@libp2p/tcp": "^11.0.4", "@multiformats/multiaddr": "^13.0.1", "libp2p": "^3.0.5" diff --git a/packages/http-fetch/package.json b/packages/http-fetch/package.json index b6b752a..cd02d95 100644 --- a/packages/http-fetch/package.json +++ b/packages/http-fetch/package.json @@ -139,7 +139,7 @@ }, "dependencies": { "@achingbrain/http-parser-js": "^0.5.9", - "@libp2p/http-utils": "^1.0.0", + "@libp2p/http-utils": "^2.0.0", "@libp2p/interface": "^3.0.2", "uint8arrays": "^5.1.0" }, diff --git a/packages/http-ping/package.json b/packages/http-ping/package.json index f4f8d97..741a76a 100644 --- a/packages/http-ping/package.json +++ b/packages/http-ping/package.json @@ -138,7 +138,7 @@ "release": "aegir release" }, "dependencies": { - "@libp2p/http": "^1.0.0", + "@libp2p/http": "^2.0.0", "@libp2p/interface": "^3.0.2", "@multiformats/multiaddr": "^13.0.1", "race-event": "^1.6.1", diff --git a/packages/http-server/package.json b/packages/http-server/package.json index 1daa737..27e08f8 100644 --- a/packages/http-server/package.json +++ b/packages/http-server/package.json @@ -160,9 +160,9 @@ }, "dependencies": { "@achingbrain/http-parser-js": "^0.5.9", - "@libp2p/http": "^1.0.0", - "@libp2p/http-utils": "^1.0.0", - "@libp2p/http-websocket": "^1.0.0", + "@libp2p/http": "^2.0.0", + "@libp2p/http-utils": "^2.0.0", + "@libp2p/http-websocket": "^2.0.0", "@libp2p/interface": "^3.0.2", "events": "^3.3.0", "race-event": "^1.6.1", diff --git a/packages/http-utils/src/stream-to-socket.ts b/packages/http-utils/src/stream-to-socket.ts index 368a0db..e851f37 100644 --- a/packages/http-utils/src/stream-to-socket.ts +++ b/packages/http-utils/src/stream-to-socket.ts @@ -13,6 +13,8 @@ export class Libp2pSocket extends Duplex { public bytesWritten: number public timeout = MAX_TIMEOUT public allowHalfOpen: boolean + public remoteFamily: string | undefined + public remotePort: number | undefined #initStream: Promise #stream?: Stream diff --git a/packages/http-websocket/package.json b/packages/http-websocket/package.json index bbf281d..40556fd 100644 --- a/packages/http-websocket/package.json +++ b/packages/http-websocket/package.json @@ -139,7 +139,7 @@ }, "dependencies": { "@achingbrain/http-parser-js": "^0.5.9", - "@libp2p/http-utils": "^1.0.0", + "@libp2p/http-utils": "^2.0.0", "@libp2p/interface": "^3.0.2", "@libp2p/interface-internal": "^3.0.4", "@libp2p/utils": "^7.0.4", diff --git a/packages/http/package.json b/packages/http/package.json index 8e7cdb7..014cedf 100644 --- a/packages/http/package.json +++ b/packages/http/package.json @@ -162,10 +162,10 @@ "release": "aegir release" }, "dependencies": { - "@libp2p/http-fetch": "^3.0.0", - "@libp2p/http-peer-id-auth": "^1.0.0", - "@libp2p/http-utils": "^1.0.0", - "@libp2p/http-websocket": "^1.0.0", + "@libp2p/http-fetch": "^4.0.0", + "@libp2p/http-peer-id-auth": "^2.0.0", + "@libp2p/http-utils": "^2.0.0", + "@libp2p/http-websocket": "^2.0.0", "@libp2p/interface": "^3.0.2", "@libp2p/interface-internal": "^3.0.4", "@multiformats/multiaddr": "^13.0.1", diff --git a/packages/interop/package.json b/packages/interop/package.json index d687acf..948bc67 100644 --- a/packages/interop/package.json +++ b/packages/interop/package.json @@ -24,9 +24,9 @@ "@fastify/cookie": "^11.0.2", "@fastify/websocket": "^11.2.0", "@libp2p/crypto": "^5.1.12", - "@libp2p/http": "^1.0.0", - "@libp2p/http-ping": "^1.0.0", - "@libp2p/http-server": "^1.0.0", + "@libp2p/http": "^2.0.0", + "@libp2p/http-ping": "^2.0.0", + "@libp2p/http-server": "^2.0.0", "@libp2p/interface": "^3.0.2", "@libp2p/memory": "^2.0.4", "@libp2p/peer-id": "^6.0.3",