When I tried to make gRPC request through mitmproxy,
request is captured but response not captured.
I tried to see what is happening with 'mitmdump --set proxy_debug=true' but
I have no clue.
How can I capture gRPC streaming response?
https://docs.mitmproxy.org/stable/overview-features/#streaming
When using http2 streaming, you have to not read entire response by mitmproxy option
--set stream_large_bodies=1
Related
I may be lacking in HTTP and HTTPS knowledge so apologies in advance.
I see that in the response to a curl request, using curl -i, we can see the HTTP version and response code, for e.g. HTTP/2 200. This is returned when the curl request is directed at a HTTPS endpoint (https://xxx).
Would it be possible to see a HTTPS in the response? If not, why not?
No, whether the communication is secure or not has nothing to do with which version of the protocol you are using, in the response you will see the version (commonly HTTP/1.1 or HTTP/2 these days)
Using https means that the connection is established over TLS, while the communication protocol is still HTTP.
In simple terms, TLS is a communication channel, while HTTP is a dialect
I was using https://github.com/opentracing-contrib/java-grpc with jaegar tracer for enabling tracing in my grpc client program. Now I would like to use istio service mesh to handle tracing in server side. https://istio.io/latest/docs/tasks/observability/distributed-tracing/overview/ .
So the grpc client now needs to send the appropriate tracing HTTP headers along with each grpc client request so that istio can send those metrics to Jaegar. Does anyone have a working example of fetching the trace span information in grpc client and include the corresponding b3 propagation headers in a grpc client request?
Following http headers need to be passed in a java/C# grpc client request :
x-request-id
x-b3-traceid
x-b3-spanid
x-b3-parentspanid
x-b3-sampled
x-b3-flags
x-ot-span-context
Thanks.
Have a look at the OpenTelemetry-Java-Instrumentation project. It can provide automated tracing of your application without needing to write custom code. It uses an instrumentation agent that runs in the JVM beside your application.
java -javaagent:path/to/opentelemetry-javaagent-all.jar \
-jar myapp.jar
It supports exporting metrics to Jaeger
It also supports propagating headers to downstream requests.
They have just added support for b3-multi headers so a new release should be available in the coming days
Just sending a simple POST request to https://httpbin.org/post.
Fiddler captures the request when I send it from Postman, but doesn't when I send it from Insomnia.
Is there some setting I need to enable either in Fiddler or Insomnia?
By default, Fiddler changes the system proxy to point to the port it's listening onto, http://localhost:8888. Contrary, Insomnia doesn't use the system proxy, but could be manually configured to use a specified proxy:
Choose Settings -> HTTP Proxy and set http://localhost:8888 (or whatever Fiddler is using).
I'm trying to reproduce an odd bug that we believe may be caused by our load balancers trying to check the status of our services, with requests using HTTP/0.9. The service is only configured to use HTTPS, so they are being sent as HTTP/0.9 over HTTPS.
I could use use telnet to send a HTTP/0.9 request, but we have to use HTTPS so that doesn't work. My usual go-to tool for this kind of thing is cURL, but it doesn't look like cURL supports sending 0.9 requests (for good reasons, I know).
What could I use to generate a HTTP/0.9 GET request over HTTPS?
You could use openssl. First establish the SSL connection:
$ openssl s_client -crlf -connect ip:port
CONNECTED
...
lots of output, certificate etc
And then send the request
GET /
[empty line]
I need some help with understanding how to write HTTP router, which recognizes HTTP header as routing criteria. I found the link https://github.com/cgbystrom/netty-tools/blob/master/src/main/java/se/cgbystrom/netty/http/router/RouterHandler.java which seems to do the routing itself. But now it is not clear, how to
connect to another HTTP server
send HTTP request
wait for HTTP response
forward the HTTP response to client
can somebody please give me some explanations?
http://static.netty.io/3.5/xref/org/jboss/netty/example/proxy/package-summary.html
the example of proxy server in Netty, essentially what I wanted