Implement SOCKS proxy feature

This commit is contained in:
yuanyuanxiang
2025-05-03 20:57:22 +08:00
parent 7e83dbd431
commit a98a612226
50 changed files with 15801 additions and 115 deletions

View File

@@ -63,6 +63,7 @@
#include <time.h>
#include <stdio.h>
#include <stdlib.h>
// <20><><EFBFBD>ܼ<EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E3BAAF><EFBFBD>ĺ<EFBFBD>ʱ
class auto_tick
@@ -100,6 +101,10 @@ public:
#define SAFE_DELETE_ARRAY(p) if(NULL !=(p)){ delete[] (p);(p) = NULL;}
#endif
#ifndef SAFE_DELETE_AR
#define SAFE_DELETE_AR(p) if(NULL !=(p)){ delete[] (p);(p) = NULL;}
#endif
class CLock
{
private:
@@ -124,3 +129,18 @@ public:
EnterCriticalSection(&m_cs);
}
};
class CAutoLock
{
private:
CRITICAL_SECTION &m_cs;
public:
CAutoLock(CRITICAL_SECTION& cs) : m_cs(cs)
{
EnterCriticalSection(&m_cs);
}
~CAutoLock()
{
LeaveCriticalSection(&m_cs);
}
};