对http使用customParser的示例(以grpc over http2 为例)

Overview

以customerParser方式解包http请求的示例(grpc over http2)

grpc请求的底层是http2,http2 stream 实质上是一种长连接,可以用whistle customerParser的方式进行抓包解包

运行方式

  1. node >= 12, whistle >= 2.7.21
  2. npm i
  3. npm run dev

配置规则

localhost:50051 custom-http:// enable://customParser 如果发现不能代理,需要配置一下switchomega,参考 https://github.com/avwo/whistle/issues/266

hello world示例

这是一个 UnaryCall 的例子,

node ./examples/greeter_server.js 
node ./examples/greeter_client.js 

可以在Frames里面看到一应一答的传输帧

route_guide 示例

这是一个 stream 的例子,包括各种方向的stream,

node ./examples/route_guide/route_guide_server.js 
node ./examples/route_guide/route_guide_client.js 

可以在Frames里面看到长连接中每一帧的具体解包示例

custom-http解包

You might also like...

JSON-RPC 2.0 implementation over WebSockets for Node.js and JavaScript/TypeScript

JSON-RPC 2.0 implementation over WebSockets for Node.js and JavaScript/TypeScript

WebSockets for Node.js and JavaScript/TypeScript with JSON RPC 2.0 support on top. About The rpc-websockets library enables developers to easily imple

Dec 21, 2022

Json2video-nodejs-sdk - Create videos programmatically in the cloud from NodeJS: add watermarks, resize videos, create slideshows, add soundtrack, voice-over with text-to-speech (TTS), text animations.

Create videos programmatically in Node JS Create and edit videos: add watermarks, resize videos, create slideshows, add soundtrack, automate the creat

Nov 20, 2022

Make the content slide prettily across the screen with variable sizes of scrolling items, in any of four directions, pausing while the mouse is over the marquee, and all with vanilla JavaScript.

TEG Marquee Make the content slide prettily across the screen with variable sizes of scrolling items, in any of four directions, pausing while the mou

Dec 30, 2021

💸 1st place at Hack The Job 2022 - A chrome extension that automatically tracks purchases and budgets, alerting users if they go over their spending limits and allowing them to download PDF reports.

 💸 1st place at Hack The Job 2022 - A chrome extension that automatically tracks purchases and budgets, alerting users if they go over their spending limits and allowing them to download PDF reports.

💸 Won 1st place overall @ Hack the Job! 💸 A browser extension for keeping on top of your finances. This project will keep track of the purchases you

Oct 4, 2022

Chrome extension for granular visual control over Notion.so

Notion Style Tweaks (Beta) A Chrome extension aiming to give granular control over the visual experience of Notion. Written in Svelte. Installation Ch

Dec 25, 2022

Etch-a-Sketch - Resizable grids that change color when you hover over it

Etch-a-Sketch - Resizable grids that change color when you hover over it

Etch-a-sketch This repository contains a basic resizable grid which changes its

Feb 11, 2022

Serve read-only Redis data over a HTTP API with auth

Redis data exposer This was created for Cliptok and not intended for use outside of it. Use at your own peril. This application will serve an API that

May 28, 2022

A port of bitcoin-core that will (over time) become TS friendly.

bitcoin-core A modern Bitcoin Core REST and RPC client to execute administrative tasks, multiwallet operations and queries about network and the block

Nov 22, 2022

API client to test endpoints over HTTP. Uses superagent under the hood

@japa/client API client to test endpoints over HTTP. Uses superagent under the hood The API client plugin of Japa makes it super simple to test your A

Apr 13, 2022

Non-interactive publicly verifiable distributed key generation and resharing algorithm over BLS12-381

NPVDKG-RS This repository contains a mathematical presentation and some code to demonstrate our developed non-interactive publicly verifiable distribu

May 19, 2022

Share an abstract-level database over the network or other kind of stream.

many-level Share an abstract-level database over the network or other kind of stream. The successor to multileveldown. If you are upgrading, please se

Mar 27, 2022

A meme generator plugin for Figma and FigJam. Import memes from all over the internet with customizable captions and share it far and wide.

A meme generator plugin for Figma and FigJam. Import memes from all over the internet with customizable captions and share it far and wide.

Is This A Meme? 💁🏻 🦋 A meme generator plugin for Figma and FigJam. Import memes from all over the internet, add your captions, and share it far and

Aug 30, 2022

docsQL - Getting an overview over your Markdown file in your Jamstack site

docsQL - Getting an overview over your Markdown file in your Jamstack site

