npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

n8n-nodes-websocket-cookie-trigger

v1.0.0

Published

N8N node for WebSocket trigger with cookie support

Downloads

8

Readme

N8N WebSocket Trigger Node

Một n8n community node để kết nối WebSocket với hỗ trợ cookie và headers tùy chỉnh.

Tính năng

  • ✅ Kết nối WebSocket với URL tùy chỉnh
  • ✅ Hỗ trợ cookie authentication
  • ✅ Headers tùy chỉnh
  • ✅ Tự động reconnect với cấu hình linh hoạt
  • ✅ Xử lý cả JSON và plain text messages
  • ✅ Tương thích với n8n community nodes

Cài đặt

Cách 1: Cài đặt từ npm (khi đã publish)

npm install n8n-nodes-websocket-cookie-trigger

Cách 2: Cài đặt từ source

  1. Clone repository:
git clone https://github.com/your-username/n8n-nodes-websocket-cookie-trigger.git
cd n8n-nodes-websocket-cookie-trigger
  1. Cài đặt dependencies:
npm install
  1. Build project:
npm run build
  1. Link vào n8n:
# Trong thư mục n8n
npm link /path/to/n8n-nodes-websocket-cookie-trigger

Cấu hình trong N8N

  1. Mở n8n và tạo workflow mới
  2. Thêm node "WebSocket Trigger" từ community nodes
  3. Cấu hình các tham số:

Tham số bắt buộc

  • WebSocket URL: URL WebSocket (ví dụ: wss://www.pathofexile.com/api/trade2/live/poe2/Rise%20of%20the%20Abyssal/9lmvyaRCK)

Tham số tùy chọn

  • Cookie: Cookies để xác thực (ví dụ: POESESSID=3076a62382a35e56c0128ea0a81d5f98; cf_clearance=...)
  • Headers: Headers bổ sung
  • Reconnect Interval: Thời gian chờ trước khi reconnect (ms, mặc định: 5000)
  • Max Reconnect Attempts: Số lần reconnect tối đa (mặc định: 10, 0 = không giới hạn)

Ví dụ sử dụng

Kết nối Path of Exile Trade API

{
  "wssUrl": "wss://www.pathofexile.com/api/trade2/live/poe2/Rise%20of%20the%20Abyssal/9lmvyaRCK",
  "cookie": "POESESSID=3076a62382a35e56c0128ea0a81d5f98; cf_clearance=Lc_O.DabzRBsW7dKMs7MuK9SL945OTMFOLvBcy__Ex0-1761020994-1.2.1.1-pfnAevXRtLL4HwjbpI81lWg5eGdrP_VztnMFhZSmnN8B6qfnCqMwuMbtGH5xTFgHCEi4R0L.zk0GnWMd9TVNQeoArfithpDxvAm2px60mRdpJAJVcCj7eW3rKob6t_mmkORrIdLxO9MklM.n01VL0Iiu5wxh3Z6dUN4MuVyPJ.lViaWItqmpFZFHHg1FjfEkOGj8.MJ5GcIA5WexafuHrzXbgOKamOAr6yfT9nXwAHU",
  "headers": {
    "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36"
  }
}

Output Data Format

Node sẽ emit data với format:

{
  "message": {
    // Nội dung message từ WebSocket (JSON parsed hoặc raw text)
  },
  "timestamp": "2025-01-21T20:32:24.000Z",
  "url": "wss://example.com/websocket"
}

Development

Scripts

  • npm run build: Build TypeScript thành JavaScript
  • npm run dev: Watch mode cho development
  • npm run lint: Kiểm tra code style
  • npm run format: Format code

Cấu trúc project

src/
├── nodes/
│   └── WebSocketTrigger/
│       ├── WebSocketTrigger.node.ts
│       └── websocket.svg
dist/                    # Generated after build
package.json
tsconfig.json
README.md

License

MIT

Contributing

  1. Fork repository
  2. Tạo feature branch
  3. Commit changes
  4. Push to branch
  5. Tạo Pull Request

Support

Nếu gặp vấn đề, vui lòng tạo issue trên GitHub repository.