pull/32/head
Apex Liu 2017-04-06 18:46:58 +08:00
parent 60432f04ae
commit 669fc79eae
12 changed files with 2120 additions and 1392 deletions

2
.gitignore vendored
View File

@ -44,6 +44,7 @@ __pycache__
/external/libssh-win-static/lib
/external/mbedtls
/external/sqlite
/external/libuv
/client/tools/putty
/client/tools/winscp
@ -69,3 +70,4 @@ __pycache__
# for not finished code
/common/libex/test
/client/tp_rdp
/server/tp_core/protocol/rdp

View File

@ -110,6 +110,29 @@
# endif
#endif
/* check endian */
#if !(defined(L_ENDIAN) || defined(B_ENDIAN))
# if !defined(__BYTE_ORDER) && defined(__linux__)
# include <endian.h>
# endif
# if defined(BYTE_ORDER)
# if BYTE_ORDER == BIG_ENDIAN
# define B_ENDIAN
# else
# define L_ENDIAN
# endif
# endif
# if !(defined(L_ENDIAN) || defined(B_ENDIAN))
# if defined(__sparc__) || defined(__PPC__) || defined(__ppc__) || defined(__hppa__)
# define B_ENDIAN
# else
# define L_ENDIAN
# endif
# endif
#endif
#ifdef EX_OS_WIN32
# pragma comment(lib, "shlwapi.lib")
#endif

View File

@ -61,6 +61,7 @@ typedef std::wstring ex_wstr;
typedef std::vector<ex_astr> ex_astrs;
typedef std::vector<ex_wstr> ex_wstrs;
typedef std::vector<ex_utf16> ex_str_utf16le;
bool ex_wstr2astr(const ex_wstr& in_str, ex_astr& out_str, int code_page = EX_CODEPAGE_DEFAULT);
bool ex_wstr2astr(const wchar_t* in_str, ex_astr& out_str, int code_page = EX_CODEPAGE_DEFAULT);
@ -76,6 +77,8 @@ void ex_remove_white_space(ex_wstr& str_fix, int ulFlag = EX_RSC_ALL);
ex_astr& ex_replace_all(ex_astr& str, const ex_astr& old_value, const ex_astr& new_value);
ex_wstr& ex_replace_all(ex_wstr& str, const ex_wstr& old_value, const ex_wstr& new_value);
// 将UTF8字符串转换为UTF16-LE字符串输出结果包含\0结束符
bool ex_utf8_to_utf16_le(const std::string& from, ex_str_utf16le& to);
#endif

View File

@ -21,6 +21,7 @@ void ex_free(void* buffer);
// 在haystack长度为haystacklen字节中查找needle长度为needlelen的起始地址返回NULL表示没有找到
const ex_u8* ex_memmem(const ex_u8* haystack, size_t haystacklen, const ex_u8* needle, size_t needlelen);
void ex_mem_reverse(ex_u8* p, size_t l);
void ex_printf(const char* fmt, ...);
void ex_wprintf(const wchar_t* fmt, ...);

View File

