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 🙏

© 2026 – Pkg Stats / Ryan Hefner

bd-https-proxy

v0.1.1

Published

百度浏览器项目组https迁移用测试https代理服务器

Readme

背景

由于我们前端团队现在需要开始全面支持https,但是在调试时却总是需要部署到沙盒后才能看到迁移的效果,一来一回比较耗时。为此我开发了一个简单的https-proxy工具,可以在本地启动一个https服务器,这个服务器可以代理目前有的网址,也可以支持本地文件的静态服务器。

使用步骤

  1. 首先运行npm install -g bd-https-proxy,安装这个小工具
  2. 然后编辑/etc/hosts,添加一条:127.0.0.1 localtest.baidu.com,这个是由于证书必须写好地址,又为了保证不产生跨域问题,所以需要写一个hosts
  3. 在任意一个目录下,运行bd-https-proxy --cert,会在当前目录下生成一个证书文件,你需要安装这个证书并且信任它。这个证书是我自签名的一个证书,不必担心安全问题
  4. 然后就可以按照下面的说明使用这个工具了
  5. 工具开启后,打开https://localtest.baidu.com/,即可访问本地测试服务器(仅本机)

工具使用说明

目前这个https-proxy工具有2种用法,一种是代理模式,一种是本地模式。

代理模式

# 参数为你的本地server地址,不加后面的斜杠
sudo bd-https-proxy http://localhost:7001

本地模式

# 参数为你的本地目录,相对路径
sudo bd-https-proxy --local .

调整端口

使用--port 调整http服务器端口,使用--https-port设置https服务器端口,例如:

# 参数为你的本地目录,相对路径
sudo bd-https-proxy --local . --port 80 --https-port 443
# 或者用缩写
sudo bd-https-proxy -l . -p 80 -s 443
# 如果不使用1024前的端口,可以不加sudo
bd-https-proxy -l . -p 8080 -s 4430