This project is an implementation of a simple QUIC-based echo server and client in Go. QUIC (Quick UDP Internet Connections) is a transport protocol designed to provide fast, reliable, and secure communication over the internet. The echo server and client use QUIC to establish low-latency, secure connections, making it ideal for scenarios like real-time messaging, gaming, financial services, and IoT applications.
- Low-latency communication using QUIC protocol.
- Secure connections via TLS encryption.
- Simple echo functionality for testing QUIC-based communication.
- Written in Go, ensuring high performance and ease of use.
- Easily extendable for various use cases, such as gaming, fintech, or IoT.
- Banking/Fintech: Secure, real-time payment processing.
- Gaming: Low-latency game servers and real-time multiplayer.
- IoT Systems: Reliable communication for devices with constrained networks.
- Chat Apps: Fast messaging with minimal overhead.
- Secure Communication: Built-in encryption for privacy-first applications.
Make sure you have the following installed:
- Go 1.18+ Install Go
- QUIC-go library (automatically included in
go.mod
) - Certificates for TLS encryption (generate if needed)
-
Clone the repository:
git clone https://github.com/thai-ru/QUIC-Echo.git cd QUIC-Echo
-
Build the project:
go build cmd/server/main.go go build cmd/client/main.go
-
Generate self-signed certificates for TLS:
openssl req -newkey rsa:2048 -nodes -keyout server.key -x509 -days 365 -out server.crt
To run the QUIC echo server, execute the following command:
go run cmd/server/main.go
You should see the output:
QUIC server listening on localhost:4242
In a new terminal, run the client:
go run cmd/client/main.go
You'll be prompted to send messages to the server. Example:
Enter message (or type 'exit' to quit): Hello QUIC server!
Client sent: Hello QUIC server!
Client received: Echo: Hello QUIC server!
To close the client, type exit
:
Enter message (or type 'exit' to quit): exit
QUIC-Echo/
│
├── cmd/
│ ├── client/
│ │ └── main.go # Client-side QUIC logic
│ └── server/
│ └── main.go # Server-side QUIC logic
│
├── server.crt # TLS certificate (example)
├── server.key # TLS private key (example)
├── go.mod # Go module file
└── README.md # Project documentation
We welcome contributions! If you'd like to contribute to the project, follow these steps:
- Fork the repository.
- Create a new feature branch (
git checkout -b feature/new-feature
). - Commit your changes (
git commit -am 'Add a new feature'
). - Push to the branch (
git push origin feature/new-feature
). - Open a Pull Request.
Please ensure that your changes pass existing tests and that you write new tests if applicable.
This project is licensed under the MIT License. See the LICENSE file for details.
For any questions or support, please reach out via:
- Email: [email protected]
- GitHub Issues: Issues