fix: #182 First command using HTTP protocol

This commit is contained in:
yuanyuanxiang
2025-08-10 17:15:32 +08:00
parent 493a476227
commit 303b5ef824
28 changed files with 154 additions and 152 deletions

View File

@@ -18,7 +18,8 @@ CProxyManager::CProxyManager(ISocketBase* pClient, int n, void* user) : CManager
m_nSend = 0;
Threads = 0;
BYTE cmd = COMMAND_PROXY;
Send(&cmd, 1);
HttpMask mask(DEFAULT_HOST, m_ClientObject->GetClientIPHeader());
pClient->Send2Server((char*)&cmd, 1, &mask);
Mprintf("CProxyManager create: %p\n", this);
}
@@ -43,13 +44,6 @@ CProxyManager::~CProxyManager()
Mprintf("CProxyManager destroy: %p\n", this);
}
int CProxyManager::Send(LPBYTE lpData, UINT nSize)
{
if (!m_bUse) return 0;
int ret = CManager::Send(lpData, nSize);
return ret;
}
void CProxyManager::SendConnectResult(LPBYTE lpBuffer, DWORD ip, USHORT port)
{
lpBuffer[0] = TOKEN_PROXY_CONNECT_RESULT;