mirror of
https://github.com/Waujito/youtubeUnblock.git
synced 2025-12-27 01:48:07 +03:00
Add multiple sections with config sets for various domains
This commit is contained in:
10
mangle.h
10
mangle.h
@@ -6,6 +6,8 @@
|
||||
|
||||
#define PKT_ACCEPT 0
|
||||
#define PKT_DROP 1
|
||||
// Used for section config
|
||||
#define PKT_CONTINUE 2
|
||||
|
||||
/**
|
||||
* Processes the packet and returns verdict.
|
||||
@@ -18,14 +20,14 @@ int process_packet(const uint8_t *packet, uint32_t packet_len);
|
||||
* Processe the TCP packet.
|
||||
* Returns verdict.
|
||||
*/
|
||||
int process_tcp_packet(const uint8_t *raw_payload, uint32_t raw_payload_len);
|
||||
int process_tcp_packet(const struct section_config_t *section, const uint8_t *raw_payload, uint32_t raw_payload_len);
|
||||
|
||||
|
||||
/**
|
||||
* Processes the UDP packet.
|
||||
* Returns verdict.
|
||||
*/
|
||||
int process_udp_packet(const uint8_t *pkt, uint32_t pktlen);
|
||||
int process_udp_packet(const struct section_config_t *section, const uint8_t *pkt, uint32_t pktlen);
|
||||
|
||||
|
||||
|
||||
@@ -41,7 +43,7 @@ int post_fake_sni(struct fake_type f_type,
|
||||
* Poses are relative to start of TCP payload.
|
||||
* dvs used internally and should be zero.
|
||||
*/
|
||||
int send_tcp_frags(
|
||||
int send_tcp_frags(const struct section_config_t *section,
|
||||
const uint8_t *packet, uint32_t pktlen,
|
||||
const uint32_t *poses, uint32_t poses_len, uint32_t dvs);
|
||||
|
||||
@@ -50,7 +52,7 @@ int send_tcp_frags(
|
||||
* Poses are relative to start of TCP payload.
|
||||
* dvs used internally and should be zero.
|
||||
*/
|
||||
int send_ip4_frags(
|
||||
int send_ip4_frags(const struct section_config_t *section,
|
||||
const uint8_t *packet, uint32_t pktlen,
|
||||
const uint32_t *poses, uint32_t poses_len, uint32_t dvs);
|
||||
#endif /* YU_MANGLE_H */
|
||||
|
||||
Reference in New Issue
Block a user