Compare commits

...

3 Commits

Author SHA1 Message Date
Pratik B.
bf1e4f583a Merge 17399da399 into dcd15cc244 2025-02-27 03:07:54 +01:00
orignal
dcd15cc244 use common constants for babdwidth limits 2025-02-25 14:12:10 -05:00
imdef
17399da399 Added example docker-compose.yml 2024-09-25 16:55:29 +00:00
2 changed files with 19 additions and 6 deletions

View File

@@ -0,0 +1,13 @@
services:
i2pd:
container_name: i2pd2
image: purplei2p/i2pd
#optional
entrypoint: ["./entrypoint.sh", "--loglevel error"]
ports:
- 127.0.0.1:7656:7656
- 127.0.0.1:7070:7070
- 127.0.0.1:4444:4444
volumes:
- /path/to/i2pd/data:/home/i2pd/data # make sure data directory and it's contents are owned by 100:65533
- /path/to/i2pd/i2pd_certificates:/i2pd_certificates # make sure i2pd_certificates is owned by root:root and 755 permissions on the directory

View File

@@ -675,12 +675,12 @@ namespace i2p
void RouterContext::SetBandwidth (int limit)
{
if (limit > 2000) { SetBandwidth('X'); }
else if (limit > 256) { SetBandwidth('P'); }
else if (limit > 128) { SetBandwidth('O'); }
else if (limit > 64) { SetBandwidth('N'); }
else if (limit > 48) { SetBandwidth('M'); }
else if (limit > 12) { SetBandwidth('L'); }
if (limit > (int)i2p::data::EXTRA_BANDWIDTH_LIMIT) { SetBandwidth('X'); }
else if (limit > (int)i2p::data::HIGH_BANDWIDTH_LIMIT) { SetBandwidth('P'); }
else if (limit > 128) { SetBandwidth('O'); }
else if (limit > 64) { SetBandwidth('N'); }
else if (limit > (int)i2p::data::LOW_BANDWIDTH_LIMIT) { SetBandwidth('M'); }
else if (limit > 12) { SetBandwidth('L'); }
else { SetBandwidth('K'); }
m_BandwidthLimit = limit; // set precise limit
}