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

foxy-proxy

v1.40.0

Published

A Proof of Capacity proxy which supports solo and pool mining upstreams.

Downloads

196

Readme

Foxy-Proxy

Software License npm npm weekly downloads docker pulls Discord

Prerequisites

  • nodejs >= 12, see here how to install it

Getting started

If you are unsure on how to proceed check the Docs.

Setup

With npm

npm i -g foxy-proxy
foxy-proxy

With docker

A docker image based on alpine linux is built automatically on every commit to master as well as on tags.

latest : Latest master build of the proxy
1.19.0, 1.19, 1 : Version 1.19.0 of the proxy

To run the proxy on the fly use:

docker run --volume /path/to/conf/dir:/conf -p 12345:12345 --name foxy-proxy --rm felixbrucker/foxy-proxy

Or set it up via compose as a service:

version: '2'
services:
  app:
    image: felixbrucker/foxy-proxy
    restart: always
    volumes:
      - /path/to/conf/dir:/conf
    ports:
      - "12345:12345"

Be sure to edit the config.yaml to listen on 0.0.0.0 for docker.

With git

git clone https://github.com/felixbrucker/foxy-proxy
cd foxy-proxy
npm ci
npm start

This will download the proxy, install its dependencies and setup the default config with some example upstream configs. Edit the created config.yaml file so that your desired proxy/proxies and upstream(s) are configured. More on the valid config options here. Make sure you do not break the yaml format or the file can not be read correctly.

Updating the proxy

NPM

When installed via npm just run npm update -g foxy-proxy

Docker

When using docker just pull the latest image or tag you want to update to and replace the running container. This can be automated via watchtower.

Git

When installed as a git repository just git pull. If the changes have new dependencies required one needs to execute npm update --no-save as well before starting the proxy.

CLI parameters

The proxy can be setup with a custom config and db file path, see --help for more info:

Options:
  -V, --version              output the version number
  --config <config.yaml>     The custom config.yaml file path
  --db <db.sqlite>           The custom db.sqlite file path
  --live                     Show a live dashboard with stats
  --update-historical-stats  Update all historical stats
  --no-colors                Do not use colors in the cli output
  -h, --help                 output usage information

Config example

A config example can be found here

Running the proxy in production

I personally use pm2 to manage my nodejs based apps. An example ecosystem.config.js has been included. Just cp ecosystem.config.js.dist ecosystem.config.js. Then just use pm2 start ecosystem.config.js. To startup pm2 on boot use pm2 save to save the current running config and pm2 startup to startup pm2 on boot. This will only work when installed via git.

Alternatively docker (tag) based deployments with automatic updates through watchtower can be used as well.

Per miner maxScanTime

To allow fine granular control each miner which supports urls instead of simple ip:port can subscribe to their own maxScanTime. This was tested with scavenger only.
To do so, just append the preferred maxScanTime in seconds to the url, like so: http://localhost:12345/burst-bhd/25. That would result in that miner setting its maxScanTime to 25 seconds.

Stats

An embedded web ui is available on the listenAddr address and port. Alternatively some basic live stats are available via the --live cli parameter.

Donate

  • BHD: 33fKEwAHxVwnrhisREFdSNmZkguo76a2ML
  • BURST: BURST-BVUD-7VWE-HD7F-6RX4P
  • ETH: 0xfEc6F48633A7c557b4ac5c37B4519C55CD701BEF
  • BTC: 14rbdLr2YXDkguVaqRKnPftTPX52tnv2x2
  • PP: https://www.paypal.me/felixbrucker

Changelog

A Changelog can be found here

Heroku

One can deploy the proxy to Heroku, though you'll want the config to contain the ignoreMinerIP config option per proxy because Heroku assigns each request a different internal ip based on the load balancer route the request took.

Deploy

License

GNU GPLv3 (see LICENSE)