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

proxies-sx-peer-windows

v1.6.6

Published

Proxies.sx bandwidth-sharing peer for Windows (Node.js)

Readme

Proxies.sx Peer for Windows

Earn by sharing your internet bandwidth. This is the official Windows / Node.js peer for the Proxies.sx network. It connects your machine to the nearest relay and forwards customer traffic through your connection. You get paid per GB served.

It speaks the exact same relay protocol as the Android app and the canonical reference SDK (v1.6.6): server-driven nearest-relay routing, multi-socket throughput, fast binary tunnels, and a stable device identity across restarts.

Works on Windows 10/11 (and Windows Server). Also runs unchanged on macOS/Linux.


Version 1.6.6

A refused registration no longer ends the program. Before, start.bat restarted it 10 seconds later and repeated the refused call. Now the peer stays running:

  • HTTP 429 (rate limit): it waits at least as long as the server asks (Retry-After header, or retryAfterSeconds / retryAfter in the JSON body), starting at 60 seconds and doubling to 5 minutes, with jitter.
  • HTTP 400 / 401 / 403 (wrong or inactive key, unsigned agreement, deactivated key): it prints one [ACTION NEEDED] line saying what to fix and checks again about every 30 minutes. Fix it and restart to connect at once.
  • Anything else (network, 5xx): 15 seconds, doubling to 5 minutes.

A relay answering HTTP 429 at the WebSocket handshake is busy, not down, and no longer counts toward relay failover. The wire protocol, config.json and the saved identity are unchanged.

Version 1.6.5

The latest authenticated server-assigned relay remains in the existing fallback cycle after temporary failures. Accepted redirects are saved atomically with the existing identity, so an SDK restart retains the assignment. Manual relay pins remain authoritative; no new polling loop or registration timer is added.

New configurations default to one relay socket. Explicit WS_CONNECTIONS values and existing wsConnections settings remain unchanged; the environment wins.

This release retains protection against failed sibling sockets and stale relay redirects from displacing an authenticated live connection. Redirects retain sockets already on the selected target. A matching device ACK starts the sustained-health interval; pre-ACK traffic does not reset retry backoff.

The existing HTTP 429/503 Retry-After, jittered retry delays and target safety remain. A single socket reduces connection attempts. This does not repair server overload or update an already installed/running peer. The resolved IPv4/private-network target guard from source version 1.6.1 is included; the old public 1.6.0 package lacked it.

These changes apply to peer.js, not the separately distributed native Go executable. Automated Node tests do not establish Windows-specific socket or Task Scheduler behavior. Publication and Windows qualification are separate release gates; do not assume an existing installation updates automatically.

Upgrade an existing installation without changing its identity

Stop the existing peer window/service once. Back up the existing folder, then replace the package files in that same folder. Preserve config.json, .sx-peer-state.json, the API key and agent name, and any PEER_STATE_FILE override. The archive contains no live configuration or identity file. Run setup.bat, then the same start.bat; setup.bat preserves existing config. Run only one copy. To roll back, stop it and restore the backed-up package files, keeping the same configuration and state.

For a temporary lower-connection setup, change only "wsConnections": 4 to "wsConnections": 1 in the existing config.json. If WS_CONNECTIONS is set in your environment or service, it overrides that field. One socket can still be rejected during relay congestion; do not repeatedly restart or re-register.

Quick start (3 steps, ~2 minutes)

  1. Install Node.js (one time): download the LTS installer from https://nodejs.org and run it with the default options.

  2. Set up the peer: double-click setup.bat. It installs the one dependency and creates your config.json. Then open config.json in Notepad and paste your API key:

    {
      "apiKey": "psx_your_key_here",
      "agentName": "my-windows-rig",
      "country": "US"
    }

    For a new device, replace my-windows-rig once with a fixed, unique name. Keep that name on later starts and updates. Never clone a live state file to another device.

    Open https://farmer.proxies.sx/api-keys?purpose=sdk → Spawn API key → SDK / device. Enter a name and choose Create API key; the preset grants account:read. Save the one-time secret privately before leaving. Complete the current Partner Agreement and use only consented devices. Review or revoke unused keys at https://farmer.proxies.sx/api-keys; keep keys used by working devices active.

  3. Connect the peer: double-click start.bat. Leave the window open. You should see:

    [REGISTERED] device=... relay=wss://relay.proxies.sx sockets=1
    [CONNECTED]  device=... relay=wss://relay.proxies.sx
    [ACK] relay confirmed connection

CONNECTED and ACK confirm relay admission. They do not prove the routing or quality checks have passed, or that customer traffic is being assigned. Check the separate connection, verification and listing states under Peers at https://farmer.proxies.sx.


config.json reference

