mirror of https://github.com/dnomd343/ClearDNS
dnomd343
3 years ago
3 changed files with 89 additions and 27 deletions
@ -0,0 +1,11 @@ |
|||||
|
#ifndef _COMMON_H_ |
||||
|
#define _COMMON_H_ |
||||
|
|
||||
|
extern char **adguard_command; |
||||
|
extern char **overture_command; |
||||
|
extern char **domestic_dnsproxy_command; |
||||
|
extern char **foreign_dnsproxy_command; |
||||
|
|
||||
|
void load_start_command(char *adguard_workdir, char *overture_config, char *upstream_config, int is_debug); |
||||
|
|
||||
|
#endif |
@ -0,0 +1,37 @@ |
|||||
|
#include <stdio.h> |
||||
|
#include "common.h" |
||||
|
|
||||
|
void show_command(char **command) { |
||||
|
int num = 0; |
||||
|
while(command[num] != NULL) { |
||||
|
printf("%s\n", command[num++]); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
int main(int argc, char *argv[]) { |
||||
|
char *adguard_workdir = "/etc/cleardns/AdGuardHome"; |
||||
|
char *overture_config = "/etc/overture/config.yml"; |
||||
|
char *upstream_config = "/etc/cleardns/upstream.json"; |
||||
|
|
||||
|
load_start_command(adguard_workdir, overture_config, upstream_config, 0); |
||||
|
|
||||
|
printf("[AdGuardHome]\n"); |
||||
|
show_command(adguard_command); |
||||
|
printf("\n"); |
||||
|
|
||||
|
printf("[overture]\n"); |
||||
|
show_command(overture_command); |
||||
|
printf("\n"); |
||||
|
|
||||
|
printf("[domestic dnsproxy]\n"); |
||||
|
show_command(domestic_dnsproxy_command); |
||||
|
printf("\n"); |
||||
|
|
||||
|
printf("[foreign dnsproxy]\n"); |
||||
|
show_command(foreign_dnsproxy_command); |
||||
|
printf("\n"); |
||||
|
|
||||
|
printf("done.\n"); |
||||
|
return 0; |
||||
|
} |
||||
|
|
Loading…
Reference in new issue