Coder Social home page Coder Social logo

yijiang-kabam / whistle Goto Github PK

View Code? Open in Web Editor NEW

This project forked from avwo/whistle

0.0 2.0 0.0 10.35 MB

HTTP, HTTPS, Websocket debugging proxy tool

Home Page: https://whistle.gitbooks.io/help/content/

License: MIT License

JavaScript 99.39% HTML 0.61%

whistle's Introduction

whistle logo

whistle

node version build status Test coverage npm download NPM count David deps License

当前whistle的最新版本为v1.1.0,为确保使用whistle所有功能,请及时更新whistle

whistle是Node实现的类似Fiddler的跨平台web调试代理工具,可用于查看、修改及构造HTTP(S)、Websocket请求响应,并继承了Fiddler抓包界面的部分优秀设计,去掉Fiddler通过断点修改请求响应的方式,采用扩展Hosts配置的方式,实现通过配置操作请求响应,且提供了通过Node模块扩展功能的方式,具体参见实现原理

如何安装使用whistle请参见:whistle帮助文档

基本功能

配置模式

pattern operator-uri

其中,pattern可以为:

  1. 域名:www.test.com(所有该域名下的请求都会执行operator-uri)
  2. 路径:http://www.test.com/xxx(可以不加协议www.test.com/xxxhttp://www.test.com/xx·路径及其子路径的请求都会执行operator-uri)
  3. 正则:/^https?:\/\/([^\/]+)\/xxx/(http(s)://host:port/xxx路径及其子路径的请求都会执行operator-uri,且在operator-uri中可以通过$1, $2, ..., $9获取url里面的子匹配)

更多详细内容请参见配置模式匹配方式

operator-uri有以下功能:

  • 配置host
  • 修改请求,包括: 请求方法、请求头、修改内容、延迟发送请求、限制请求速度,设置timeout
  • 修改响应,包括: 响应状态码、响应头、修改内容、 延迟响应、 限制响应速度
  • 替换请求:
    • 替换本地文件(支持替换jsonp请求)
    • 设置代理(支持http、socks代理)
    • 请求转发
    • 通过插件扩展
  • 内置weinre,通过weinre可以修改手机端或远程网页的DOM结构,调试页面等
  • 设置过滤,用于过滤一些已设置的规则
  • 导出请求响应的详细信息
  • 自定义脚本修改url的请求参数,实现动态匹配规则的功能
  • 支持自动捕获手机端或远程页面的js异常,且可以嵌入脚本打印console等

完整功能参见协议列表

Network

Network

Rules

Rules

Values

Values

完整功能请参见whistle帮助文档

License

MIT

whistle's People

Contributors

avwo avatar

Watchers

James Cloos avatar Yi Jiang avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.