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

anyproxyplus

v3.10.5

Published

A fully configurable proxy in NodeJS, which can handle HTTPS requests perfectly. forked from https://github.com/alibaba/anyproxy

Downloads

6

Readme

AnyProxy

NPM version node version npm download

A fully configurable proxy in NodeJS, which can handle HTTPS requests perfectly.

Home page : AnyProxy.io

(Chinese in this doc is nothing but translation of some key points. Be relax if you dont understand.)

特性

  • 支持https明文代理
  • 支持低网速模拟
  • 支持二次开发,可以用javascript控制代理的全部流程,搭建前端个性化调试环境
  • 提供web版界面,观测请求情况
  • 中文文档:
  • 中文主页:http://anyproxy.io

Feature

  • work as http or https proxy
  • fully configurable, you could modify a request at any stage with your customized javascript code
  • when working as https proxy, AnyProxy could intercept https requests for any domain without complaint by browser (after you trust its root CA)
  • a web interface for you to watch realtime request details, where html with (almost) any charset could be shown correctly

Quick Start

step 1 - install

  • install NodeJS
  • npm install -g anyproxy , may require sudo
  • python is optional, it will be OK if you get some error about it during installing.

step 2 - start proxy server

  • start with default settings : anyproxy
  • ...or start with a specific port: anyproxy --port 8001
  • ...start with a rule file: anyproxy --rule ./rule_sample/rule_allow_CORS.js

step 3 - set up proxy settings in your browser , or system ,or mobile devices ,etc

  • default proxy should be 127.0.0.1:8001 , or you_ip_address:8001 on remote devices

step 4 - launch web interface

  • visit http://127.0.0.1:8002 ,you will see realtime requests in your browser
  • be sure to use web interface with modern browsers

screenshot

Rule module

  • Rule module is the specialty for AnyProxy. Think it as a middleware, you could write your own code to hack requests at any stage, no matter it is about to response or the proxy just gets the request. In this way, AnyProxy would be flexible to meet your own demands.

  • It's highly recommended to read this guide before using: What is rule file and how to write one ?

  • An entire scheme of rule file could be found at ./rule_sample/rule__blank.js. Besides, there are some samples at ./rule_sample. That may help you a lot when writing your own rule files.

Https features

After configuring rootCA, AnyProxy could help to decrypt https requests, whose approach is also called Man-In-The-Middle(MITM).

A guide about configuring https features is here : https://github.com/alibaba/anyproxy/wiki/How-to-config-https-proxy

HTTPS配置中文教程 : https://github.com/alibaba/anyproxy/wiki/HTTPS%E7%9B%B8%E5%85%B3%E6%95%99%E7%A8%8B

Others

to save request data

  • to save request data to local file, use anyproxy --file /path/to/file
  • anyproxy uses nedb to save request data. Since NeDB's persistence uses an append-only format, you may get some redundant record in local file. For those dupplicated ones with the same id, just use the lastest line of record.
  • TrafficeRecorder is another tool based on anyproxy to help recording all request data, including header and body. You may have a try.

throttling

  • for instance, anyproxy --throttle 10 sets the speed limit to 10kb/s (kbyte/sec)
  • this is just a rough throttling for downstream, not for network simulation

work as a module for nodejs

  • use it as a module and develop your own proxy.
npm install anyproxy --save
var proxy = require("anyproxy");

//create cert when you want to use https features
//please manually trust this rootCA when it is the first time you run it
!proxy.isRootCAFileExists() && proxy.generateRootCA();

var options = {
    type          : "http",
    port          : 8001,
    hostname      : "localhost",
    rule          : require("path/to/my/ruleModule.js"),
    dbFile        : null,  // optional, save request data to a specified file, will use in-memory db if not specified
    webPort       : 8002,  // optional, port for web interface
    socketPort    : 8003,  // optional, internal port for web socket, replace this when it is conflict with your own service
    throttle      : 10,    // optional, speed limit in kb/s
    disableWebInterface : false, //optional, set it when you don't want to use the web interface
    setAsGlobalProxy : false, //set anyproxy as your system proxy
    silent        : false //optional, do not print anything into terminal. do not set it when you are still debugging.
};
new proxy.proxyServer(options);

Contact

  • Please feel free to raise issue, or give us some advice. :)
  • AnyProxy用户旺旺群:1203077233

License

  • Apache License, Version 2.0