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

screeps-client-proxy

v0.1.9

Published

Standalone proxy that serves the new screeps-client and forwards /api + /socket to any Screeps server, bypassing browser CORS.

Readme

screeps-client-proxy

A small standalone proxy that serves the new screeps-client web build locally and forwards its /api + /socket traffic (including the game WebSocket) to a Screeps server.

It exists because the browser build can only talk to servers on its own origin — cross-origin requests to screeps.com or a private server are blocked by CORS. The Tauri desktop app solves this with a native HTTP plugin; this proxy solves it for a plain browser, the same way the screeps-steamless-client does for the official client.

The client is served at the origin root, and the target backend is embedded in the request path:

http://localhost:8080/(https://screeps.com)/api/...
http://localhost:8080/(http://localhost:21025)/api/...

A single running instance can therefore serve any number of servers. You don't build these URLs by hand — open http://localhost:8080/, and the client shows the desktop-style server-list login. Picking or adding a server makes the connectivity layer prepend the /(backend)/ prefix automatically.

Usage

Build the client once, then start the proxy:

# from the monorepo root
pnpm --filter screeps-client build
pnpm --filter screeps-client-proxy start
# → http://localhost:8080/

Or, once published:

npx screeps-client-proxy

Options

| Flag | Description | |---|---| | --port <int> | Port to listen on (default 8080) | | --host <str> | Host/interface to bind (default localhost) | | --backend <url> | Pin a single backend, dropping the /(backend)/ requirement. Requests go straight to this server and the login targets it directly. | | --internal_backend <url> | Actual proxy target when it differs from the browser-facing backend URL (e.g. behind Docker / a reverse proxy). | | --dist <path> | Path to the client's standalone build. Defaults to the dist/standalone of the installed screeps-client package. |

Caching

Assets are served with correct cache semantics so the client isn't re-downloaded on every visit and never served stale after an update:

  • Content-hashed assets under _client/ → Cache-Control: public, max-age=31536000, immutable.
  • Stable-URL assets (index.html, themes/, sprite atlas, …) → Cache-Control: no-cache with ETag/Last-Modified, so the browser revalidates and gets a 304 when unchanged.

Login persistence & security

In proxy mode the client persists your server list, token and (optionally) saved credentials in the browser's localStorage for the proxy's origin, so logins survive a restart — like the desktop app. Unlike the desktop app there is no OS keychain, so a saved token is stored in plaintext in that localStorage. Only run the proxy on a machine you trust, and prefer a per-account API token you can revoke over your account password.