UDP faking support

This commit is contained in:
Vadim Vetrov
2024-12-04 23:48:18 +03:00
parent 5ee77d517b
commit b2ac2e0d03
5 changed files with 187 additions and 30 deletions

10
quic.h
View File

@@ -1,6 +1,7 @@
#ifndef QUIC_H
#define QUIC_H
#include "types.h"
#include "utils.h"
/**
@@ -125,4 +126,13 @@ int quic_parse_initial_message(uint8_t *inpayload, uint32_t inplen,
struct quici_hdr *qhdr,
uint8_t **payload, uint32_t *plen);
// Like fail_packet for TCP
int udp_fail_packet(struct udp_failing_strategy strategy, uint8_t *payload, uint32_t *plen, uint32_t avail_buflen);
// Like gen_fake_sni for TCP
int gen_fake_udp(struct udp_fake_type type,
const void *ipxh, uint32_t iph_len,
const struct udphdr *udph,
uint8_t *buf, uint32_t *buflen);
#endif /* QUIC_H */