SpecialProxy/http.h

27 lines
770 B
C
Raw Normal View History

2017-07-12 12:29:56 +08:00
#ifndef HTTP_H
#define HTTP_H
#include "main.h"
typedef struct tcp_connection {
char *ready_data, *incomplete_data;
2019-01-26 11:53:32 +08:00
int fd, ready_data_len, incomplete_data_len, sent_len, timer;
2017-07-12 12:29:56 +08:00
uint16_t destPort;
2019-03-10 05:23:50 +08:00
unsigned reread_data :1,
request_type :1,
keep_alive :1;
2017-07-12 12:29:56 +08:00
} conn_t;
extern void create_listen(char *ip, int port);
2018-12-21 19:13:07 +08:00
extern void accept_client();
2017-07-12 12:29:56 +08:00
extern void close_connection(conn_t *conn);
2019-01-26 11:53:32 +08:00
extern int8_t connectionToServer(in_addr_t ip, conn_t *server);
extern void tcp_in(conn_t *in);
extern void tcp_out(conn_t *to);
2017-07-12 12:29:56 +08:00
extern conn_t cts[MAX_CONNECTION];
extern char *local_header, *proxy_header, *ssl_proxy;
2019-01-26 11:53:32 +08:00
extern int lisFd, local_header_len, proxy_header_len, ignore_host_before_count;
2018-12-21 19:13:07 +08:00
extern uint8_t strict_spilce, sslEncodeCode;
2017-07-12 12:29:56 +08:00
#endif