This proxy server facilitates communication between Maverick and a WebSocket server. It is particularly useful when the server is managed externally (e.g., Laravel/Pusher) and requires intermediary translation or message handling.
-
Clone the Repository:
git clone https://github.com/t00ts/maverick-proxy.git cd maverick-proxy/ -
Install Dependencies:
pnpm install
- Update
SERVER_URL:
Open the main.js file and replace ws://server_address:port with the actual WebSocket server URL:
const SERVER_URL = 'ws://your_server_address:your_server_port';- Set Proxy Server Port (Optional):
If you wish to use a different port for the proxy server, update the PROXY_PORT constant:
const PROXY_PORT = 8080; // Replace with your desired port number- Configure Maverick to use the proxy server:
Point Maverick to the proxy server instead of the original server:
[server]
addr = "ws://localhost:8080"Replace localhost and 8080 with the appropriate host and port if you have configured them differently.
- Run the Proxy Server:
node main.js