2019-02-11 15:23:20 +00:00
|
|
|
#pragma once
|
2019-02-11 09:23:38 +00:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
2019-02-11 15:23:20 +00:00
|
|
|
#include <sys/epoll.h>
|
|
|
|
#include <errno.h>
|
2019-02-15 17:09:51 +00:00
|
|
|
#include <gmodule.h>
|
2019-02-11 09:23:38 +00:00
|
|
|
#include "socks5.h"
|
|
|
|
#include "tor_os.h"
|
|
|
|
#include "tor_ctl.h"
|
2019-02-11 21:40:00 +00:00
|
|
|
#include "evt_core.h"
|
2019-02-19 18:15:37 +00:00
|
|
|
#include "donar_init.h"
|
2019-04-24 14:23:41 +00:00
|
|
|
#include "proxy.h"
|
2020-01-20 22:35:02 +00:00
|
|
|
#include "timer.h"
|
2019-02-11 21:40:00 +00:00
|
|
|
|
2019-09-17 13:12:37 +00:00
|
|
|
#define PORT_SIZE 64
|
2019-02-11 09:23:38 +00:00
|
|
|
|
2019-02-11 15:23:20 +00:00
|
|
|
struct donar_server_ctx {
|
|
|
|
struct tor_os_str tos;
|
|
|
|
struct tor_ctl tctl;
|
2019-02-11 21:40:00 +00:00
|
|
|
struct evt_core_ctx evts;
|
2019-02-11 15:23:20 +00:00
|
|
|
uint16_t ports[PORT_SIZE];
|
|
|
|
};
|
|
|
|
|
2019-03-28 10:47:14 +00:00
|
|
|
void donar_server(struct donar_server_ctx* ctx, struct donar_params* dp);
|