@ -377,4 +377,479 @@ ex_wstr& ex_replace_all(ex_wstr& str, const ex_wstr& old_value, const ex_wstr& n
return str;
}
#ifndef EX_OS_WIN32
// #define BYTE ts_u8
// #define DWORD ts_u32
// #define WCHAR ts_u16
#define LPWSTR WCHAR*
#define BOOL int
#define TRUE 1
#define FALSE 0
#define UINT unsigned int
#define LPCSTR const char*
#define CP_UTF8 1
typedef enum
{
conversionOK, /* conversion successful */
sourceExhausted, /* partial character in source, but hit end */
targetExhausted, /* insuff. room in target for conversion */
sourceIllegal /* source sequence is illegal/malformed */
} ConversionResult;
typedef enum
{
strictConversion = 0,
lenientConversion
} ConversionFlags;
static const char trailingBytesForUTF8[256] =
{
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, 3,3,3,3,3,3,3,3,4,4,4,4,5,5,5,5
};
static const DWORD offsetsFromUTF8[6] = { 0x00000000UL, 0x00003080UL, 0x000E2080UL, 0x03C82080UL, 0xFA082080UL, 0x82082080UL
};
static const BYTE firstByteMark[7] = { 0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC };
static const int halfShift = 10; /* used for shifting by 10 bits */
static const DWORD halfBase = 0x0010000UL;
static const DWORD halfMask = 0x3FFUL;
#define UNI_SUR_HIGH_START (DWORD)0xD800
#define UNI_SUR_HIGH_END (DWORD)0xDBFF
#define UNI_SUR_LOW_START (DWORD)0xDC00
#define UNI_SUR_LOW_END (DWORD)0xDFFF
#define UNI_REPLACEMENT_CHAR (DWORD)0x0000FFFD
#define UNI_MAX_BMP (DWORD)0x0000FFFF
#define UNI_MAX_UTF16 (DWORD)0x0010FFFF
#define UNI_MAX_UTF32 (DWORD)0x7FFFFFFF
#define UNI_MAX_LEGAL_UTF32 (DWORD)0x0010FFFF
static ConversionResult ConvertUTF16toUTF8(const WCHAR** sourceStart, const WCHAR* sourceEnd, BYTE** targetStart, BYTE* targetEnd, ConversionFlags flags)
{
BYTE* target;
const WCHAR* source;
BOOL computeLength;
ConversionResult result;
computeLength = (!targetEnd) ? TRUE : FALSE;
source = *sourceStart;
target = *targetStart;
result = conversionOK;
while (source < sourceEnd)
{
DWORD ch;
unsigned short bytesToWrite = 0;
const DWORD byteMask = 0xBF;
const DWORD byteMark = 0x80;
const WCHAR* oldSource = source; /* In case we have to back up because of target overflow. */
ch = *source++;
/* If we have a surrogate pair, convert to UTF32 first. */
if (ch >= UNI_SUR_HIGH_START && ch <= UNI_SUR_HIGH_END)
{
/* If the 16 bits following the high surrogate are in the source buffer... */
if (source < sourceEnd)
{
DWORD ch2 = *source;
/* If it's a low surrogate, convert to UTF32. */
if (ch2 >= UNI_SUR_LOW_START && ch2 <= UNI_SUR_LOW_END)
{
ch = ((ch - UNI_SUR_HIGH_START) << halfShift)
+ (ch2 - UNI_SUR_LOW_START) + halfBase;
++source;
}
else if (flags == strictConversion)
{
/* it's an unpaired high surrogate */
--source; /* return to the illegal value itself */
result = sourceIllegal;
break;
}
}
else
{
/* We don't have the 16 bits following the high surrogate. */
--source; /* return to the high surrogate */
result = sourceExhausted;
break;
}
}
else if (flags == strictConversion)
{
/* UTF-16 surrogate values are illegal in UTF-32 */
if (ch >= UNI_SUR_LOW_START && ch <= UNI_SUR_LOW_END)
{
--source; /* return to the illegal value itself */
result = sourceIllegal;
break;
}
}
/* Figure out how many bytes the result will require */
if (ch < (DWORD)0x80)
{
bytesToWrite = 1;
}
else if (ch < (DWORD)0x800)
{
bytesToWrite = 2;
}
else if (ch < (DWORD)0x10000)
{
bytesToWrite = 3;
}
else if (ch < (DWORD)0x110000)
{
bytesToWrite = 4;
}
else
{
bytesToWrite = 3;
ch = UNI_REPLACEMENT_CHAR;
}
target += bytesToWrite;
if ((target > targetEnd) && (!computeLength))
{
source = oldSource; /* Back up source pointer! */
target -= bytesToWrite;
result = targetExhausted;
break;
}
if (!computeLength)
{
switch (bytesToWrite)
{
/* note: everything falls through. */
case 4:
*--target = (BYTE)((ch | byteMark) & byteMask);
ch >>= 6;
case 3:
*--target = (BYTE)((ch | byteMark) & byteMask);
ch >>= 6;
case 2:
*--target = (BYTE)((ch | byteMark) & byteMask);
ch >>= 6;
case 1:
*--target = (BYTE)(ch | firstByteMark[bytesToWrite]);
}
}
else
{
switch (bytesToWrite)
{
/* note: everything falls through. */
case 4:
--target;
ch >>= 6;
case 3:
--target;
ch >>= 6;
case 2:
--target;
ch >>= 6;
case 1:
--target;
}
}
target += bytesToWrite;
}
*sourceStart = source;
*targetStart = target;
return result;
}
static BOOL isLegalUTF8(const BYTE* source, int length)
{
BYTE a;
const BYTE* srcptr = source + length;
switch (length)
{
default:
return FALSE;
/* Everything else falls through when "TRUE"... */
case 4:
if ((a = (*--srcptr)) < 0x80 || a > 0xBF) return FALSE;
case 3:
if ((a = (*--srcptr)) < 0x80 || a > 0xBF) return FALSE;
case 2:
if ((a = (*--srcptr)) > 0xBF) return FALSE;
switch (*source)
{
/* no fall-through in this inner switch */
case 0xE0:
if (a < 0xA0) return FALSE;
break;
case 0xED:
if (a > 0x9F) return FALSE;
break;
case 0xF0:
if (a < 0x90) return FALSE;
break;
case 0xF4:
if (a > 0x8F) return FALSE;
break;
default:
if (a < 0x80) return FALSE;
}
case 1:
if (*source >= 0x80 && *source < 0xC2) return FALSE;
}
if (*source > 0xF4)
return FALSE;
return TRUE;
}
static ConversionResult _ConvertUTF8toUTF16(const BYTE** sourceStart, const BYTE* sourceEnd, WCHAR** targetStart, WCHAR* targetEnd, ConversionFlags flags)
{
WCHAR* target;
const BYTE* source;
BOOL computeLength;
ConversionResult result;
computeLength = (!targetEnd) ? TRUE : FALSE;
result = conversionOK;
source = *sourceStart;
target = *targetStart;
while (source < sourceEnd)
{
DWORD ch = 0;
unsigned short extraBytesToRead = trailingBytesForUTF8[*source];
if ((source + extraBytesToRead) >= sourceEnd)
{
result = sourceExhausted;
break;
}
/* Do this check whether lenient or strict */
if (!isLegalUTF8(source, extraBytesToRead + 1))
{
result = sourceIllegal;
break;
}
/*
* The cases all fall through. See "Note A" below.
*/
switch (extraBytesToRead)
{
case 5:
ch += *source++;
ch <<= 6; /* remember, illegal UTF-8 */
case 4:
ch += *source++;
ch <<= 6; /* remember, illegal UTF-8 */
case 3:
ch += *source++;
ch <<= 6;
case 2:
ch += *source++;
ch <<= 6;
case 1:
ch += *source++;
ch <<= 6;
case 0:
ch += *source++;
}
ch -= offsetsFromUTF8[extraBytesToRead];
if ((target >= targetEnd) && (!computeLength))
{
source -= (extraBytesToRead + 1); /* Back up source pointer! */
result = targetExhausted;
break;
}
if (ch <= UNI_MAX_BMP)
{
/* Target is a character <= 0xFFFF */
/* UTF-16 surrogate values are illegal in UTF-32 */
if (ch >= UNI_SUR_HIGH_START && ch <= UNI_SUR_LOW_END)
{
if (flags == strictConversion)
{
source -= (extraBytesToRead + 1); /* return to the illegal value itself */
result = sourceIllegal;
break;
}
else
{
if (!computeLength)
*target++ = UNI_REPLACEMENT_CHAR;
else
target++;
}
}
else
{
if (!computeLength)
*target++ = (WCHAR)ch; /* normal case */
else
target++;
}
}
else if (ch > UNI_MAX_UTF16)
{
if (flags == strictConversion)
{
result = sourceIllegal;
source -= (extraBytesToRead + 1); /* return to the start */
break; /* Bail out; shouldn't continue */
}
else
{
if (!computeLength)
*target++ = UNI_REPLACEMENT_CHAR;
else
target++;
}
}
else
{
/* target is a character in range 0xFFFF - 0x10FFFF. */
if ((target + 1 >= targetEnd) && (!computeLength))
{
source -= (extraBytesToRead + 1); /* Back up source pointer! */
result = targetExhausted;
break;
}
ch -= halfBase;
if (!computeLength)
{
*target++ = (WCHAR)((ch >> halfShift) + UNI_SUR_HIGH_START);
*target++ = (WCHAR)((ch & halfMask) + UNI_SUR_LOW_START);
}
else
{
target++;
target++;
}
}
}
*sourceStart = source;
*targetStart = target;
return result;
}
static int MultiByteToWideChar(UINT CodePage, DWORD dwFlags, LPCSTR lpMultiByteStr, int cbMultiByte, LPWSTR lpWideCharStr, int cchWideChar)
{
int length;
LPWSTR targetStart;
const BYTE* sourceStart;
ConversionResult result;
/* If cbMultiByte is 0, the function fails */
if (cbMultiByte == 0)
return 0;
/* If cbMultiByte is -1, the string is null-terminated */
if (cbMultiByte == -1)
cbMultiByte = (int)strlen((char*)lpMultiByteStr) + 1;
/*
* if cchWideChar is 0, the function returns the required buffer size
* in characters for lpWideCharStr and makes no use of the output parameter itself.
*/
if (cchWideChar == 0)
{
sourceStart = (const BYTE*)lpMultiByteStr;
targetStart = (WCHAR*)NULL;
result = _ConvertUTF8toUTF16(&sourceStart, &sourceStart[cbMultiByte],
&targetStart, NULL, strictConversion);
length = (int)(targetStart - ((WCHAR*)NULL));
cchWideChar = length;
}
else
{
sourceStart = (const BYTE*)lpMultiByteStr;
targetStart = lpWideCharStr;
result = _ConvertUTF8toUTF16(&sourceStart, &sourceStart[cbMultiByte],
&targetStart, &targetStart[cchWideChar], strictConversion);
length = (int)(targetStart - ((WCHAR*)lpWideCharStr));
cchWideChar = length;
}
return cchWideChar;
}
#endif
bool utf8_to_utf16_le(const std::string& from, ex_str_utf16le& to)
{
int iSize = MultiByteToWideChar(CP_UTF8, 0, from.c_str(), -1, NULL, 0);
if (iSize <= 0)
return false;
//++iSize;
to.resize(iSize);
memset(&to[0], 0, sizeof(ex_utf16));
MultiByteToWideChar(CP_UTF8, 0, from.c_str(), -1, &to[0], iSize);
return true;
}
#endif

