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

webview-proxy

v1.1.0

Published

Android WebView 调试 CLI:扫描可调试 WebView、adb 转发、去 Origin 代理、生成 DevTools 调试链接

Downloads

23

Readme

wvp - Android WebView 调试工具

一个基于 adb + WebSocket 代理的 Android WebView 调试 CLI,用于调试 uni-app App、自定义基座等开启了 WebView 调试的应用。

背景

Android WebView 的 devtools server 会拒绝带 Origin 头的 WebSocket 连接(返回 403),而 Chrome DevTools 前端连 ws 时必然带 Origin 头,导致 HBuilderX 的 inspect、chrome://inspect 等方案全部失败。

wvp 通过一个「去 Origin 代理」绕过此限制:

  • 接收 Chrome DevTools 的连接(去掉 Origin)
  • 用 Node 原生 WebSocket(不带 Origin)转发给手机 WebView

安装

npm install -g <你的 git 仓库地址>

使用

# 启动调试(交互式:选应用 → 列页面 → 复制链接)
wvp start

# 只列出可调试应用
wvp list

# 单独启动代理
wvp proxy

完整调试流程

  1. 手机连接电脑,目标 app 已运行且开启了 WebView 调试
  2. wvp start
  3. 选择要调试的应用
  4. 输入数字复制对应页面的调试链接
  5. 打开 Chrome,地址栏粘贴回车
  6. 切换路由后,按 r 重新探测

前置条件

  • 已安装 Android SDK(adb 可用)
  • 目标应用已调用 WebView.setWebContentsDebuggingEnabled(true)(uni-app 自定义基座默认开启)
  • Chrome 浏览器

原理

Chrome DevTools 前端 (devtools://)
    │  ws://127.0.0.1:9333 (带 Origin)
    ▼
wvp 代理 (去掉 Origin)
    │  ws://127.0.0.1:8003 (不带 Origin)
    ▼
adb forward tcp:8003 → webview_devtools_remote_<pid>
    │
    ▼
手机 WebView

License

MIT