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

webshare-proxy

v1.0.1

Published

This library is unofficial. It allows you to detect and automatically update the proxy list every certain period of time. Continuously requesting the proxy list link may cause your account to be disapproved. For this reason, it allows you to check if the

Downloads

25

Readme

Webshare

This library is unofficial. It allows you to detect and automatically update the proxy list every certain period of time. Continuously requesting the proxy list link may cause your account to be disapproved. For this reason, it allows you to check if the first proxy in the existing proxy list is working and get the list if not. No responsibility is accepted for any problems that may arise.

const webshare = require('webshare-proxy');

var check = new webshare({
    url: 'https://proxy.webshare.io/api/v2/proxy/list/download/<your-hash>/-/any/username/direct/-/',
    debug: true,
    path: __dirname
})
    .cron({ ms: 30000 })
//    .getList({ forceNew: false }).then(console.log).catch(console.error)
//    .txt()
//    .checkProxy({ host: '<host>', port: '<port>', username: '<username>', password: '<password>' }).then(console.log).catch(console.error)
//    .parsed('<response-list>')
//    .req().then(console.log).catch(console.error); 

url When you click on the proxy download button in your Webshare panel, you should type the download link given to you.

debug If true, it logs the results and errors of each operation.

path Only the directory should be sent. You can send __dirname. Opens a txt file called webshare.txt at the path you send.

.cron The first proxy in a proxy list is checked every ms millisecond you send. If the proxy is down, the current list is retrieved and saved.

.getList Returns you the proxy list. If the txt is empty or there is no txt, it gets the current proxy list and returns it to you. If the txt exists, it reads its contents and returns it. forceNew If true, it ignores the contents of the txt and sends a new request to get the current list.

.txt Generates if there is no txt file in the path sent. path should not be sent with the name of the txt file. runs when you start a process with new. There is no need to run extra.

.checkProxy Checks the proxy information sent.

.parsed Converts the given proxy string into jsons with host, port, username and password variables and returns array.

.req It sends a request to the url that returns the proxy list. Both the txt is updated and the new list is returned to you.