-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrequest.h
More file actions
38 lines (29 loc) · 844 Bytes
/
request.h
File metadata and controls
38 lines (29 loc) · 844 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#ifndef __CPROXY_REQUEST_H
#define __CPROXY_REQUEST_H
#define CPROXY_REQ_HTTP 0x1
#define CPROXY_REQ_SOCKS5 0x2
#define CPROXY_ADDR_IPV4 (0x1 << 4)
#define CPROXY_ADDR_IPV6 (0x1 << 5)
#define CPROXY_ADDR_DOMAIN (0x1 << 6)
#define CPROXY_TCP_SOCK (0x1 << 8)
#define CPROXY_UDP_SOCK (0x1 << 9)
#define CPROXY_HTTP_TUNNEL (0x1 << 12)
#define CPROXY_SOCKS5_TUNNEL (0x1 << 13)
#define CPROXY_ACTIVE_TUNNEL (0x1 << 14)
#define CPROXY_SOCKS5_INITIAL_AUTH (0x1 << 16)
#define CPROXY_SOCKS5_TARGET_CONN (0x1 << 17)
#define CPROXY_ALLOCATED_BUFFER (0x1 << 18)
#define REQUEST_BUFFER_SIZE (8 * 1024)
typedef struct {
char host[263];
uint16_t host_len;
union {
uint32_t ipv4_addr;
uint8_t ipv6_addr[16];
};
uint16_t port;
uint32_t flags;
char* buffer;
uint32_t buffer_len;
} cproxy_request_t;
#endif