mirror of https://github.com/dnomd343/ClearDNS
dnomd343
2 years ago
8 changed files with 38 additions and 5 deletions
@ -0,0 +1,16 @@ |
|||
#ifndef _ADGUARD_H_ |
|||
#define _ADGUARD_H_ |
|||
|
|||
#include "common.h" |
|||
#include "process.h" |
|||
|
|||
typedef struct { |
|||
uint8_t debug; // bool value
|
|||
uint16_t dns_port; |
|||
uint16_t web_port; |
|||
char *upstream; |
|||
char *username; |
|||
char *password; |
|||
} adguard; |
|||
|
|||
#endif |
@ -1,8 +1,8 @@ |
|||
#ifndef _DNSPROXY_H_ |
|||
#define _DNSPROXY_H_ |
|||
|
|||
#include "process.h" |
|||
#include "common.h" |
|||
#include "process.h" |
|||
|
|||
typedef struct { |
|||
uint16_t port; |
@ -1,8 +1,8 @@ |
|||
#ifndef _OVERTURE_H_ |
|||
#define _OVERTURE_H_ |
|||
|
|||
#include "process.h" |
|||
#include "common.h" |
|||
#include "process.h" |
|||
|
|||
typedef struct { |
|||
uint16_t port; |
@ -0,0 +1,3 @@ |
|||
cmake_minimum_required(VERSION 2.8.12) |
|||
|
|||
add_library(applet adguard.c dnsproxy.c overture.c) |
@ -0,0 +1,12 @@ |
|||
#include "adguard.h" |
|||
|
|||
adguard* adguard_init() { |
|||
adguard *info = (adguard *)malloc(sizeof(adguard)); |
|||
info->debug = FALSE; |
|||
info->dns_port = DNS_PORT; |
|||
info->web_port = ADGUARD_PORT; |
|||
info->upstream = string_join("127.0.0.1:", "5353"); // TODO: use DIVERTER_PORT
|
|||
info->username = string_init(ADGUARD_USER); |
|||
info->password = string_init(ADGUARD_PASSWD); |
|||
return info; |
|||
} |
Loading…
Reference in new issue