mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
start/stop accepting transit tunnels
This commit is contained in:
parent
ba96288438
commit
6fd5db250b
5 changed files with 33 additions and 5 deletions
|
@ -297,7 +297,7 @@ namespace i2p
|
|||
i2p::tunnel::tunnels.AddTransitTunnel (transitTunnel);
|
||||
// replace record to reply
|
||||
I2NPBuildResponseRecord * reply = (I2NPBuildResponseRecord *)(records + i);
|
||||
reply->ret = 0;
|
||||
reply->ret = i2p::context.AcceptsTunnels () ? 0 : 30; // always reject with bandwidth reason (30)
|
||||
//TODO: fill filler
|
||||
CryptoPP::SHA256().CalculateDigest(reply->hash, reply->padding, sizeof (reply->padding) + 1); // + 1 byte of ret
|
||||
// encrypt reply
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue