Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
pabloalmeidas13 opened this issue Mar 19, 2021 · 2 comments
Open

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

pabloalmeidas13 opened this issue Mar 19, 2021 · 2 comments

Comments

@pabloalmeidas13
Copy link

pabloalmeidas13 commented Mar 19, 2021

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

@pabloalmeidas13 pabloalmeidas13 changed the title GRPC calls do not work with bypass gRPC • http/2 - calls do not work with bypass Mar 19, 2021
@moll
Copy link
Owner

moll commented May 1, 2021

Hey!

Thanks for the heads-up! Yeah, it probably indeed doesn't work with HTTP/2 yet. I should take a look how that's implemented in Node.js.

@pabloalmeidas13
Copy link
Author

Tanks @moll, i'm looking forward it 👍 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants