2023-06-03 22:52:10 +03:00
|
|
|
#include <stdint.h>
|
|
|
|
#include <stdlib.h>
|
2024-02-18 23:36:51 +03:00
|
|
|
#include <sys/types.h>
|
2023-06-03 22:52:10 +03:00
|
|
|
|
|
|
|
#define IS_UNKNOWN 0
|
|
|
|
#define IS_HTTP 1
|
|
|
|
#define IS_HTTPS 2
|
|
|
|
|
|
|
|
#define MH_HMIX 1
|
|
|
|
#define MH_SPACE 2
|
|
|
|
#define MH_DMIX 4
|
|
|
|
|
|
|
|
extern char tls_data[517];
|
|
|
|
extern char http_data[43];
|
|
|
|
|
2024-03-02 19:13:55 +03:00
|
|
|
int change_tls_sni(const char *host, char *buffer, size_t bsize);
|
2023-06-03 22:52:10 +03:00
|
|
|
|
|
|
|
int parse_tls(char *buffer, size_t bsize, char **hs);
|
|
|
|
|
|
|
|
int parse_http(char *buffer, size_t bsize, char **hs, uint16_t *port);
|
|
|
|
|
2023-10-10 21:24:46 +03:00
|
|
|
int mod_http(char *buffer, size_t bsize, int m);
|
2024-02-18 17:19:11 +03:00
|
|
|
|
|
|
|
ssize_t part_tls(char *buffer, size_t bsize, ssize_t n, int pos);
|