2024-07-03 16:16:24 +02:00
|
|
|
#include <errno.h>
|
|
|
|
#include <string.h>
|
|
|
|
|
|
|
|
#include "intermediary.h"
|
|
|
|
#include "proxy.h"
|
|
|
|
#include "util.h"
|
|
|
|
|
|
|
|
|
|
|
|
int main(int argc, char** argv) {
|
|
|
|
if(argc < 1)
|
|
|
|
syntax_exit();
|
2024-07-04 21:05:55 +02:00
|
|
|
set_bin_name(argv[0]);
|
2024-07-03 16:16:24 +02:00
|
|
|
if(argc < 2)
|
|
|
|
syntax_exit();
|
|
|
|
|
|
|
|
char* command = argv[1];
|
|
|
|
|
|
|
|
if(strcmp(command, "intermediary")==0)
|
|
|
|
handle_intermediary(argc-2, argv+2);
|
|
|
|
else if (strcmp(command, "proxy")==0)
|
|
|
|
handle_proxy(argc-2, argv+2);
|
|
|
|
else
|
|
|
|
syntax_exit();
|
|
|
|
}
|