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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@rpappa/hushagent

v0.0.1

Published

WIP

Downloads

4

Readme

hushagent

WIP

As information is becoming more and more valuable, it's important to protect it. This is a simple technique that will mask the destination of your requests.

To illustrate, let's say you're using a proxy to make requests to httpbin.org, www.wikipedia.org, and www.cloudflare.com.

Instead of your proxy provider seeing:

1701633972.803   1003 $SERVER_IP TCP_TUNNEL/200 6186 CONNECT httpbin.org:443 $USER HIER_DIRECT/54.83.155.149 -
1701633973.092    211 $SERVER_IP TCP_TUNNEL/200 28332 CONNECT www.wikipedia.org:443 $USER HIER_DIRECT/208.80.154.224 -
1701633973.346    161 $SERVER_IP TCP_TUNNEL/200 71077 CONNECT www.cloudflare.com:443 $USER HIER_DIRECT/104.16.124.96 -

Why not have them see this instead:

1701633974.303    817 $SERVER_IP TCP_TUNNEL/200 6215 CONNECT 75.101.131.185:443 $USER HIER_DIRECT/75.101.131.185 -
1701633975.058    490 $SERVER_IP TCP_TUNNEL/200 28331 CONNECT 208.80.154.224:443 $USER HIER_DIRECT/208.80.154.224 -
1701633975.849    284 $SERVER_IP TCP_TUNNEL/200 71134 CONNECT 104.16.124.96:443 $USER HIER_DIRECT/104.16.124.96 -

Usage

import { hush } from "@rpappa/hushagent";

const hushedAgent = hush(YOUR_AGENT_HERE);

Performance

 BENCH  Summary

  without hush - test/index.bench.ts > requests to localhost
    1.09x faster than with hush

  without hush - test/index.bench.ts > requests to httpbin with proxy
    1.05x faster than with hush

Likely some improvements to be made, haven't tested "in the real world"

Limitations

The assumed threat model for this is you have a malicious proxy provider. If you have a malicious proxy provider that is trying to figure out what you might be doing, this will help mask the destination of your requests.

However, if you easily determine the destination of your request based on the IP address, this will not help you. For example, if you are directly hitting origin servers, or if reverse DNS is possible. But, if the domain name resolves to a large CDN, this may provide some protection.