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

[WIP] #277: HTTP2 support #412

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

c7h
Copy link
Contributor

@c7h c7h commented Nov 22, 2021

PR Checklist

  • Applies to work item: engine
  • CLA signed. If not, go over here and sign.
  • Tests added/passed.
  • Requires documentation to be updated
  • I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different approach. Issue number where discussion took place: HTTP/2.0 implementation #277

Info on Pull Request

I've added an optional HTTP2 Socket based on the Hyper library.. This PR is still Work in Progress. It's missing

  • documentation
  • setup procedure (library installation during build)
  • refactoring
  • throttling support
  • proper testing
  • ...

Validation Steps Performed

tested against Open5Gs AMF's SBI API.
To use the HTTP socket, install the restler/requirements.txt and add the --http2 flag to your restler engine command.

@ghost
Copy link

ghost commented Nov 22, 2021

CLA assistant check
All CLA requirements met.

@hidingturtle
Copy link

Hey @c7h !

I am looking into your PR so that your draft can be (hopefully) merged but I could not make it work, it says that the argument "--http2" is invalid.
All I did was:
gh pr checkout 412 (get your pull request)
python ./build-restler.py --dest_dir ~/restler_bin (build the fuzzer as described in the documentation of RESTler)
../restler_bin/restler/Restler compile --api_spec ~/Desktop/5GC_APIs-Rel-15/TS29510_Nnrf_NFManagement.yaml (Compile)
../restler_bin/restler/Restler test --grammar_file Compile/grammar.py --dictionary_file Compile/dict.json --target_ip 127.0.0.10 --target_port 7777 --host localhost --http2 (Test)

Could you clarify the usage?

@c7h c7h force-pushed the feature/#277/http2_support branch from dc3c2bb to 8f6efb5 Compare June 11, 2022 17:35
@c7h
Copy link
Contributor Author

c7h commented Jun 11, 2022

Good afternoon @hidingturtle! Thanks for your effort in testing the http2 module. The http2 flag applies to the restler.py script. After compiling, the Restler executable is missing the flag. My guess is that it has to be added to the Program.fs in order to work. I need help adding this flag in F#.

@hidingturtle
Copy link

Hi @c7h!

Unfortunately, I am not experienced with F#. However, looking at src/driver/Program.fs, I see that it is responsible for the command-line flags. I was not able to figure out how to add the additional http2 flag. Because of this, I ask @marina-p if she could give us any clues or instructions how to modify src/driver/Program.fs (and possibly other needed files) in order to add the http2 flag that is already found in the restler/restler.py (line 260-263) file of this pull request.

Thank you in advance 😄

@hidingturtle
Copy link

Hi @c7h!

Unfortunately, I am not experienced with F#. However, looking at src/driver/Program.fs, I see that it is responsible for the command-line flags. I was not able to figure out how to add the additional http2 flag. Because of this, I ask @marina-p if she could give us any clues or instructions how to modify src/driver/Program.fs (and possibly other needed files) in order to add the http2 flag that is already found in the restler/restler.py (line 260-263) file of this pull request.

Thank you in advance 😄

Hello @c7h !

I was able to add the --http2 flag in F# and now the flags get passed to the restler.py script. I need to know from you how I can provide you my changes.

Nonetheless, restler gets stuck waiting for a response after the first request sent via HTTP2 (does not matter if you use only the restler.py script or the F# binary). Open5GS does not send any response. In my opinion, this is caused because hyper does not perform the HTTP/2 connection flow in a right way. Capturing the traffic via wireshark shows that restler (with this PR version) sends the SETTINGS[0] frame 2 times and no WINDOW_UPDATE[0] frame. This differs from the captured traffic of curl with the --http2-prior-knowledge flag (that works). Therefore, I ask you @c7h if the restler.py script works for you? In my case, it does not work with Open5GS and Free5GC.

@hidingturtle hidingturtle mentioned this pull request Oct 11, 2022
5 tasks
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

Successfully merging this pull request may close these issues.

2 participants