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-15 17:09:51 +00:00
|
|
|
#include <gmodule.h>
|
2019-02-12 19:33:12 +00:00
|
|
|
#include "algo_skel.h"
|
|
|
|
#include "tor_os.h"
|
2019-02-12 20:45:15 +00:00
|
|
|
#include "socks5.h"
|
2019-02-19 18:15:37 +00:00
|
|
|
#include "donar_init.h"
|
2019-02-11 09:23:38 +00:00
|
|
|
|
2019-02-12 19:33:12 +00:00
|
|
|
#define CLIENT_PORT_SIZE 10
|
|
|
|
|
|
|
|
struct donar_client_ctx {
|
|
|
|
struct tor_os_str tos;
|
|
|
|
struct evt_core_ctx evts;
|
|
|
|
uint16_t ports[CLIENT_PORT_SIZE];
|
2019-02-15 14:45:56 +00:00
|
|
|
struct {
|
|
|
|
int fd;
|
|
|
|
enum socks5_state state;
|
|
|
|
} client_sock[CLIENT_PORT_SIZE];
|
2019-02-12 19:33:12 +00:00
|
|
|
};
|
|
|
|
|
2019-03-19 16:09:42 +00:00
|
|
|
void donar_client(struct donar_client_ctx* ctx, char* algoname,
|
2019-02-19 18:15:37 +00:00
|
|
|
char* onion_file, GPtrArray* exposed_ports, GPtrArray* remote_ports);
|