Git Product home page Git Product logo

sharprudp's Introduction

Preface

I once attempted to develop RUDP as a non-standard TCP/UDP communication protocol, simultaneously possessing the reliability of TCP and the stealthiness of UDP. Its traffic might not be monitored by traditional security equipment. This could be something red teams and security developers are looking for. However, this is just an example. If you wish to incorporate it into a production application, you might still need to implement encryption algorithms and serialized transmission, among other operations.

Communication Mechanism

1. Three-Way Handshake:

  • SYN (Client -> Server): The client sends a packet with a SYN flag to request a connection.
  • SYN-ACK (Server -> Client): The server acknowledges the SYN and responds with a packet carrying both SYN and ACK flags.
  • ACK (Client -> Server): The client sends a packet with an ACK flag, confirming the connection is established.

2. Data Transmission:

  • The client and server can begin data exchange. After each data transfer, the recipient sends an ACK to confirm data reception. Similar to TCP, RUDP might acknowledge received packets, ensuring their successful arrival at the destination.

3. Heartbeat Mechanism:

  • To maintain the connection’s active status, both client and server periodically send heartbeat packets after the connection is established. If either party doesn’t receive a heartbeat within a specified period, it considers the connection broken and attempts reconnection.

4. Packet Retransmission:

  • A Boolean value 'IsConnected' is established. If the sender doesn’t receive an acknowledgment within a set period, it might retransmit the packet. Generally, the client sends an ACK-SYN packet to the server for packet handshake, verifying connection success. If connected, 'IsConnected' returns True; otherwise, it returns False, prompting reconnection attempts in a cycle.

5. Orderliness and Security:

  • Encryption Techniques: Utilize AES, RSA, or other encryption algorithms for RUDP data encryption. Encryption keys can be exchanged through the Diffie-Hellman key exchange protocol or other secure methods.
  • Identity Verification Mechanism: Employ digital certificates and Public Key Infrastructure (PKI) to offer identity verification for RUDP connections, ensuring data authenticity and integrity while preventing middleman attacks.

6. Congestion Control:

  • RUDP needs to modify its packet sending rate to circumvent network congestion.

7. Flow Control:

  • RUDP employs a sliding window or other mechanisms to manage data flow, ensuring the recipient isn’t overwhelmed.

8. Terminating Connection:

  • When the client or server intends to end the connection, it sends a packet with a FIN flag. The recipient, upon receiving this packet, sends an ACK for confirmation and terminates the connection.

image

sharprudp's People

Contributors

inotgreen avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.