-
Notifications
You must be signed in to change notification settings - Fork 189
Add TLS example under examples/doc-examples (follow-up to PR #831) #978
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
base: main
Are you sure you want to change the base?
Conversation
@yashksaini-coder : Thank you so much to you and @Fatumayattani for your efforts. Appreciate it. It took me sometime to reach this PR as there were close to 12+ PRs in the review queue. Did re-run the CI/CD pipeline. Waiting for the test results. Wish if you could collaborate with @Fatumayattani and arrive at a good conclusion on this PR soon. We need a proper screencast demonstrating the example using TLS along with proper documentation to enable interop testing using TLS. CCing @acul71, who could help you on the transport interop testing front using TLS example. |
ping me when is merged, I'll try to integrate in interop-tests |
Thank you @seetadev and @acul71 for the feedback and clear guidance 🙏 Here’s the screencast showing the TLS example running successfully libv.mp4@yashksaini-coder , please feel free to add the documentation part to make it easier to use for interop testing 🙏 |
Got it, I will add the documentation along with discussion post to map the implementation done |
Hi @Fatumayattani thanks for the video. Is that showing a python server ? Is there a client also ? |
Hi @acul71, yes that’s the server side. I’ll add a simple client example too to make interop testing smoother 🙌🏽 |
…; add argument parsing for host and port configuration.
…hance message handling and argument parsing
…ve error handling and logging in read_data function
… up imports and formatting
…mal binding addresses; improve connection handling in TLSReadWriter class to manage closed connections more effectively.
… code and improve clarity.
@yashksaini-coder : Thank you so much for considering our feedback points. Appreciate the efforts. Re-ran the CI/CD pipeline. Hopefully, all the tests should pass. CCing @acul71, who could use this example for testing transport interop tests. |
@yashksaini-coder : Wish if you could resolve the CI/CD issues. |
…le scripts; improve certificate verification docstring formatting
All issues resolved, failing ci-checks. Requesting an update and further feedback. |
What was wrong?
Issue #700 follow-up. After @guha-rahul’s TLS (PR #831) was merged, there was still no simple runnable example demonstrating how to start a TLS-enabled host in py-libp2p.
Developers needed a small working reference to verify that the new transport layer functions as expected.
How was it fixed?
Added a short example under
examples/doc-examples/example_tls.py
that demonstrates how to create and start a TLS-secured host usingTLSTransport
.The example runs locally, prints the peer ID, and lists the secure multiaddrs for verification.
To-Do
examples/doc-examples
Output
TLS host starts successfully with secure addresses and confirms that TLS handshake is active.
A sample terminal output is attached below for reference.
Cute Animal Picture