View File

@ -55,6 +55,19 @@ const ex_u8* ex_memmem(const ex_u8* haystack, size_t haystacklen, const ex_u8* n
return(NULL);
}
void ex_mem_reverse(ex_u8* p, size_t l)
{
ex_u8 temp = 0;
size_t i = 0, j = 0;
for (i = 0, j = l - 1; i < j; i++, j--)
{
temp = p[i];
p[i] = p[j];
p[j] = temp;
}
}
void ex_printf(const char* fmt, ...)
{
if (NULL == fmt || 0 == strlen(fmt))

8
external/readme.md vendored
View File

@ -31,5 +31,13 @@ teleport项目用到的第三方库
https://git.libssh.org/projects/libssh.git/snapshot
libssh-0.7.4.zip
Windows平台使用预制的libssh-static工程进行编译。
- libuv
https://github.com/libuv/libuv
v1.11.0.zip
注意teleport项目使用源代码直接编译因此解压缩源代码到此即可。

View File

@ -0,0 +1,219 @@
#include "ts_memstream.h"
MemStream::MemStream(MemBuffer& mbuf) : m_mbuf(mbuf)
{
m_offset = 0;
}
MemStream::~MemStream()
{}
void MemStream::reset(void)
{
m_mbuf.empty();
rewind();
}
bool MemStream::seek(size_t offset)
{
if (offset >= m_mbuf.size())
return false;
m_offset = offset;
return true;
}
bool MemStream::skip(size_t n)
{
if (m_offset + n >= m_mbuf.size())
return false;
m_offset += n;
return true;
}
bool MemStream::rewind(size_t n)
{
if (m_offset < n)
return false;
if (0 == n)
m_offset = 0;
else
m_offset -= n;
return true;
}
ex_u8 MemStream::get_u8(void)
{
ASSERT(m_offset + 1 <= m_mbuf.size());
ex_u8 v = (m_mbuf.data() + m_offset)[0];
m_offset++;
return v;
}
ex_u16 MemStream::get_u16_le(void)
{
ASSERT(m_offset + 2 <= m_mbuf.size());
ex_u8* p = m_mbuf.data() + m_offset;
#if defined(B_ENDIAN)
ex_u16 v = (ex_u16)(p[0] | (p[1] << 8));
#else
ex_u16 v = ((ex_u16*)p)[0];
#endif
m_offset += 2;
return v;
}
ex_u16 MemStream::get_u16_be(void)
{
ASSERT(m_offset + 2 <= m_mbuf.size());
ex_u8* p = m_mbuf.data() + m_offset;
#if defined(B_ENDIAN)
ex_u16 v = ((ex_u16*)p)[0];
#else
ex_u16 v = (ex_u16)((p[0] << 8) | p[1]);
#endif
m_offset += 2;
return v;
}
ex_u32 MemStream::get_u32_le(void)
{
ASSERT(m_offset + 4 <= m_mbuf.size());
ex_u8* p = m_mbuf.data() + m_offset;
#if defined(B_ENDIAN)
ex_u32 v = (ex_u32)(p[0] | (p[1] << 8) | (p[2] << 16) | (p[3] << 24));
#else
ex_u32 v = ((ex_u32*)p)[0];
#endif
m_offset += 4;
return v;
}
ex_u32 MemStream::get_u32_be(void)
{
ASSERT(m_offset + 4 <= m_mbuf.size());
ex_u8* p = m_mbuf.data() + m_offset;
#if defined(B_ENDIAN)
ex_u32 v = ((ex_u32*)p)[0];
#else
ex_u32 v = (ex_u32)((p[0] << 24) | (p[1] << 16) | (p[2] << 8) | p[3]);
#endif
m_offset += 4;
return v;
}
ex_u8* MemStream::get_bin(size_t n)
{
ASSERT(m_offset + 4 <= m_mbuf.size());
ex_u8* p = m_mbuf.data() + m_offset;
m_offset += n;
return p;
}
void MemStream::put_zero(size_t n)
{
m_mbuf.reserve(m_mbuf.size() + n);
memset(m_mbuf.data() + m_offset, 0, n);
m_offset += n;
if (m_mbuf.size() < m_offset)
m_mbuf.size(m_offset);
}
void MemStream::put_u8(ex_u8 v)
{
m_mbuf.reserve(m_mbuf.size() + 1);
(m_mbuf.data() + m_offset)[0] = v;
m_offset++;
if (m_mbuf.size() < m_offset)
m_mbuf.size(m_offset);
}
void MemStream::put_u16_le(ex_u16 v)
{
m_mbuf.reserve(m_mbuf.size() + 2);
ex_u8* p = m_mbuf.data() + m_offset;
#if defined(B_ENDIAN)
p[0] = (ex_u8)v;
p[1] = (ex_u8)(v >> 8);
#else
((ex_u16*)p)[0] = v;
#endif
m_offset += 2;
if (m_mbuf.size() < m_offset)
m_mbuf.size(m_offset);
}
void MemStream::put_u16_be(ex_u16 v)
{
m_mbuf.reserve(m_mbuf.size() + 2);
ex_u8* p = m_mbuf.data() + m_offset;
#if defined(B_ENDIAN)
((ex_u16*)p)[0] = v;
#else
ex_u8* _v = (ex_u8*)&v;
p[0] = _v[1];
p[1] = _v[0];
#endif
m_offset += 2;
if (m_mbuf.size() < m_offset)
m_mbuf.size(m_offset);
}
void MemStream::put_u32_le(ex_u32 v)
{
m_mbuf.reserve(m_mbuf.size() + 4);
ex_u8* p = m_mbuf.data() + m_offset;
#if defined(B_ENDIAN)
p[0] = (ex_u8)v;
p[1] = (ex_u8)(v >> 8);
p[2] = (ex_u8)(v >> 16);
p[3] = (ex_u8)(v >> 24);
#else
((ex_u32*)p)[0] = v;
#endif
m_offset += 4;
if (m_mbuf.size() < m_offset)
m_mbuf.size(m_offset);
}
void MemStream::put_u32_be(ex_u32 v)
{
m_mbuf.reserve(m_mbuf.size() + 4);
ex_u8* p = m_mbuf.data() + m_offset;
#if defined(B_ENDIAN)
((ex_u32*)p)[0] = v;
#else
ex_u8* _v = (ex_u8*)&v;
p[0] = _v[3];
p[1] = _v[2];
p[2] = _v[1];
p[3] = _v[0];
#endif
m_offset += 4;
if (m_mbuf.size() < m_offset)
m_mbuf.size(m_offset);
}
void MemStream::put_bin(const ex_u8* p, size_t n)
{
m_mbuf.reserve(m_mbuf.size() + n);
memcpy(m_mbuf.data() + m_offset, p, n);
m_offset += n;
if (m_mbuf.size() < m_offset)
m_mbuf.size(m_offset);
}

View File

@ -0,0 +1,45 @@
#ifndef __TS_MEMSTREAM_H__
#define __TS_MEMSTREAM_H__
#include "ts_membuf.h"
class MemStream
{
public:
MemStream(MemBuffer& mbuf);
~MemStream();
void reset(void); // 清空缓冲区数据(但不释放内存),指针移动到头部
bool seek(size_t offset); // 移动指针到指定偏移,如果越界,则返回错误
bool rewind(size_t n = 0); // 回退n字节如果越界返回错误如果n为0则回退到最开始处
bool skip(size_t n); // 跳过n字节如果越界则返回错误
ex_u8* ptr(void) { return m_mbuf.data() + m_offset; } // 返回当前数据指针
size_t offset(void) { return m_offset; } // 返回当前指针相对数据起始的偏移
size_t left(void) { return m_mbuf.size() - m_offset; } // 返回剩余数据的大小(从当前数据指针到缓冲区结尾)
ex_u8 get_u8(void);
ex_u16 get_u16_le(void);
ex_u16 get_u16_be(void);
ex_u32 get_u32_le(void);
ex_u32 get_u32_be(void);
ex_u8* get_bin(size_t n); // 返回当前指向的数据的指针内部偏移会向后移动n字节
void put_zero(size_t n); // 填充n字节的0
void put_u8(ex_u8 v);
void put_u16_le(ex_u16 v);
void put_u16_be(ex_u16 v);
void put_u32_le(ex_u32 v);
void put_u32_be(ex_u32 v);
void put_bin(const ex_u8* p, size_t n); // 填充p指向的n字节数据
size_t size(void) { return m_mbuf.size(); }
private:
MemBuffer& m_mbuf;
size_t m_offset;
};
#endif // __TS_MEMSTREAM_H__

View File

@ -39,19 +39,6 @@
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
@ -63,29 +50,17 @@
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
<OutDir>..\..\..\..\out\server\$(PlatformTarget)\$(Configuration)\</OutDir>
<IntDir>..\..\..\..\out\_tmp_\$(ProjectName)\$(PlatformTarget)\$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<OutDir>..\..\..\..\out\server\$(PlatformTarget)\$(Configuration)\</OutDir>
<IntDir>..\..\..\..\out\_tmp_\$(ProjectName)\$(PlatformTarget)\$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>
@ -102,19 +77,6 @@
<AdditionalLibraryDirectories>..\..\..\..\external\libssh-win-static\lib;..\..\..\..\external\openssl\out32;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_DEBUG;_WINDOWS;_USRDLL;TPSSH_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
@ -135,23 +97,6 @@
<AdditionalLibraryDirectories>..\..\..\..\external\libssh-win-static\lib;..\..\..\..\external\openssl\out32;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>NDEBUG;_WINDOWS;_USRDLL;TPSSH_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="..\..\..\..\common\libex\include\ex.h" />
<ClInclude Include="..\..\..\..\common\libex\include\ex\ex_const.h" />
@ -195,15 +140,9 @@
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</CompileAsManaged>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
</PrecompiledHeader>
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</CompileAsManaged>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
</PrecompiledHeader>
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</CompileAsManaged>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
</PrecompiledHeader>
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</CompileAsManaged>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
</PrecompiledHeader>
</ClCompile>
<ClCompile Include="ssh_proxy.cpp" />
<ClCompile Include="ssh_recorder.cpp" />