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

node-fiddler

v1.0.5

Published

a http proxy, can delegate request to other url or local file, and have a simple webui

Downloads

6

Readme

node-fiddler

  • 这是node写的http代理
  • 基于socket,纯手工编写,支持keep-alive, chunked等功能
  • 可以实现fiddler的auto_responder功能(就是将某个请求用本地文件返回)
  • 可以实现类似改hosts文件的功能
  • 可以实现https的反向代理和内容劫持,但用的是不合法证书(可以用自己的合法证书替换)
  • 实现了http的connect方法

config.json介绍

  • 可以在proxy启动的状态下,改变config.json文件的内容,会自动生效
({
    'listen_host':'127.0.0.1',
    'listen_port':'8083',
    'max_connections':1000,
    'hosts':[
//        ['www.baidu.com','127.0.0.1'],
    ],
    'auto_responder':[

        ['http://www.baidu.com/','file:test.html'],
        //['http://www.baidu.com/','http://127.0.0.1/'],
        //[/^http:\/\/www\.baidu\.com\/s/,'testresult.html'],
        //[/^http:\/\/www\.baidu\.com\/s/,'testresult.html'],
        //替换成和query同名的文件
        //[/^http:\/\/www\.baidu\.com\/s?.*wd=(\w+)/,'file:{1}.html'],
        //替换目录
        //[/^http:\/\/m1-ps-wwwui0-j10\.m1\.baidu\.com:8090\/cache/(.*)/,'file:{pwd}/cache/{1}'],
        //全部替换成wd=qq
        [/^http:\/\/www\.baidu\.com\/s/,'{_}?wd=qq'],

        //高级功能,走回调
        
        ["http://s1.bdstatic.com/r/www/cache/static/global/js/all_async_popstate_40a67976.js","{_}",function(code){
            code+=";alert('testtest');";
            return code;
        }],
        
    ],
})

使用方法

node httpproxy.js

尚未解决的已知问题

  • 没有实现multipart/form-data,上传文件可能会有问题
  • 没有实现https协议的代理