Commit Graph

132 Commits

Author SHA1 Message Date
cdbd80eeba Merge remote changes with local WebSocket improvements
- Combined yashksaini-coder's flow control improvements with luca's WSS features
- Preserved comprehensive WSS support, TLS configuration, and handshake timeout
- Added production-ready buffer management and connection limits
- Maintained backward compatibility with existing WebSocket functionality
- Integrated both approaches for optimal WebSocket transport implementation
2025-09-17 01:00:15 -04:00
284eee78d7 Merge branch 'main' into add-ws-transport 2025-09-16 01:04:16 +05:30
4fdfdae9fb Refactor P2PWebSocketConnection and WebsocketTransport constructors for improved readability. Clean up whitespace and enhance logging for connection management. 2025-09-12 03:11:43 +05:30
0271a36316 Update the flow control, buffer management, and connection limits. Implement proper error handling and cleanup in P2PWebSocketConnection. Update tests for improved connection handling. 2025-09-12 03:04:38 +05:30
771b837916 app{websocket): Refactor transport type annotations and improve event handling in QUIC connection 2025-09-10 04:15:56 +05:30
93db588b9e Merge branch 'main' into add-ws-transport 2025-09-10 02:49:52 +05:30
4e8ebf707a Merge branch 'main' into fix_expose_timeout_muxer_multistream 2025-09-09 00:43:38 +05:30
f4d5a44521 Fix type errors and linting issues
- Fix type annotation errors in transport_registry.py and __init__.py
- Fix line length violations in test files (E501 errors)
- Fix missing return type annotations
- Fix cryptography NameAttribute type errors with type: ignore
- Fix ExceptionGroup import for cross-version compatibility
- Fix test failure in test_wss_listen_without_tls_config by handling ExceptionGroup
- Fix len() calls with None arguments in test_tcp_data_transfer.py
- Fix missing attribute access errors on interface types
- Fix boolean type expectation errors in test_js_ws_ping.py
- Fix nursery context manager type errors

All tests now pass and linting is clean.
2025-09-08 04:18:10 +02:00
afe6da5db2 Merge upstream/main into add-ws-transport
Resolved conflicts in:
- .gitignore: Combined JavaScript interop and Sphinx build ignores
- libp2p/__init__.py: Integrated QUIC transport support with WebSocket transport
- libp2p/network/swarm.py: Used upstream's improved listener handling
- pyproject.toml: Kept both WebSocket and QUIC dependencies

This merge brings in:
- QUIC transport implementation
- Enhanced swarm functionality
- Improved peer discovery
- Better error handling
- Updated dependencies and documentation

WebSocket transport implementation remains intact and functional.
2025-09-07 23:47:41 +02:00
396812e84a Experimental: Add comprehensive WebSocket and WSS implementation with tests
- Implemented full WSS support with TLS configuration
- Added handshake timeout and connection state tracking
- Created comprehensive test suite with 13+ WSS unit tests
- Added Python-to-Python WebSocket peer-to-peer tests
- Implemented multiaddr parsing for /ws, /wss, /tls/ws formats
- Added connection state tracking and concurrent close handling
- Created standalone WebSocket client for testing
- Fixed circular import issues with multiaddr utilities
- Added debug tools for WebSocket URL testing

