HttpDNS/httpdns.h
2021-06-12 09:50:56 +08:00

27 lines
890 B
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifndef HTTPDNS_H
#define HTTPDNS_H
#include "main.h"
#define HTTPDNS_REQUEST "GET /d?dn=[D] HTTP/1.0\r\nHost: [H]\r\n\r\n"
struct httpdns {
struct sockaddr_in dst;
char *http_req, *original_http_req, *connect_request, *original_connect_request, *cachePath, *ssl_request; //original_http_req, original_connect_request为初始化生成的请求头用来配合use_hdr语法
int http_req_len, original_http_req_len, connect_request_len, original_connect_request_len, cacheLimit, ssl_request_len;
unsigned encodeCode, //Host编码传输
httpsProxy_encodeCode, //CONNECT代理编码
tcpDNS_mode:1; //判断是否开启TCPDNS
};
extern void dns_timeout_check();
extern void *dns_loop(void *nullPtr);
extern int8_t read_cache_file();
extern void dns_init();
extern struct httpdns httpdns;
extern pid_t child_pid;
extern FILE *cfp;
#endif