This repository has been archived by the owner on Jan 19, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Interface.h
69 lines (58 loc) · 2.13 KB
/
Interface.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#pragma once
#include <pthread.h>
#include <event2/bufferevent.h>
#include "IPv6Map.h"
#define HTTP_AUTHORIZATION_REALM "Live Proxies interface - private access"
#define SIZE_RND_VERIFY 64
#define AUTH_COOKIE "LPAuth"
typedef enum _INTERFACE_PAGES {
INTERFACE_PAGE_HOME = 0,
INTERFACE_PAGE_UPROXIES = 1,
INTERFACE_PAGE_PROXIES = 2,
INTERFACE_PAGE_PRXSRC = 3,
INTERFACE_PAGE_STATS = 4,
INTERFACE_PAGE_RECHECK = 5,
INTERFACE_PAGE_TOOLS = 6,
INTERFACE_PAGE_CPAGE_RAW = 7
} INTERFACE_PAGES;
typedef struct _INTERFACE_PAGE {
INTERFACE_PAGES page;
char *name;
} INTERFACE_PAGE;
INTERFACE_PAGE *InterfacePages;
size_t InterfacePagesSize;
typedef struct _INTERFACE_INFO {
char *user;
INTERFACE_PAGE *currentPage;
} INTERFACE_INFO;
typedef struct _AUTH_WEB {
char *username;
uint8_t *rndVerify;
uint64_t expiry;
IPv6Map *ip;
} AUTH_WEB;
typedef struct _AUTH_LOCAL {
const char *username;
const char *password;
} AUTH_LOCAL;
pthread_mutex_t AuthWebLock;
AUTH_WEB **AuthWebList;
size_t AuthWebCount;
pthread_mutex_t AuthLocalLock;
AUTH_LOCAL **AuthLocalList;
size_t AuthLocalCount;
void InterfaceInit();
void InterfaceProxies (struct bufferevent *BuffEvent, char *Buff);
void InterfaceUncheckedProxies (struct bufferevent *BuffEvent, char *Buff);
void InterfaceProxyRecheck (struct bufferevent *BuffEvent, char *Buff);
void InterfaceHome (struct bufferevent *BuffEvent, char *Buff);
void InterfaceProxySources (struct bufferevent *BuffEvent, char *Buff);
void InterfaceStats (struct bufferevent *BuffEvent, char *Buff);
void InterfaceRawSpamhausZen (struct bufferevent *BuffEvent, char *Buff);
void InterfaceRawReverseDNS (struct bufferevent *BuffEvent, char *Buff);
void InterfaceRawRecheck (struct bufferevent *BuffEvent, char *Buff);
void InterfaceRawHttpBL (struct bufferevent *BuffEvent, char *Buff);
void InterfaceRawUProxyAdd (struct bufferevent *BuffEvent, char *Buff);
void InterfaceTools (struct bufferevent *BuffEvent, char *Buff);
void InterfaceRawUProxyAddProcessPost (struct bufferevent *BuffEvent, char *Buff);
void InterfaceRawGetCustomPage (struct bufferevent *BuffEvent, char *Buff, bool Render);