Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Module for message proxying between libp2p channels and WebSocket clients, and vice versa.

License

NotificationsYou must be signed in to change notification settings

PinoutLTD/libp2p-ws-proxy

Repository files navigation

Module for message proxying between libp2p channels and WebSocket clients, and vice versa. Currently Libp2p nodes supports web socket transport via relay chain.

Running

Docker


Requirements:

  1. Docker

Build:

Pull the iamge:

docker pull ghcr.io/pinoutltd/libp2p-ws-proxy:latest

Launch:

To enable access to the WebSocket server from another application, it is essential to establish a port mapping between the host and the container. While not mandatory, it is advisable to align the port numbers in the container and on the host.

docker run --name libp2p-proxy --detach -p 127.0.0.1:8888:8888 -p 127.0.0.1:9999:9999 ghcr.io/pinoutltd/libp2p-ws-proxy:latest

To see logs:

docker logs -f libp2p-proxy

To stop the container:

docker stop libp2p-proxy

From Source


Requirements:

  1. Node v.20.10.0

Installation:

git clone https://github.com/PinoutLTD/libp2p-ws-proxy.gitcd libp2p-ws-proxynpm install

Launch:

node src/index.js

Then you can connect a websocket client and libp2p nodes to proxy messages between them.

Service file

A systemd service file may be used. This is meant forubuntu user, change appropriately. Also, make sure to locate node withwhereis node

[Unit]Description= Libp2p Proxy Service[Service]Type=simpleWorkingDirectory=/home/ubuntu/libp2p-ws-proxy/ExecStart=/usr/bin/node src/index.jsUser=ubuntuRestart=alwaysRestartSec=5[Install]WantedBy=multi-user.target

About

Module for message proxying between libp2p channels and WebSocket clients, and vice versa.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

[8]ページ先頭

©2009-2025 Movatter.jp