CProxy/http_proxy.h

31 lines
600 B
C
Raw Normal View History

#ifndef HTTP_PROXY_H
#define HTTP_PROXY_H
2020-01-21 19:48:05 +08:00
#include "conf.h"
2020-07-30 18:10:31 +08:00
#include "main.h"
2020-01-21 19:48:05 +08:00
#define HTTP_TYPE 0
#define OTHER_TYPE 1
int remote_port;
char remote_host[128];
extern int sslEncodeCode;
2020-01-21 19:48:05 +08:00
typedef struct conn_t {
int fd;
char *header_buffer;
int header_buffer_len, sent_len, timer;
unsigned request_type :1;
2020-01-21 19:48:05 +08:00
} conn;
extern conn cts[MAX_CONNECTION];
2020-06-08 20:28:15 +08:00
extern void tcp_in(conn * in, conf * configure);
extern void tcp_out(conn * out);
extern void close_connection(conn * conn);
2020-01-21 19:48:05 +08:00
2020-06-08 20:28:15 +08:00
extern char *request_head(conn * in, conf * configure);
2020-06-20 16:59:51 +08:00
void dataEncode(char *data, int data_len);
2020-01-21 19:48:05 +08:00
#endif