Feature request - example for http/2 https tracing
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 22.7k
- Forks
- 4.1k
- Avg merge
- 5d 13h
- Merged PRs (30d)
- 3
Description
The current sslsniff.py example is great and works well on https requests based on http/1.1 , however modern curl implementations will default to http/2 and the headers, URL params etc are non readable.
Setup
Either run from source / install / build from source and run sslsniff
sudo python ./sslsniff.py / sudo sslsniff / sudo /usr/share/bcc/tools/sslsniff
Expected result
curl --http1.1 https://example.com should have the same output as curl --http2 https://example.com
e.g.
WRITE/SEND 830.644098147 curl 37631 75
----- DATA -----
GET / HTTP/1.1
Host: example.com
User-Agent: curl/7.81.0
Accept: */*
----- END DATA -----
READ/RECV 830.653605807 curl 37631 340
----- DATA -----
HTTP/1.1 200 OK
Age: 353099
Cache-Control: max-age=604800
Content-Type: text/html; charset=UTF-8
Date: Thu, 08 Sep 2022 04:28:25 GMT
Etag: "3147526947+gzip+ident"
Expires: Thu, 15 Sep 2022 04:28:25 GMT
Last-Modified: Thu, 17 Oct 2019 07:18:26 GMT
Server: ECS (chb/0286)
Vary: Accept-Encoding
X-Cache: HIT
Content-Length: 1256
Actual Result
curl --http2 https://example.com has non unreadable headers
e.g.
----- DATA -----
PRI * HTTP/2.0
SM
----- END DATA -----
WRITE/SEND 897.940178601 curl 37635 27
----- DATA -----
d
----- END DATA -----
WRITE/SEND 897.940218099 curl 37635 13
----- DATA -----
�
----- END DATA -----
WRITE/SEND 897.940307475 curl 37635 37
----- DATA -----
���A�/��]\��z�%�P�S*/*
----- END DATA -----
READ/RECV 897.949450790 curl 37635 39
----- DATA -----
d@@
----- END DATA -----
WRITE/SEND 897.949531472 curl 37635 9
----- DATA -----
----- END DATA -----
READ/RECV 897.949619679 curl 37635 13
----- DATA -----
----- END DATA -----
READ/RECV 897.949700198 curl 37635 9
----- DATA -----
----- END DATA -----
READ/RECV 897.956629165 curl 37635 188
----- DATA -----
���e�B�X��~VÅ�4�_�I|���MjqØï¿½ï¿½ï¿½ï¿½ï¿½=�J�7� @5pO�dJbѿ��Y
N�'i��7�W��!jO�d�ï¿ï¿½s½J�7� @5pO�dJbÑ¿l��=�J�5}@;p/\�bÑ¿v��{r��'�� �?�{���-i[D<��o@��I�HIT
----- END DATA -----
READ/RECV 897.956723581 curl 37635 9
----- DATA -----
�
----- END DATA -----
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with tools/sslsniff.py and reproduce the reported difference using the supplied curl --http1.1 and curl --http2 commands. Trace how captured TLS data is decoded and identify what is needed for readable HTTP/2 headers and URLs. Done means the HTTP/2 output is readable and comparable to the HTTP/1.1 example.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, networking, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100