All WebSocket transport functionality is complete and working.
Tests demonstrate WebSocket transport works correctly at the transport layer.
Higher-level libp2p protocol compatibility issues remain (same as JS interop).
2025-09-07 23:44:17 +02:00
2fe5882013 fix: add quic utils test and improve connection performance 2025-09-04 21:25:37 +00:00
c693cd9bb9 Merge branch 'main' into add-ws-transport 2025-09-04 15:19:11 +05:30
25d7706047 Added timeout passing in muxermultistream. Updated the usages. Tested the params are passed correctly 2025-09-04 14:58:22 +05:30
d0c81301b5 fix: quic transport mock in quic connection 2025-09-02 18:47:07 +00:00
d2d4c4b451 fix: proper connection config setup 2025-09-02 18:27:47 +00:00
33730bdc48 fix: type assertion for config class 2025-09-02 16:39:38 +00:00
159d2cc322 Merge remote-tracking branch 'upstream/main' 2025-09-02 16:16:21 +00:00
9749be6574 fix: refine selection of quic transport while init 2025-08-31 16:07:41 +00:00
186113968e chore: remove unwanted code, fix type issues and comments 2025-08-31 13:15:51 +00:00
31040931ea fix: remove unused upgrade_listener function (Issue 2 from #726) 2025-08-30 23:44:49 +02:00
2c03ac46ea fix: Peer ID verification during dial (#7) 2025-08-30 14:08:53 +05:30
58433f9b52 fix: changes to opening new stream, setting quic connection parameters
1. Do not dial to open a new stream, use existing swarm connection in quic transport to open new stream
2. Derive values from quic config for quic stream configuration
3. Set quic-v1 config only if enabled
2025-08-30 14:08:53 +05:30
933741b190 fix: allow accept stream to wait indefinitely 2025-08-30 14:08:53 +05:30
6d1e53a4e2 fix: ignore peer id derivation for quic dial 2025-08-30 14:08:53 +05:30
5ed3707a51 fix: use ASN.1 format certificate extension 2025-08-30 14:08:53 +05:30
84c9ddc2dd chore: cleanup and doc gen fixes 2025-08-30 14:08:53 +05:30
a6ff93122b chore: fix linting issues 2025-08-30 14:08:53 +05:30
8e6e88140f fix: add support for rsa, ecdsa keys in quic 2025-08-30 14:08:53 +05:30
342ac746f8 fix: client certificate verification done 2025-08-30 14:08:52 +05:30
b3f0a4e8c4 DEBUG: client certificate at server 2025-08-30 14:08:32 +05:30
0f64bb49b5 chore: log cleanup 2025-08-30 14:08:22 +05:30
03bf071739 chore: cleanup and near v1 quic impl 2025-08-30 14:08:22 +05:30
c15c317514 fix: accept stream on server side 2025-08-30 14:08:22 +05:30
6c45862fe9 fix: succesfull echo example completed 2025-08-30 14:08:22 +05:30
8f0cdc9ed4 fix: succesfull echo 2025-08-30 14:08:22 +05:30
bbe632bd85 fix: initial connection succesfull 2025-08-30 14:08:21 +05:30
2689040d48 fix: handle short quic headers and compelete connection establishment 2025-08-30 14:08:06 +05:30
8263052f88 fix: peer verification successful 2025-08-30 14:08:06 +05:30
e2fee14bc5 fix: try to fix connection id updation 2025-08-30 14:08:06 +05:30
6633eb01d4 fix: add QUICTLSSecurityConfig for better security config handle 2025-08-30 14:08:06 +05:30
123c86c091 fix: duplication connection creation for same sessions 2025-08-30 14:08:06 +05:30
369f79306f chore: add logs to debug connection 2025-08-30 14:08:06 +05:30
cb6fd27626 fix: process packets received and send to quic 2025-08-30 14:08:06 +05:30
a1d1a07d4c fix: implement missing methods 2025-08-30 14:08:05 +05:30
ac01cc5038 fix: add echo example 2025-08-30 14:07:54 +05:30
45c5f16379 fix: update conn and transport for security 2025-08-30 14:07:31 +05:30
ce76641ef5 temp: impl security modile 2025-08-30 14:07:31 +05:30
bc2ac47594 fix: add basic quic stream and associated tests 2025-08-30 14:07:31 +05:30
a3231af714 fix: add basic tests for listener 2025-08-30 14:07:31 +05:30
54b3055eaa fix: impl quic listener 2025-08-30 14:07:31 +05:30