This repository is designed to jumpstart multiple local WebSocket servers in parallel for testing purposes. This repository was originally designed for WebSocket server fingerprint testing.
Before running the playground script, install the following:
- git (to download repositories)
- Python 3 (for websockets and Tornado)
- npm, NodeJS (for ws and faye-websocket-node)
- make (for uWebSockets)
- go (for Gorilla)
- Java, mvn (for Java Spring Boot)
- PHP, composer (for Ratchet)
Running the bash script ./run_ws_playground.sh
should start the local
WebSocket servers outlined in the table below.
A small playground_send.py
file is included to send messages to the servers
to verify they are listening and responding.
If you are running this script more than once, you will probably need to kill the previously started examples with:
# First list the running processes with ps
ps aux
# Manually identify the process IDs for node, golang WS examples
# Then kill each active process to avoid conflicts when script is rerun
kill <PID #>
WebSocket Server | Language | Port number | URL |
---|---|---|---|
ws | JS | 8081 | 127.0.0.1:8081 |
faye-websocket-node | JS | 7000 | 127.0.0.1:7000 |
Gorilla | Go | 8084 | 127.0.0.1:8084/echo |
uWebSockets | C++ | 9001 | 127.0.0.1:9001 |
Java Spring Boot | Java | 8080 | 127.0.0.1:8080/stomp |
Python websockets | Python | 8765 | 127.0.0.1:8765 |
Ratchet | PHP | 8085 | 127.0.0.1:8085 |
Tornado | Python | 3000 | 127.0.0.1:3000 |
The following public WebSocket servers can be used for quick tests, but larger testing loads should be performed on local servers.
- Ratchet demo: http://socketo.me/demo
- Socket.io demo: https://socket.io/demos/chat/
- Faye websocket real-world use case: https://firepad.io/examples/