Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
tubleronchik committed Feb 14, 2024
1 parent 6a7b9f1 commit 9434696
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,18 @@ 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. So use the same port number as you did during build:

```
docker run -p 127.0.0.1:<port>:<port> -p 127.0.0.1:9999:9999 -v ${PWD}:/proxy proxy:v0.0.1
docker run --name libp2p-proxy --detach -p 127.0.0.1:<port>:<port> -p 127.0.0.1:9999:9999 -v ${PWD}:/proxy proxy:v0.0.1
```

To see logs:
```
docker logs -f libp2p-proxy
```

To stop the container:

```
docker stop libp2p-proxy
```

### From Source
Expand Down
3 changes: 2 additions & 1 deletion src/wsManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ export class WebSocketManager {
ws.on('message', (data) => {
try {
const msg = JSON.parse(data);
this.logger.INFO(msg, 'Received ws message:');
// this.logger.INFO(msg, 'Received ws message:');
this.logger.INFO('Received ws message');

if ('protocols_to_listen' in msg) {
this.updateClientInfo(ws, { protocolsToListen: msg.protocols_to_listen });
Expand Down

0 comments on commit 9434696

Please sign in to comment.