Linux v69820.1blu.de 4.15.0 #1 SMP Mon Sep 30 15:36:27 MSK 2024 x86_64
Apache/2.4.58
Server IP : 195.90.215.149 & Your IP : 216.73.217.80
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
share /
doc /
node-undici /
examples /
proxy /
Delete
Unzip
Name
Size
Permission
Date
Action
index.js
1.1
KB
-rw-r--r--
2023-10-11 19:12
proxy.js
5.76
KB
-rw-r--r--
2023-10-11 19:12
Save
Rename
const { Pool, Client } = require('../../') const http = require('http') const proxy = require('./proxy') const pool = new Pool('http://localhost:4001', { connections: 256, pipelining: 1 }) async function run () { await Promise.all([ new Promise(resolve => { // Proxy http.createServer((req, res) => { proxy({ req, res, proxyName: 'example' }, pool).catch(err => { if (res.headersSent) { res.destroy(err) } else { for (const name of res.getHeaderNames()) { res.removeHeader(name) } res.statusCode = err.statusCode || 500 res.end() } }) }).listen(4000, resolve) }), new Promise(resolve => { // Upstream http.createServer((req, res) => { res.end('hello world') }).listen(4001, resolve) }) ]) const client = new Client('http://localhost:4000') const { body } = await client.request({ method: 'GET', path: '/' }) for await (const chunk of body) { console.log(String(chunk)) } } run() // TODO: Add websocket example.