Bun.sh network connector for @session.js/client https://www.npmjs.com/package/@session.js/bun-network
Find a file
2025-01-03 00:07:05 +04:00
src Add sogs request 2025-01-03 00:07:05 +04:00
.gitignore Initial commit 2024-07-16 22:18:27 +04:00
bun.lockb Add sogs request 2025-01-03 00:07:05 +04:00
package.json Add sogs request 2025-01-03 00:07:05 +04:00
README.md Add proxy support 2024-08-29 22:45:09 +04:00
tsconfig.build.json Initial commit 2024-07-16 22:18:27 +04:00
tsconfig.json Initial commit 2024-07-16 22:18:27 +04:00

@session.js/bun-network

This network adapter for @session.js/client uses Bun.sh runtime to fetch Session nodes. It exports onRequest method that handles requests

This package can't be used in browser. If you want to use it on proxy server for your Session web client, try @session.js/bun-network-remote.

Usage:

import { BunNetwork } from '@session.js/bun-network'
new Session({ network: new BunNetwork() })

Usage with proxy:

import { BunNetwork } from '@session.js/bun-network'
new Session({ 
  network: new BunNetwork({
    proxy: {
      protocol: 'https',
      username: 'username', // optional
      password: 'password', // optional
      hostname: 'proxy.example.com',
      port: 8080,
    } // or pass string like https://username:password@proxy.example.com:8080
  }) 
})

Made for session.js

Use Session messenger programmatically with Session.js: Session bots, custom Session clients, and more.

Donate

hloth.dev/donate