| Field | Required | Default | What it does | |---|---|---|---| | apiKey | yes | – | Your farmer SDK / device key from the API keys page | | agentName | no | random | Friendly name shown in your dashboard | | walletAddress | no | – | Crypto payout wallet (can also be set in the portal) | | country | no | US | Your ISO-2 country hint. The server still verifies the real IP. | | carrier | no | unknown | Your ISP / carrier name (informational) | | wsConnections | no | 1 | Parallel relay sockets (1–5, one below the relay's per-device cap of 6). Use one during congestion; extra sockets do not guarantee throughput. | | connectionMethod | no | windows | Connection-type badge in the dashboard | | verbose | no | false | Set true to log every tunnel open/close (for debugging) |

You can also override any field with an environment variable (API_KEY, AGENT_NAME, WALLET, COUNTRY, WS_CONNECTIONS, RELAY_URL, …) — useful when running as a service. Environment variables win over config.json.

Advanced connection tunables (documented in the CHANGELOG comment at the top of peer.js): TOKEN_REFRESH_MS, LIVENESS_TIMEOUT_MS, PENALTY_BACKOFF_MS, RELAY_FALLBACKS, RELAY_FAILOVER_THRESHOLD, RELAY_FAILOVER_MIN_OUTAGE_MS.


Run it 24/7 (auto-start on boot)

start.bat already auto-restarts the peer if it ever stops. To also start it automatically when Windows boots, pick one:

Option A — Task Scheduler (simplest)

  1. Press Win+R, type taskschd.msc, Enter.
  2. Create Task → General: name it Proxies Peer, tick Run whether user is logged on or not.
  3. Triggers → New → At startup.
  4. Actions → New → Start a program → Program: the full path to start.bat.
  5. OK. It now launches on every boot.

Option B — Windows Service via NSSM (most robust)

  1. Download NSSM from https://nssm.cc/download and unzip it.
  2. In an Administrator Command Prompt:
    nssm install ProxiesPeer "C:\Windows\System32\cmd.exe" "/c C:\path\to\windows-peer-sdk\start.bat"
    nssm start ProxiesPeer
  3. It now runs as a background service, even before login. Stop with nssm stop ProxiesPeer.

Optional: build a standalone .exe (no Node.js needed to run)

If you want a single portable file you can drop on any Windows box:

  1. Double-click build-exe.bat (needs Node.js to build, not to run).
  2. It produces build\proxies-peer.exe.
  3. Copy proxies-peer.exe and your config.json into the same folder and double-click the exe.

"It says CONNECTED but I'm not earning yet" — this is normal

Seeing [REGISTERED], [CONNECTED] and [ACK] relay confirmed connection means your peer is working correctly and online. Earning does not start the instant you connect — your device goes through a short pipeline:

CONNECTED  ->  VERIFIED        ->  LISTED          ->  EARNING
(you're     (a quality probe    (made available    (customer traffic
 online)     grades your IP)     to customers)       flows, you get paid)

The single most important thing: keep the peer running continuously. The quality probe can only grade a device that stays online — if you open it for a minute and close it, it never gets verified, so it never earns. Use start.bat (it auto-restarts) and ideally set it to run on boot (see "Run it 24/7" above). Check your device and earnings at https://farmer.proxies.sx.

The ExperimentalWarning: The Fetch API is an experimental feature line you may have seen on older builds is harmless Node noise and is now silenced. It never meant anything was broken.

How you get paid

  • You earn per GB of customer traffic your device serves. The live rate depends on your IP type (mobile > residential > datacenter) and is set by the platform — it is printed as [RATE] current earnings: $X/GB on first registration, and shown in your dashboard.
  • Earnings and payout status: https://farmer.proxies.sx.
  • Withdrawals go to your registered wallet only. Minimum payout applies (see the portal).

Tip: a residential or mobile connection earns more than a datacenter/VPS IP. The network classifies your IP automatically — you don't set the tier.


Verify your peer is actually serving traffic

Set "verbose": true in config.json, restart, then from any machine run a request through your own device (replace YOURUSER, DEVICEID, YOURPAK):

curl -v -x "http://psx_YOURUSER-peer-us-pin-device-DEVICEID:[email protected]:7000" https://api.ipify.org/?format=json

In your peer window you should see, in order:

[TUNNEL_CONNECT] <id> api.ipify.org:443
[TCP_OPEN_OK]    <id>

If those appear, your peer is forwarding real traffic correctly.


Troubleshooting

| Symptom | Fix | |---|---| | Node.js is not installed | Install the LTS from nodejs.org, re-run setup.bat | | ERROR: no API key set | Edit config.json, set apiKey to your psx_ key | | register failed: HTTP 401 | Check whether the selected key is wrong/revoked; review farmer API keys before replacing a working fleet key | | register failed: HTTP 400 ... walletAddress | Remove walletAddress or set a valid wallet | | Device shows offline right after restart | Normal for a few seconds; it reuses the same identity via .sx-peer-state.json. Don't delete that file. | | CONNECTED + ACK but $0 earnings | Working as intended — keep it running. It must stay online to get verified, listed, then earn (see "It says CONNECTED but I'm not earning yet" above). | | ExperimentalWarning: The Fetch API ... | Harmless Node notice, now silenced in the latest build. Never meant anything was broken. | | Window closes instantly | Run setup.bat first; then launch via start.bat | | Behind strict firewall/CGNAT and no tunnels open | Your network may block outbound; try a different connection |

Need help? Open a ticket at https://client.proxies.sx or message support.


Files in this folder

| File | Purpose | |---|---| | peer.js | The peer client (the whole protocol) | | config.json | Your settings (created by setup.bat) | | config.example.json | Template | | setup.bat | One-time setup (install deps + create config) | | start.bat | Run the peer, with auto-restart | | build-exe.bat | Optional: build a standalone .exe | | .sx-peer-state.json | Saved device identity (auto-created; keep it) |

MIT licensed. Fork it, rebrand it, ship it.