
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
http2-proxy-request
Advanced tools
This library allows you to send requests using a proxy with the http2 protocol. If you don't need to use it with a proxy, check the node:http2 library.
This library allows you to send requests using a proxy with the http2 protocol. If you don't need to use it with a proxy, check the node:http2 library.
const { request } = require('http2-proxy-request')
request({
url: 'https://example.com/',
proxy: {
host: '<proxy-host>',
port: '<proxy-port>',
username: '<proxy-username>',
password: '<proxy-password>'
},
headers: {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3'
},
method: 'GET'
}).then(console.log).catch(console.error)
If body is of type json, you should add “Content-Type”: “application/json”.
const { request } = require('http2-proxy-request')
request({
url: 'https://example.com/',
proxy: {
host: '<proxy-host>',
port: '<proxy-port>',
username: '<proxy-username>',
password: '<proxy-password>'
},
headers: {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3',
"Content-Type": "application/json"
},
method: 'POST',
body: { a: 1 }
}).then(console.log).catch(console.error)
3 Variables are returned. headers, body and statusCode.
{
headers: {
':status': 200,
date: 'Sun, 19 May 2024 19:40:01 GMT',
'content-type': 'application/json; charset=utf-8',
'content-length': '631',
etag: 'W/"277-iwLpZpUMj/RkeVdx4zq8Q3MAdP4"',
'x-cache': 'MISS',
'cf-cache-status': 'DYNAMIC',
'report-to': '{"endpoints":[{"url":"https:\\/\\/a.nel.cloudflare.com\\/report\\/v4?s=3xI91mPw6QjqJ86H2qDcSNUpRsbSv6aAcLf1WiTHEj3tH6x%2FNalvBpy6ohSNuUlM6Z4BXptATDl%2Bmm9qJPzRvo9C51dNdWyzTo6xN1PM8TyGCfV5bd54o2YBC15xLNZdqQ%3D%3D"}],"group":"cf-nel","max_age":604800}',
nel: '{"success_fraction":0,"report_to":"cf-nel","max_age":604800}',
server: 'cloudflare',
'cf-ray': '88668e69ce712850-OTP',
'alt-svc': 'h3=":443"; ma=86400'
},
body: {
headers: {
host: 'example.com',
connection: 'upgrade',
'cdn-loop': 'cloudflare',
'cf-ipcountry': 'GB',
'accept-encoding': 'gzip, br',
'cf-ray': '88668e69ce712850-OTP',
'x-forwarded-proto': 'https',
'cf-visitor': '{"scheme":"https"}',
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3',
'content-type': 'application/json',
},
body: {},
method: 'GET',
url: '/',
query: {},
params: {},
path: '/',
httpVersion: '1.1'
},
statusCode: 200
}
Due to the waf rules added to some sites protected with Cloudflare, we are recognized as bots when we send htttp/1.1 requests. Currently, most libraries don't support sending http2 requests using a proxy. If they did, it was very complicated. I wanted to simplify this.
After searching for a long time I saw this answer and made this code into a library, thanks.
stackoverflow# http2-proxy-request
FAQs
This library allows you to send requests using a proxy with the http2 protocol. If you don't need to use it with a proxy, check the node:http2 library.
The npm package http2-proxy-request receives a total of 3 weekly downloads. As such, http2-proxy-request popularity was classified as not popular.
We found that http2-proxy-request demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.