docsQL Getting an overview of your Jamstack Markdown files. Demo Play with: https://peterbe.github.io/docsql/ You're supposed to run docsQL with your

Jan 3, 2023

A Node.js client & server implementation of the WAMP-like RPC-over-websocket system defined in the OCPP-J protcols.

A Node.js client & server implementation of the WAMP-like RPC-over-websocket system defined in the OCPP-J protcols.

OCPP-RPC A client & server implementation of the WAMP-like RPC-over-websocket system defined in the OCPP-J protcols (e.g. OCPP1.6J and OCPP2.0.1J). Re

Dec 30, 2022

Several custom made and legacy icons, and icons collected all over the internet in 1 set, UI selectable.

Several custom made and legacy icons, and icons collected all over the internet in 1 set, UI selectable.

Custom icon library Several custom made and legacy icons, and icons collected all over the internet in 1 set, UI selectable. Upon each Material Design

Dec 12, 2022

Map over an object in a preorder or postoder depth-first manner

Map over an object in a preorder or postoder depth-first manner

obj-walker Walk objects like this guy. Map over an object in a preorder or postoder depth-first manner. Also, provides functions for serializing and d

Jun 2, 2022

Verify your E-Mail and Phone Number using link sent over mail and sms.

Verify your E-Mail and Phone Number using link sent over mail and sms.

Phone-and-Mail-Verification-With-Link Verify your E-Mail and Phone Number using link sent over mail and sms. Endpoints POST /user/create Body { "n

Sep 14, 2022

Kanna is a Discord bot written in Javascript developed by Mirabellier just for fun. 🍄 Containing over 100+ commands from different categories (soon). 🌼

Kanna is a Discord bot written in Javascript developed by Mirabellier just for fun. 🍄 Containing over 100+ commands from different categories (soon). 🌼

Kanna Kanna is a Discord bot written in Javascript developed by Mirabellier just for fun. 🍄 Containing over 100+ commands from different categories (

Dec 15, 2022

Music World is web3 app built over Solana where anyone can add their favourite songs and see the other songs that are added by different people from around the globe.

💥 Introduction Music World is web3 app built over Solana where anyone can add their favourite songs and see the other songs that are added by differe

Jun 10, 2022
Owner
null
Next-gen mobile first analytics server (think Mixpanel, Google Analytics) with built-in encryption supporting HTTP2 and gRPC. Node.js, headless, API-only, horizontally scaleable.

Introduction to Awacs Next-gen behavior analysis server (think Mixpanel, Google Analytics) with built-in encryption supporting HTTP2 and gRPC. Node.js

Socketkit 52 Dec 19, 2022
Run HTTP over UDP with Node.js

nodejs-httpp - Run HTTP over UDP based transport and Bring Web in Peer or P2P styles main js modules: udt.js, httpp.js, udts.js and httpps.js, that's

AppNet.Link 142 Aug 2, 2022
This is a collection of over two hundred code samples an growing for the Bing Maps V8 web control.

Bing Maps V8 Code Samples This is a collection of over a hundred code samples for the Bing Maps V8 web control. These samples have been collected from

Microsoft 130 Dec 8, 2022
magneticHover lets you trigger hover effect on the element when the cursor is near it, but not over it yet

magneticHover magneticHover lets you trigger hover effect on the element when the cursor is near it, but not over it yet. Examples https://codesandbox

Halo Lab 35 Nov 30, 2022
❄️ Add a live frosted glass blur effect over any type of web content, including text.

Frosted Glass ❄️ Add a live frosted glass blur effect over any type of web content, including text. ️️ Demos Install npm install frosted-glass --save

Adrian Carriger 63 Nov 10, 2022
Map over promises concurrently

p-map Map over promises concurrently Useful when you need to run promise-returning & async functions multiple times with different inputs concurrently

Sindre Sorhus 929 Dec 31, 2022
Awesome Observable related stuff - An Observable is a collection that arrives over time.

Awesome Observables An Observable is a collection that arrives over time. Observables can be used to model push-based data sources such as events, tim

Sindre Sorhus 320 Dec 17, 2022
Automating Beef to use over wan without configuring your router

BeefAuto Follow on Social Media Platforms python script Automate Beef And Configure it to use overwan by using ngrok to open ports ScreenShots INSTALL

youhacker55 50 Dec 6, 2022
Securely collect browsing history over browsers.

Visited-CLI Securely collect browsing history over browsers. Getting started Here is the getting started guide. Firstly, clone the git, and change to

Fumiya A 62 Dec 30, 2022