mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
common code for SOCKS5 proxy connectivity
This commit is contained in:
parent
4cb2ad48be
commit
158160f5c0
5 changed files with 170 additions and 118 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2013-2023, The PurpleI2P Project
|
||||
* Copyright (c) 2013-2024, The PurpleI2P Project
|
||||
*
|
||||
* This file is part of Purple i2pd project and licensed under BSD3
|
||||
*
|
||||
|
@ -187,15 +187,6 @@ namespace transport
|
|||
uint64_t m_LastActivityTimestamp, m_LastBandwidthUpdateTimestamp;
|
||||
uint32_t m_InBandwidth, m_OutBandwidth;
|
||||
};
|
||||
|
||||
// SOCKS5 proxy
|
||||
const uint8_t SOCKS5_VER = 0x05;
|
||||
const uint8_t SOCKS5_CMD_CONNECT = 0x01;
|
||||
const uint8_t SOCKS5_CMD_UDP_ASSOCIATE = 0x03;
|
||||
const uint8_t SOCKS5_ATYP_IPV4 = 0x01;
|
||||
const uint8_t SOCKS5_ATYP_IPV6 = 0x04;
|
||||
const size_t SOCKS5_UDP_IPV4_REQUEST_HEADER_SIZE = 10;
|
||||
const size_t SOCKS5_UDP_IPV6_REQUEST_HEADER_SIZE = 22;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue