Warning
- This library is not affiliated with the original jinrou project or its author. Never report issues or ask for support on the original project's repository when using this relay server.
- This library is by no means supportive of any cheating or unfair practices in the game. Please use it responsibly and ethically.
- You should own the jinrou server where you intend to use this library, or have explicit permission from the server administrator.
A Node.js/TypeScript relay server for uhyo/jinrou, the amazing jinrou game enjoyed by thousands of players including me.
This relay server provides a clean abstraction (rather than re-implementation) over the engine.io 3-based WebSocket RPC protocol, so that the user no longer needs to deal with low-level protocol details, and can focus on building bots, tools and other integrations.
pnpm install
pnpm run serverBy default, the server listens on port 3000.
const { JinrouClient } = require('jinrou-rpc');
// Create client instance
const client = new JinrouClient('YOUR_JINROU_SERVER_URL');
// Connect and authenticate
await client.connect();
await client.login('YOUR_USERNAME', 'YOUR_PASSWORD');
// Get list of rooms
const { rooms } = await client.get_rooms('waiting');
// Join a room
await client.join_room(rooms[0].id);
// Send a chat message
await client.speak('Hello everyone!');This library implements the Jinrou server's WebSocket RPC protocol:
- Framework: SocketStream 0.3.10
- Transport: Engine.IO v3
- Message Format:
responderId|{json} - Session: Cookie-based (
connect.sid)
# Install dependencies
pnpm install
# Build TypeScript
pnpm run build
# Watch mode
pnpm run watch
# Lint
pnpm run lintMIT