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

fowardproxyserverts

v1.0.3

Published

- The propose is to abstract all the hard logic needed to operate a foward proxy network. - It recives and store's foward tcp connections, by Jwt Auth and extends the net.Socket to allow the tcp foward connection to be used as a proxyxw

Downloads

1

Readme

ForwardProxyServer(IOptions)

  • The propose is to abstract all the hard logic needed to operate a foward proxy network.
  • It recives and store's foward tcp connections, by Jwt Auth and extends the net.Socket to allow the tcp foward connection to be used as a proxyxw

@param Options: IOptions

{ logginLevel: 6, port: 3000, host: 'localhost', keepAliveDelay: 10, keepAliveTimeout: 600, headersTimeout: 5,s jwtAuth: async (jwt: string, upstream: Upstream) => true, upstreamOptions: { keepAliveMaxTime: 60000, maxSocketPoolSize: 3, keepAliveRetryBeforeClose: 2, keepAliveDelay: 10 } };

@method bindRequest(request:net.socket, jwt:string) : Void

. This binds a socket from the upstream refrenced by the Jwt in memory to the request. . This approach remove all the task id load from the server, allowing a better performance and less compute for each network request

@method start() : Void

. This starts the server by listen a defined port (IOptions.port)

@method close() : Void

. This ends a server by removing the listen and all the memory and Upstream connection.

@route Get '/jwt'

. This endpoint is a GET request to the '/jwt' path. It is used to authenticate a user and manage upstream connections based on the provided JWT (JSON Web Token).

. RETURN

  • A Iternalprotcol with the following properties:
  • code: The HTTP like status code of the response.
  • key: A string used to set the upstream on memory

@route Get '/upstream'

. This endpoint is a GET request to the '/upstream' path. This endpoint is a GET request to the '/upstream' path. It is used to store the upsrtream

. RETURN

  • A Iternalprotcol with the following properties:
  • code: The HTTP like status code of the response.
  • next: A boolean value indicating whether the user has more upstream connections to make.

@route Get 'gate/id' : Void

. This endpoint is a GET request to the '/gate/id' path. It is used to authenticate a user and pipe the request connections based on the provided Id (key in memory).

@route Get '/metrics' : prometheus metrics responce

. This exposes an prometheus object and allow better login within the Server instance.

@event 'onConnection', upstream: IUpstream

. When a upstream connects and is Auth and ready to be use, sends the Upstream object

@event 'onClose', upstream: IUpstream

. When a upstream connections array are empty removes from memory, sends the Upstream object

@event 'onGateError', error

. When a request fails to pipe , it returns the error

@public var 'hashedKey'

. Return an minifyed version of the hash key, helpfull with redis Key