Skip to content

gRPC • http/2 - calls do not work with bypass #69

@pabloalmeidas13

Description

@pabloalmeidas13

Good afternoon,
first I found this library incredible, congratulations on the work!

I use lib to intercept various protocols (http, https, mongodb, rabbitmq, redis, etc. ..)
however, when I try to intercept the gRPC calls made by lib Google PubSub it doesn't work like the other protocols, it seems to be looping.

investigating on the internet, i found that this lib uses under the engine called gRPC, and that in turn uses underneath called http2

Our use case is not for the purpose of TDD (unit tests), but I use it as a Firewall allowing or not requests.

Below is an example of my code:

`
var Mitm = require("mitm");
var mitm = Mitm();
mitm.enable();

    mitm.on("connect", function(socket:any, opts:any) {
        socket.bypass();
        try{         
            if("my release rule") {
                socket.bypass();
            }
            else {
                socket.end();
            }
        }
        catch(err){
            socket.end();
        }
    });

`

Nodejs : v12.16.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions