1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2025-07-20 06:30:42 +03:00

Cedar: handle SSTP through Proto

This commit is contained in:
Davide Beatrici
2020-07-17 02:00:30 +02:00
parent d917b2ac73
commit 869496be3e
4 changed files with 184 additions and 260 deletions

View File

@ -61,6 +61,7 @@
#define SSTP_SERVER_STATUS_REQUEST_PENGING 0 // Connection incomplete
#define SSTP_SERVER_STATUS_CONNECTED_PENDING 1 // Connection completed. Authentication incomplete
#define SSTP_SERVER_STATUS_ESTABLISHED 2 // Connection completed. Communication available
#define SSTP_SERVER_STATUS_NOT_INITIALIZED INFINITE // Connection not accepted yet.
// Length of Nonce
#define SSTP_NONCE_SIZE 32 // 256 bits
@ -121,12 +122,13 @@ struct SSTP_SERVER
//// Function prototype
bool AcceptSstp(CONNECTION *c);
bool ProcessSstpHttps(CEDAR *cedar, SOCK *s, SOCK_EVENT *se);
PROTO_IMPL *SstpGetProtoImpl();
bool SstpInit(void **param, struct CEDAR *cedar, INTERRUPT_MANAGER *im, SOCK_EVENT *se, const char *cipher, const char *hostname);
void SstpFree(void *param);
char *SstpName();
bool SstpProcessData(void *param, TCP_RAW_DATA *in, FIFO *out);
SSTP_SERVER *NewSstpServer(CEDAR *cedar, IP *client_ip, UINT client_port, IP *server_ip,
UINT server_port, SOCK_EVENT *se,
char *client_host_name, char *crypt_name);
SSTP_SERVER *NewSstpServer(CEDAR *cedar, INTERRUPT_MANAGER *im, SOCK_EVENT *se, const char *cipher, const char *hostname);
void FreeSstpServer(SSTP_SERVER *s);
void SstpProcessInterrupt(SSTP_SERVER *s);
SSTP_PACKET *SstpParsePacket(UCHAR *data, UINT size);