mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-11-14 05:20:10 +00:00
assign next available UDP port to UDP associate
This commit is contained in:
parent
aafaebc560
commit
e73f738bfa
2 changed files with 28 additions and 6 deletions
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2013-2023, The PurpleI2P Project
|
||||
* Copyright (c) 2013-2025, The PurpleI2P Project
|
||||
*
|
||||
* This file is part of Purple i2pd project and licensed under BSD3
|
||||
*
|
||||
|
|
@ -28,7 +28,9 @@ namespace proxy
|
|||
~SOCKSServer() {};
|
||||
|
||||
void SetUpstreamProxy(const std::string & addr, const uint16_t port);
|
||||
|
||||
boost::asio::ip::udp::endpoint GetNextLocalUDPEndpoint ();
|
||||
void ReleaseLocalUDPPort (uint16_t port);
|
||||
|
||||
protected:
|
||||
|
||||
// Implements TCPIPAcceptor
|
||||
|
|
@ -41,6 +43,7 @@ namespace proxy
|
|||
std::string m_UpstreamProxyAddress;
|
||||
uint16_t m_UpstreamProxyPort;
|
||||
bool m_UseUpstreamProxy;
|
||||
std::set<uint16_t> m_UDPPorts;
|
||||
};
|
||||
|
||||
typedef SOCKSServer SOCKSProxy;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue