Sign inSign up

gregoshop/ws-proxy

By gregoshop

Updated about 2 months ago
Archived

Web Socket Proxy for Casper-Webclient Binary port queries

Image
Networking
Developer tools
Web servers
0

258

gregoshop/ws-proxy repository overview

ws-proxy is a Docker image that acts as a WebSocket proxy for the Casper Web Client. It helps establish a connection between the Casper Web Client and Casper Blockchain nodes, ensuring smooth real-time communication via WebSockets.

ws-proxy forwards WebSocket traffic to port 28101 (NCTL) or a node binary port 7779, enabling seamless communication between the Casper Web Client and the Casper Blockchain nodes.

How to Use

Prerequisites

Before using gregoshop/ws-proxy, ensure that:

  • You have Docker installed.
  • You have Docker Compose installed (optional, for orchestrating multiple services).
Running the Container Standalone

To run the WebSocket proxy independently:

docker run -d --name ws-proxy -p 4300:4300 gregoshop/ws-proxy:latest
  • -d: Runs the container in detached mode.
  • --name ws-proxy: Assigns a name to the container.
  • -p 4300:4300: Maps port 4300 of the container to port 4300 on your local machine.

Access the WebSocket proxy at: http://localhost:4300

Using Docker Compose for Full Setup

For a complete setup with casper-webclient and cors-anywhere, use the following docker-compose.yml:

services:
  ws-proxy:
    image: gregoshop/ws-proxy:latest
    container_name: ws-proxy
    environment:
      PORT: 4300
      ALLOWED_HOSTS: |
        localhost,
        127.0.0.1,
        172.17.0.1
      ALLOWED_PORTS: |
        28101,
        7779
    ports:
      - "4300:4300"
    networks:
      - casper-network

networks:
  casper-network:
    external: false
Running the Full Setup

To run all services together:

docker-compose up -d --build

Once running, you can access:

  • Casper Web Client: http://localhost:8080
  • WebSocket Proxy: http://localhost:4300
Stopping the Services

To stop all services:

docker-compose down

Tag summary

Content type

Image

Digest

sha256:b5f00ed9b

Size

56.2 MB

Last updated

about 2 months ago

docker pull gregoshop/ws-proxy