cloudflare / quiche

🥧 Savoury implementation of the QUIC transport protocol and HTTP/3
https://docs.quic.tech/quiche/
BSD 2-Clause "Simplified" License
9.34k stars 701 forks source link

python、nodejs、c++ quic client Handshake error #1272

Open xtuyaowu opened 2 years ago

xtuyaowu commented 2 years ago

hi: try to use python、nodejs、c++ as quic client connect to quiche server but got Handshake error https://github.com/nodejs/quic https://github.com/aiortc/aioquic https://github.com/lucas-clemente/quic-go those project Handshake is TLS 1.3

can both client and server side ignore certificate check ??

thanks

ljluestc commented 2 weeks ago
from aioquic.asyncio import connect
from aioquic.asyncio.client import QuicConnection
from aioquic.asyncio.protocol import QuicConnectionProtocol
from aioquic.asyncio.transport import QuicTransport
from aioquic.asyncio.ssl import ClientContext
from aioquic.asyncio.ssl import ClientContext

class MyClientProtocol(QuicConnectionProtocol):
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        self.transport = None

async def main():
    # Create a context with no certificate validation
    context = ClientContext()
    context.check_hostname = False
    context.verify_mode = ssl.CERT_NONE

    # Connect to the server
    async with connect('localhost', 4433, ssl_context=context, create_protocol=MyClientProtocol) as transport:
        # Interact with the server
        pass

if __name__ == "__main__":
    import asyncio
    asyncio.run(main())