/src/freenet/node/Node.java
Java | 5311 lines | 3982 code | 508 blank | 821 comment | 326 complexity | ef64a1efa861fd49520d8b84be251a55 MD5 | raw file
Possible License(s): GPL-2.0
Large files files are truncated, but you can click here to view the full file
- package freenet.node;
- import java.io.DataInputStream;
- import java.io.DataOutputStream;
- import java.io.File;
- import java.io.FileInputStream;
- import java.io.FileOutputStream;
- import java.io.IOException;
- import java.nio.channels.FileLock;
- import java.text.NumberFormat;
- import java.util.Enumeration;
- import freenet.Address;
- import freenet.Authentity;
- import freenet.Core;
- import freenet.CoreException;
- import freenet.DSAAuthentity;
- import freenet.DSAIdentity;
- import freenet.FieldSet;
- import freenet.Identity;
- import freenet.Key;
- import freenet.KeyException;
- import freenet.Message;
- import freenet.MessageSendCallback;
- import freenet.OpenConnectionManager;
- import freenet.Peer;
- import freenet.PeerPacketMessage;
- import freenet.Presentation;
- import freenet.PresentationHandler;
- import freenet.SendFailedException;
- import freenet.SessionHandler;
- import freenet.Ticker;
- import freenet.TrailerWriter;
- import freenet.TransportHandler;
- import freenet.Version;
- import freenet.client.BackgroundInserter;
- import freenet.client.ClientFactory;
- import freenet.client.FECTools;
- import freenet.client.InternalClient;
- import freenet.config.Config;
- import freenet.config.Params;
- import freenet.config.RandomPortOption;
- import freenet.diagnostics.Diagnostics;
- import freenet.fs.dir.Directory;
- import freenet.interfaces.NIOInterface;
- import freenet.node.ds.DataStore;
- import freenet.node.rt.ExtrapolatingTimeDecayingEventCounter;
- import freenet.node.rt.NGRouting;
- import freenet.node.rt.NGRoutingTable;
- import freenet.node.rt.NodeSortingRoutingTable;
- import freenet.node.rt.RTDiagSnapshot;
- import freenet.node.rt.RunningAverage;
- import freenet.node.rt.SimpleBinaryRunningAverage;
- import freenet.node.rt.SimpleIntervalledRunningAverage;
- import freenet.node.rt.SynchronizedRunningAverage;
- import freenet.node.rt.TimeDecayingRunningAverage;
- import freenet.session.LinkManager;
- import freenet.support.Bucket;
- import freenet.support.BucketFactory;
- import freenet.support.Checkpointed;
- import freenet.support.HexUtil;
- import freenet.support.IntervalledSum;
- import freenet.support.LimitCounter;
- import freenet.support.LoadSaveCheckpointed;
- import freenet.support.Logger;
- import freenet.support.io.Bandwidth;
- import freenet.support.io.ReadInputStream;
- import freenet.thread.ThreadFactory;
- import freenet.transport.tcpAddress;
- import freenet.transport.tcpConnection;
- import freenet.transport.tcpListener;
- /*
- * This code is part of the Java Adaptive Network Client by Ian Clarke. It is
- * distributed under the GNU Public Licence (GPL) version 2. See
- * http://www.gnu.org/ for further details of the GPL.
- */
- /**
- * This is a Wrapper object that contains the components of a Node in the
- * Adaptive Network. It uses a Network object to communicate with other Nodes
- * in the Network.
- *
- * @author <A HREF="mailto:I.Clarke@strs.co.uk">Ian Clarke</A>
- * @author <a href="mailto:blanu@uts.cc.utexas.edu">Brandon Wiley</a>
- */
- public class Node extends Core implements ConnectionThrottler{
- /**
- * @author root
- *
- * TODO To change the template for this generated type comment go to
- * Window - Preferences - Java - Code Generation - Code and Comments
- */
- private class RateLimitingWriterCheckpointed extends LoadSaveCheckpointed {
- public RateLimitingWriterCheckpointed(File routingDir) {
- super(routingDir, new String[] { "ratedata_a", "ratedata_b" });
- }
- protected int checkpointPeriod() {
- return 60000;
- }
- public void writeData(DataOutputStream dos) throws IOException {
- receivedRequestCounter.writeDataTo(dos);
- acceptedExternalRequestCounter.writeDataTo(dos);
- globalQuotaAverager.writeDataTo(dos);
- sentRequestCounter.writeDataTo(dos);
- }
- protected void fillInBlanks() {
- if(receivedRequestCounter == null)
- receivedRequestCounter = new ExtrapolatingTimeDecayingEventCounter(rateLimitingInterval, 1000);
- Core.logger.log(this, "receivedRequestCounter = "+receivedRequestCounter, Logger.DEBUG);
- if(acceptedExternalRequestCounter == null)
- acceptedExternalRequestCounter = new ExtrapolatingTimeDecayingEventCounter(rateLimitingInterval, 1000);
- Core.logger.log(this, "acceptedExternalRequestCounter = "+acceptedExternalRequestCounter, Logger.DEBUG);
- if(globalQuotaAverager == null)
- globalQuotaAverager = new TimeDecayingRunningAverage(1000, rateLimitingInterval, 0, Double.MAX_VALUE);
- Core.logger.log(this, "globalQuotaAverager = "+globalQuotaAverager, Logger.DEBUG);
- if(sentRequestCounter == null)
- sentRequestCounter = new ExtrapolatingTimeDecayingEventCounter(rateLimitingInterval/2, 1000);
- Core.logger.log(this, "sentRequestCounter = "+sentRequestCounter, Logger.DEBUG);
- }
- protected void readFrom(DataInputStream dis) throws IOException {
- receivedRequestCounter = new ExtrapolatingTimeDecayingEventCounter(1000, rateLimitingInterval, dis);
- Core.logger.log(this, "Read receivedRequestCounter: "+receivedRequestCounter, Logger.MINOR);
- acceptedExternalRequestCounter = new ExtrapolatingTimeDecayingEventCounter(1000, rateLimitingInterval, dis);
- Core.logger.log(this, "Read acceptedExternalRequestCounter: "+acceptedExternalRequestCounter, Logger.MINOR);
- globalQuotaAverager = new TimeDecayingRunningAverage(1000, rateLimitingInterval, 0, Double.MAX_VALUE, dis);
- Core.logger.log(this, "Read globalQuotaAverager: "+globalQuotaAverager, Logger.MINOR);
- sentRequestCounter = new ExtrapolatingTimeDecayingEventCounter(1000, rateLimitingInterval, dis);
- Core.logger.log(this, "Read sentRequestCounter: "+sentRequestCounter, Logger.MINOR);
- }
- protected void preload() {
- // All will be initted to null
- }
- public String getCheckpointName() {
- return "Rate limiting data save process";
- }
- }
- public static int maxConnDefault = 200;
- public static int maxFileDefault = 256;
- public static boolean isWin95;
- public static boolean isWin9X;
- public static boolean isWinCE;
- public static boolean isOSX;
- public static String sysName = System.getProperty("os.name");
- private static final NumberFormat nfp;
- private static final NumberFormat nf1;
- private static final NumberFormat nf03;
- private static final NumberFormat nf3;
- static float overloadHighDefault = 1.25f;
- private static final String ARG_BOOLEAN = "<true|false>";
- static {
- nfp = NumberFormat.getPercentInstance();
- nfp.setMinimumFractionDigits(0);
- nfp.setMaximumFractionDigits(1);
- nf1 = NumberFormat.getInstance();
- nf1.setMaximumFractionDigits(1);
- nf1.setMinimumFractionDigits(1);
- nf1.setGroupingUsed(false);
- nf03 = NumberFormat.getInstance();
- nf03.setMinimumFractionDigits(0);
- nf03.setMaximumFractionDigits(3);
- nf03.setGroupingUsed(false);
- nf3 = NumberFormat.getInstance();
- nf3.setMaximumFractionDigits(3);
- nf3.setMinimumFractionDigits(3);
- nf3.setGroupingUsed(false);
- // System.err.println("Node.java static initialization start.");
- Config config = getConfig();
- // internal defaults
- config.addOption("rtMaxRefs", 1, 50, 1300); // 50 refs/node
- // rtMaxNodes later down because of OS detection
- config.addOption("maxRoutingSteps", 1, 200, 1303); // to 10 refs
- config.addOption("messageStoreSize", 1, 10000, 1350);
- // 10000 live chains
- config.addOption("failureTableSize", 1, 20000, 1360);
- // 20000 failed keys - uses ~ 2.7MB
- config.addOption("failureTableItems", 1, 100000, 1361);
- config.addOption("failureTableTime", 1, 1800000l, 1362); // 30 min
- config.addOption("newNodePollInterval", 1, 30000, 1363); // 30 seconds
- // ARK stuff
- config.addOption("minCP", 1, 0.01F, 1370);
- config.addOption("failuresLookupARK", 1, 10, 1371);
- config.addOption("minARKDelay", 1, 900 * 1000, 1372);
- config.addOption("maxARKThreadsFraction", 1, 0.1F, 1373);
- // network defaults
- config.addOption("routeConnectTimeout", 1, 10000, 1400); // 10 sec
- config.addOption("maxHopsToLive", 1, 20, 1410);
- config.addOption("probIncHopsSinceReset", 1, 0.95F, 1411);
- config.addOption("cacheProbPerHop", 1, 0.8F, 1412);
- config.addOption("minStoreFullPCache", 1, 0.9F, 1413);
- config.addOption("minRTFullPRef", 1, 0.3F, 1414);
- config.addOption("minRTNodesPRef", 1, 0.8F, 1415);
- config.addOption("maxLog2DataSize", 1, 20, 1416);
- // network resource limiting options
- config.addOption("bandwidthLimit", 1, 0, 1200);
- config.addOption("inputBandwidthLimit", 1, 0, 1201); // disabled
- config.addOption("outputBandwidthLimit", 1, 12 * 1024, 1202);
- // 12kB/sec, so it doesn't ruin 128kbps uplink which is unfortunately
- // way too common
- config.addOption("averageBandwidthLimit", 1, 0, 1203); // disabled
- config.addOption("averageInputBandwidthLimit", 1, 0, 1204); // disabled
- config.addOption("averageOutputBandwidthLimit", 1, 0, 1205);
- // disabled
- sysName = sysName.toLowerCase();
- if (sysName.startsWith("windows")) {
- maxFileDefault = 1024;
- // http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore98/html/_crt__setmaxstdio.asp
- if (sysName.startsWith("windows ce"))
- isWinCE = true;
- else if (sysName.startsWith("windows 95")) {
- isWin95 = true;
- isWin9X = true;
- maxConnDefault = 20;
- } else if (
- sysName.startsWith("windows 98")
- || (sysName.startsWith("windows")
- && (sysName.indexOf("millennium") != -1))
- || (sysName.startsWith("windows me"))) {
- // Detected Windows 9X
- maxConnDefault = 60;
- isWin9X = true;
- } else {
- isWin9X = false;
- }
- }
- if (sysName.startsWith("mac os x")) {
- maxConnDefault = 128;
- maxFileDefault = 64;
- isOSX = true;
- } else
- isOSX = false;
- if (sysName.startsWith("netware")) {
- // supports unlimited FDs
- maxFileDefault = 0;
- }
- config.addOption("rtMaxNodes", 1, 100, 1301);
- config.addOption("doEstimatorSmoothing", 1, true, 1304);
- config.addOption("useFastEstimators", 1, true, 1305);
- config.addOption("maxNodeConnections", 1, maxConnDefault, 1224);
- config.addOption("maxOpenConnectionsNewbieFraction", 1, 0.2, 1225);
- config.addOption("maxNodeFilesOpen", 1, maxFileDefault, 1226);
- config.addOption("maxNegotiations", 1, 50, 1227);
- // I'm deprecating these in favor of
- config.addOption("maxConnectionsPerMinute", 1, 60, 1228);
- config.addOption("maxConnectionsMinute", 1, 60000, 1229);
- // these, and increasing the default quite a bit while at it.
- config.addOption("maxRequestsPerInterval", 1, -1, 1230);
- config.addOption("maxRequestsInterval", 1, 60000, 1231);
- // data store settings
- config.addOption("storeType", 1, "freenet", 999);
- // "freenet" or "native"
- config.addOption("nodeFile", 1, "", 1000); // node_<port>
- config.addOption("storeFile", 1, "", 1001); // store_<port>
- config.addOption("storeSize", 1, 256L*1024L*1024L, 1010, true);
- // 256MB is reasonable, strictish minimum would be 101MB ((1MB chunk +
- // header) * 100)
- config.addOption("storeBlockSize", 1, 4096, 1011);
- config.addOption("storeMaxTempFraction", 1, (1F / 3F), 1012);
- config.addOption("storeCipherName", 1, "Twofish", 1020);
- // Twofish cipher
- config.addOption("storeCipherWidth", 1, 128, 1021); // 128 bits
- config.addOption("routingDir", 1, "", 1022);
- config.addOption("useDSIndex", 1, true, 1023);
- // network settings
- config.addOption("ipAddress", 1, "", 100); // autodetected if not set
- config.addOption(new RandomPortOption("listenPort", 1, 101));
- // random choice
- config.addOption("clientPort", 1, 8481, 110);
- config.addOption("fcpHosts", 1, "", 112); // loopback only
- config.addOption("transient", 1, false, 300);
- config.setDeprecated("transient", true);
- config.addOption("seedFile", 1, "seednodes.ref", 320);
- config.addOption("routingTableImpl", 1, "ng", 330);
- // logging options
- config.addOption("logLevel", 1, "normal", 1250);
- config.addOption("logFile", 1, "freenet.log", 1251);
- config.addOption("logFormat", 1, "d (c, t, p): m", 1252);
- config.addOption("logDate", 1, "", 1253); // locale default
- config.addOption("logLevelDetail", 1, "", 1254);
- config.addOption("logMaxLinesCached", 1, 10000, 1255);
- config.addOption("logMaxBytesCached", 1, 10L*1024L*1024L, 1256);
- config.addOption("logRotate", 1, false, 1257);
- config.addOption("logRotateUseNativeGzip", 1, false, 1258);
- config.addOption("logRotateInterval", 1, "hour", 1259);
- config.addOption("logOverwrite", 1, true, 1260);
- // diagnostics options
- config.addOption("diagnosticsPath", 1, "stats", 501);
- // announcement options
- config.addOption("doAnnounce", 1, true, 310);
- config.addOption("announcementHTL", 1, 15, 1501);
- config.addOption("announcementAttempts", 1, 3, 1502);
- config.addOption("announcementPollInterval", 1, 900 * 1000, 1513);
- // Set to 0 - with bidi, new nodes should announce immediately
- config.addOption("announcementFirstDelay", 1, /*2 * 3600 * 1000*/0, 1514);
- config.addOption("announcementThreads", 1, 3, 1515);
- config.addOption("announcementUseRT", 1, true, 1516);
- config.addOption("initialRequests", 1, 10, 1520);
- config.addOption("initialRequestHTL", 1, 25, 1521);
- // Load balancing
- config.addOption("doLoadBalance", 1, true, 1550);
- // wierd stuff
- config.addOption("localIsOK", 1, false, 1551);
- config.addOption("dontLimitClients", 1, false, 1552);
- config.addOption("limitAll", 1, false, 1553);
- config.addOption("mainportURIOverride", 1, "", 1554);
- config.addOption("distributionURIOverride", 1, "", 1555);
- config.addOption("aggressiveGC", 1, 0, 1556);
- config.addOption("configUpdateInterval", 1, 5, 1557);
- config.addOption("seednodesUpdateInterval", 1, 5, 1558);
- config.addOption("defaultToSimpleUIMode", 1, true, 1559);
- config.addOption("defaultToOCMHTMLPeerHandlerMode", 1, false, 1560);
- config.addOption("ipDetectorInterval", 1, 10, 1561);
- // FCP admin options
- config.addOption("adminPassword", 1, String.class, 200);
- config.addOption("adminPeer", 1, String.class, 201);
- config.addOption("logOutputBytes", 1, true, 3540);
- config.addOption("logInputBytes", 1, true, 3541);
- // Logging, overload, triage
- config.addOption("logInboundContacts", 1, false, 3500);
- config.addOption("logOutboundContacts", 1, false, 3510);
- config.addOption("logInboundRequests", 1, false, 3520);
- config.addOption("logOutboundRequests", 1, false, 3530);
- config.addOption("logInboundInsertRequestDist", 1, false, 3541);
- config.addOption("logSuccessfulInsertRequestDist", 1, false, 3546);
- config.addOption("doRequestTriageByDelay", 1, true, 3250);
- config.addOption("doRequestTriageBySendTime", 1, true, 3251);
- config.addOption("overloadLow", 1, 1.0f, 3252);
- config.addOption("overloadHigh", 1, overloadHighDefault, 3253);
- config.addOption("threadConnectCutoff", 1, 1.5F, 3254);
- config.addOption("requestDelayCutoff", 1, 1000, 3255);
- config.addOption("successfulDelayCutoff", 1, 2000, 3256);
- config.addOption("requestSendTimeCutoff", 1, 500, 3257);
- config.addOption("successfulSendTimeCutoff", 1, 1000, 3258);
- config.addOption("doOutLimitCutoff", 1, false, 3259);
- config.addOption("outLimitCutoff", 1, 0.8F, 3260);
- config.addOption("doOutLimitConnectCutoff", 1, true, 3261);
- config.addOption("outLimitConnectCutoff", 1, 2.0F, 3262);
- config.addOption("lowLevelBWLimitFudgeFactor", 1, 3F / 4F, 3263);
- config.addOption("doReserveOutputBandwidthForSuccess", 1, false, 3264);
- // Give high-level a chance - if low level is too aggressive, high level
- // won't be effective
- config.addOption("lowLevelBWLimitMultiplier", 1, 1.4F, 3265);
- config.addOption("doLowLevelOutputLimiting", 1, true, 3266);
- config.addOption("doLowLevelInputLimiting", 1, true, 3267);
- // Commented out because of limited use and potential political
- // problems i.e. not cross platform
- config.addOption("doCPULoad",1,false,3264);
- config.addOption("sendingQueueLength", 1, 256, 3266);
- config.addOption("sendingQueueBytes", 1, 1492 * 8, 3267);
- config.addOption("requestIntervalDefault", 1, 1000, 3268);
- config.addOption("requestIntervalQRFactor", 1, 1.05, 3269);
- // WatchMe options.
- config.addOption("watchme", 1, false, 3541);
- config.addOption("watchmeRetries", 1, 3, 3542);
- // LoadStats options.
- config.addOption("defaultResetProbability", 1, 0.05, 3557);
- config.addOption("lsMaxTableSize", 1, 100, 3558);
- config.addOption("lsAcceptRatioSamples", 1, 500, 3559);
- config.addOption("lsHalfLifeHours", 1, 1.2, 3560);
- // Forward Error Correction (FEC) options
- config.addOption("FECTempDir", 1, "", 3600);
- config.addOption("FECInstanceCacheSize", 1, 1, 3610);
- config.addOption("FECMaxConcurrentCodecs", 1, 1, 3612);
- // Default FEC encoder and decoder implementations.
- config.addOption("FEC.Encoders.0.class", 1, "OnionFECEncoder", 3620);
- config.addOption("FEC.Decoders.0.class", 1, "OnionFECDecoder", 3630);
- // Default temp dir for FEC and fproxy if theirs aren't specified
- config.addOption("tempDir", 1, "", 3640);
- config.addOption("tempInStore", 1, false, 3641);
- config.addOption("publicNode", 1, false, 3650);
- // Allow HTTP inserts?
- config.addOption("httpInserts", 1, true, 3651);
- // Allow FCP inserts?
- config.addOption("fcpInserts", 1, true, 3652);
- // UI template set
- config.addOption("UITemplateSet", 1, "aqua", 3653);
- // Bundled client stuff
- config.addOption(
- "filterPassThroughMimeTypes",
- 1,
- "text/plain,image/jpeg,image/gif,image/png",
- 4000);
- // Mainport
- config.addOption(
- "mainport.class",
- 1,
- "freenet.interfaces.servlet.MultipleHttpServletContainer",
- 4100);
- config.addOption("mainport.port", 1, 8888, 4101);
- config.addOption("mainport.allowedHosts", 1, "127.0.0.0/8", 4102);
- config.addOption("mainport.bindAddress", 1, "", 4103);
- config.addOption("mainport.params.servlet.1.uri", 1, "/", 4110);
- config.addOption("mainport.params.servlet.1.method", 1, "GET", 4111);
- config.addOption(
- "mainport.params.servlet.1.class",
- 1,
- "freenet.client.http.FproxyServlet",
- 4112);
- config.addOption(
- "mainport.params.servlet.1.name",
- 1,
- "Freenet HTTP proxy (fproxy)",
- 4113);
- config.addOption(
- "mainport.params.servlet.1.params.requestHtl",
- 1,
- 15,
- 4114);
- config.addOption(
- "mainport.params.servlet.1.params.passThroughMimeTypes",
- 1,
- "",
- 4115);
- config.addOption(
- "mainport.params.servlet.1.params.filter",
- 1,
- true,
- 4116);
- config.addOption(
- "mainport.params.servlet.1.params.filterParanoidStringCheck",
- 1,
- false,
- 4117);
- config.addOption(
- "mainport.params.servlet.1.params.maxForceKeys",
- 1,
- 100,
- 4118);
- config.addOption(
- "mainport.params.servlet.1.params.doSendRobots",
- 1,
- true,
- 4119);
- config.addOption(
- "mainport.params.servlet.1.params.noCache",
- 1,
- false,
- 4119);
- config.addOption(
- "mainport.params.servlet.1.params.dontWarnOperaUsers",
- 1,
- false,
- 4119);
- config.addOption(
- "mainport.params.servlet.2.uri",
- 1,
- "/servlet/nodeinfo/",
- 4120);
- config.addOption("mainport.params.servlet.2.method", 1, "GET", 4121);
- config.addOption(
- "mainport.params.servlet.2.class",
- 1,
- "freenet.node.http.NodeInfoServlet",
- 4122);
- config.addOption(
- "mainport.params.servlet.2.name",
- 1,
- "Web Interface",
- 4123);
- // default bookmarks. Bookmarks start at 6000 so they come last in the config file
- config.addOption("mainport.params.servlet.2.bookmarks.count", 1, -1, 6000);
- config.addOption("mainport.params.servlet.2.bookmarks.0.key", 1, "SSK@qe3ZRJg1Nv1XErADrz7ZYjhDidUPAgM/nubile/11//", 6100);
- config.addOption("mainport.params.servlet.2.bookmarks.0.title", 1, "Nubile", 6101);
- config.addOption("mainport.params.servlet.2.bookmarks.0.activelinkFile", 1, "nubile.png", 6102);
- config.addOption("mainport.params.servlet.2.bookmarks.0.description", 1,
- "Freesite aimed at beginners. Learn basic methods of retrieving and inserting data from and into freenet. " +
- "Unfortunately some of the specifics are slightly outdated.", 6103);
- config.addOption("mainport.params.servlet.2.bookmarks.1.key", 1, "SSK@a7SLJXxcl2eT967cHE5~mzQaYTkPAgM/newtofn/7//", 6130);
- config.addOption("mainport.params.servlet.2.bookmarks.1.title", 1, "New to Freenet?", 6131);
- config.addOption("mainport.params.servlet.2.bookmarks.1.activelinkFile", 1, "newtofn.jpg", 6132);
- config.addOption("mainport.params.servlet.2.bookmarks.1.description", 1,
- "Another freesite aimed at beginners, with emphasis on Windows users connecting via modem.", 6133);
- config.addOption("mainport.params.servlet.2.bookmarks.2.key", 1, "SSK@y~-NCd~il6RMxOe9jjf~VR7mSYwPAgM,ds52dBUTmr8fSHePn1Sn4g/OneMore//", 6140);
- config.addOption("mainport.params.servlet.2.bookmarks.2.title", 1, "One More Time", 6141);
- config.addOption("mainport.params.servlet.2.bookmarks.2.activelinkFile", 1, "activelink.gif", 6142);
- config.addOption("mainport.params.servlet.2.bookmarks.2.description", 1,
- "A freesite indexing other freesites. The index is categorized, with one page per category.", 6143);
- config.addOption("mainport.params.servlet.2.bookmarks.3.key", 1, "SSK@pHWN3FglLQOoBleE3pQ3EX3PLFoPAgM,xgvJe~4roO7d3lT~4QPIzA/atwocentindex//", 6150);
- config.addOption("mainport.params.servlet.2.bookmarks.3.title", 1, "A Two Cent Index", 6151);
- config.addOption("mainport.params.servlet.2.bookmarks.3.activelinkFile", 1, "activelink.jpg", 6152);
- config.addOption("mainport.params.servlet.2.bookmarks.3.description", 1, "A freesite index with narrower inclusion criteria.", 6153);
- config.addOption("mainport.params.servlet.2.bookmarks.4.key", 1, "SSK@rgFrfo~dAesFgV5vylYVNvNGXO0PAgM,wo3T~oLnVbWq-vuD2Kr86Q/frost/19//", 6160);
- config.addOption("mainport.params.servlet.2.bookmarks.4.title", 1, "Frost", 6161);
- config.addOption("mainport.params.servlet.2.bookmarks.4.activelinkFile", 1, "activelink.png", 6162);
- config.addOption("mainport.params.servlet.2.bookmarks.4.description", 1, "Bulletin board and filesharing software.", 6163);
- config.addOption("mainport.params.servlet.2.bookmarks.5.key", 1, "SSK@TEx6TiaPeszpV4AFw3ToutDb49EPAgM/mytwocents/59//", 6200);
- config.addOption("mainport.params.servlet.2.bookmarks.5.title", 1, "My Two Cents Worth", 6201);
- config.addOption("mainport.params.servlet.2.bookmarks.5.activelinkFile", 1, "activelink.jpg", 6202);
- config.addOption("mainport.params.servlet.2.bookmarks.5.description", 1,
- "A flog (freenet blog) about \"my 2cents worth on just about any subject\", according to the author.", 6203);
- // end bookmarks
-
-
- config.addOption(
- "mainport.params.servlet.3.uri",
- 1,
- "/servlet/images/",
- 4130);
- config.addOption("mainport.params.servlet.3.method", 1, "GET", 4131);
- config.addOption(
- "mainport.params.servlet.3.class",
- 1,
- "freenet.client.http.ImageServlet",
- 4132);
- config.addOption(
- "mainport.params.servlet.3.name",
- 1,
- "Server Images",
- 4133);
- config.addOption(
- "mainport.params.servlet.4.uri",
- 1,
- "/servlet/Insert",
- 4140);
- config.addOption("mainport.params.servlet.4.method", 1, "BOTH", 4141);
- config.addOption(
- "mainport.params.servlet.4.class",
- 1,
- "freenet.client.http.InsertServlet",
- 4142);
- config.addOption(
- "mainport.params.servlet.4.name",
- 1,
- "Insert Proxy Status",
- 4143);
- config.addOption(
- "mainport.params.servlet.4.params.insertHtl",
- 1,
- 20,
- 4144);
- config.addOption(
- "mainport.params.servlet.4.params.sfInsertThreads",
- 1,
- 30,
- 4145);
- config.addOption(
- "mainport.params.servlet.4.params.sfInsertRetries",
- 1,
- 3,
- 4146);
- config.addOption(
- "mainport.params.servlet.4.params.sfRefreshIntervalSecs",
- 1,
- 15,
- 4147);
- config.addOption("mainport.params.servlet.6.uri", 1, "/", 4190);
- config.addOption("mainport.params.servlet.6.method", 1, "POST", 4191);
- config.addOption(
- "mainport.params.servlet.6.class",
- 1,
- "freenet.client.http.InsertServlet",
- 4192);
- config.addOption(
- "mainport.params.servlet.6.name",
- 1,
- "Insert Proxy",
- 4193);
- config.addOption(
- "mainport.params.servlet.6.params.insertHtl",
- 1,
- 20,
- 4194);
- config.addOption(
- "mainport.params.servlet.6.params.sfInsertThreads",
- 1,
- 20,
- 4195);
- config.addOption(
- "mainport.params.servlet.6.params.sfInsertRetries",
- 1,
- 3,
- 4196);
- config.addOption(
- "mainport.params.servlet.6.params.sfRefreshIntervalSecs",
- 1,
- 15,
- 4197);
- config.addOption(
- "mainport.params.servlet.5.uri",
- 1,
- "/servlet/nodestatus/",
- 4150);
- config.addOption("mainport.params.servlet.5.method", 1, "BOTH", 4151);
- config.addOption(
- "mainport.params.servlet.5.class",
- 1,
- "freenet.client.http.NodeStatusServlet",
- 4152);
- config.addOption(
- "mainport.params.servlet.5.name",
- 1,
- "Node Status",
- 4153);
- config.addOption(
- "mainport.params.servlet.7.uri",
- 1,
- "/servlet/SFRequest/",
- 4160);
- config.addOption("mainport.params.servlet.7.method", 1, "BOTH", 4161);
- config.addOption(
- "mainport.params.servlet.7.class",
- 1,
- "freenet.client.http.SplitFileRequestServlet",
- 4162);
- config.addOption(
- "mainport.params.servlet.7.name",
- 1,
- "SplitFile Download Servlet (alpha!)",
- 4163);
- config.addOption(
- "mainport.params.servlet.7.params.requestHtl",
- 1,
- 20,
- 4164);
- config.addOption(
- "mainport.params.servlet.7.params.sfBlockRequestHtl",
- 1,
- 0,
- 4165);
- config.addOption(
- "mainport.params.servlet.7.params.sfRequestRetries",
- 1,
- 4,
- 4166);
- // Safer to go straight from 0 to 20
- config.addOption(
- "mainport.params.servlet.7.params.sfRetryHtlIncrement",
- 1,
- 20,
- 4167);
- config.addOption(
- "mainport.params.servlet.7.params.sfRequestThreads",
- 1,
- 30,
- 4168);
- config.addOption(
- "mainport.params.servlet.7.params.sfDoParanoidChecks",
- 1,
- true,
- 4169);
- config.addOption(
- "mainport.params.servlet.7.params.sfRefreshIntervalSecs",
- 1,
- 15,
- 4170);
- config.addOption(
- "mainport.params.servlet.7.params.sfForceSave",
- 1,
- false,
- 4171);
- config.addOption(
- "mainport.params.servlet.7.params.sfSkipDS",
- 1,
- false,
- 4172);
- config.addOption(
- "mainport.params.servlet.7.params.sfUseUI",
- 1,
- true,
- 4173);
- config.addOption(
- "mainport.params.servlet.7.params.sfRunFilter",
- 1,
- true,
- 4174);
- config.addOption(
- "mainport.params.servlet.7.params.sfRandomSegs",
- 1,
- true,
- 4175);
- config.addOption(
- "mainport.params.servlet.7.params.sfFilterParanoidStringCheck",
- 1,
- false,
- 4176);
- config.addOption(
- "mainport.params.servlet.7.params.sfHealHtl",
- 1,
- 20,
- 4177);
- config.addOption(
- "mainport.params.servlet.7.params.sfHealPercentage",
- 1,
- 100,
- 4178);
- config.addOption(
- "mainport.params.servlet.7.params.sfForceSave",
- 1,
- true,
- 4179);
- config.addOption(
- "mainport.params.servlet.7.params.maxRetries",
- 1,
- 50,
- 4179);
- String downloadDir;
- try {
- downloadDir =
- System.getProperty("user.home")
- + File.separator
- + "freenet-downloads";
- } catch (Throwable e) {
- downloadDir = "";
- }
- config.addOption(
- "mainport.params.servlet.7.params.sfDefaultSaveDir",
- 1,
- downloadDir,
- 4180);
- config.addOption(
- "mainport.params.servlet.7.params.sfDefaultWriteToDisk",
- 1,
- downloadDir.length()!=0,
- 4181);
- config.addOption(
- "mainport.params.servlet.7.params.sfDisableWriteToDisk",
- 1,
- false,
- 4182);
- config.addOption(
- "mainport.params.servlet.8.uri",
- 1,
- "/servlet/stream/",
- 4190);
- config.addOption("mainport.params.servlet.8.method", 1, "GET", 4191);
- config.addOption(
- "mainport.params.servlet.8.class",
- 1,
- "freenet.client.http.StreamServlet",
- 4192);
- config.addOption(
- "mainport.params.servlet.8.name",
- 1,
- "Freenet Streaming Servlet",
- 4193);
- config.addOption(
- "mainport.params.servlet.9.uri",
- 1,
- "/servlet/streamInsert/",
- 5101);
- config.addOption("mainport.params.servlet.9.method", 1, "GET", 5102);
- config.addOption(
- "mainport.params.servlet.9.class",
- 1,
- "freenet.client.http.StreamInsertServlet",
- 5103);
- config.addOption(
- "mainport.params.servlet.9.name",
- 1,
- "Freenet Stream Insert Servlet",
- 5104);
- config.setExpert("mainport.params.servlet.8.uri", true);
- config.setExpert("mainport.params.servlet.8.method", true);
- config.setExpert("mainport.params.servlet.8.class", true);
- config.setExpert("mainport.params.servlet.8.name", true);
- config.setExpert("mainport.params.servlet.9.uri", true);
- config.setExpert("mainport.params.servlet.9.method", true);
- config.setExpert("mainport.params.servlet.9.class", true);
- config.setExpert("mainport.params.servlet.9.name", true);
- config.addOption(
- "mainport.params.defaultServlet.uri",
- 1,
- "/default",
- 4190);
- config.addOption(
- "mainport.params.defaultServlet.method",
- 1,
- "GET",
- 4191);
- config.addOption(
- "mainport.params.defaultServlet.class",
- 1,
- "freenet.client.http.RedirectServlet",
- 4192);
- config.addOption(
- "mainport.params.defaultServlet.name",
- 1,
- "Web Interface Redirect",
- 4193);
- config.addOption(
- "mainport.params.defaultServlet.params.targetURL",
- 1,
- "/servlet/nodeinfo/",
- 4194);
- // RouteConnectTimeout
- config.setExpert("routeConnectTimeout", true);
- config.argDesc("routeConnectTimeout", "<millis>");
- config.shortDesc(
- "routeConnectTimeout",
- "wait on new connection when routing.");
- config.longDesc(
- "routeConnectTimeout",
- "The time to wait for connections to be established and ",
- "authenticated before passing by a node while routing out.",
- "Connections that are by passed are still finished and cached ",
- "for the time set by <connectionTimeout> (in milliseconds).");
- // maxHopsToLive
- config.setExpert("maxHopsToLive", true);
- config.argDesc("maxHopsToLive", "<integer>");
- config.shortDesc("maxHopsToLive", "max HTL allowed on routed requests");
- config.longDesc(
- "maxHopsToLive",
- "When forwarding a request, the node will reduce the HTL to this value",
- "if it is found to be in excess.");
- // maxLog2DataSize
- config.setExpert("maxLog2DataSize", true);
- config.argDesc("maxLog2DataSize", "<integer>");
- config.shortDesc(
- "maxLog2DataSize",
- "maximum file data size (log to base 2)");
- config.longDesc(
- "maxLog2DataSize",
- "The logarithm to the base 2 of the maximum file data+metadata size ",
- "that the node will accept. 20 means 1 megabyte, which is reasonable.");
- // probIncHopsSinceReset
- config.setExpert("probIncHopsSinceReset", true);
- config.argDesc("probIncHopsSinceReset", "<number between 0 and 1>");
- config.shortDesc(
- "probIncHopsSinceReset",
- "Probability of incrementing hopsSinceReset when forwarding a request. Leave this alone.");
- // cacheProbPerHop
- config.setExpert("cacheProbPerHop", true);
- config.argDesc("cacheProbPerHop", "<number between 0 and 1>");
- config.longDesc(
- "cacheProbPerHop",
- "Number which is raised to the power of the number of hops since a datasource reset to determine the cache probability. Set lower for better routing, higher for more caching/redundancy. The default is equivalent to approximately 5 nodes caching a file in a request.");
- // minStoreFullPCache
- config.setExpert("minStoreFullPCache", true);
- config.argDesc("minStoreFullPCache", "<number between 0 and 1>");
- config.longDesc(
- "minStoreFullPCache",
- "Minimum proportion of the datastore that must be filled before probabilistic caching kicks in.");
- // minRTFullPRef
- config.setExpert("minRTFullPRef", true);
- config.argDesc("minRTFullPRef", "<number between 0 and 1>");
- config.longDesc(
- "minRTFullPRef",
- "Minimium proportion of the routing table (classic mode) that must be filled before probabilistic ",
- "referencing kicks in.");
- // minRTNodesPRef
- config.setExpert("minRTNodesPRef", true);
- config.argDesc("minRTNodesPRef", "<number between 0 and 1>");
- config.longDesc(
- "minRTNodesPRef",
- "Minimum proportion of the routing table nodes that must be filled and not backed off before ",
- "probabilistic referencing kicks in");
- // nodeFile
- config.setExpert("nodeFile", true);
- config.argDesc("nodeFile", "<file>");
- config.shortDesc("nodeFile", "location of node's key file");
- config.longDesc(
- "nodeFile",
- "The path to the file containing the node's private key, DSA group,",
- "cipher key, etc. Defaults to node in the current directory.");
- // storeFile
- config.setExpert("storeFile", true);
- config.argDesc("storeFile", "<file>[,..]");
- config.shortDesc(
- "storeFile",
- "location of data store directory - do not put anywhere with existing files");
- config.longDesc(
- "storeFile",
- "The path to the single directory containing the data "
- + "store. The total maximum size of the files in the "
- + "directory is given by <storeSize>. It will create new "
- + "files and directories in this dir, and DELETE OLD ONES. "
- + "Defaults to store in the current directory.");
- // storeSize
- config.argDesc(
- "storeSize",
- "<bytes - can use kKmMgGtTpPeE multipliers>");
- config.shortDesc("storeSize", "size of the data store file(s)");
- config.longDesc(
- "storeSize",
- "The byte size of the data store directory.",
- "The maximum sized file that will be cached is 1/100th of",
- "this value. We recommend the default 256MB, to cache the largest common",
- "file size on freenet, 1MB plus some headers, with plenty of elbowroom, but",
- "any size about 101MB should be adequate (a 1MB chunk is not exactly 1MB...).",
- "Note that if you increase settings such as maximumThreads, you may need to",
- "use a larger store.");
- // storeType
- config.setExpert("storeType", true);
- config.argDesc("storeType", "<string>");
- config.shortDesc(
- "storeType",
- "datastore implementation: \"native\" (new), \"monolithic\" (old, gets the DSB), \"freenet\" (autodetect, prefer native), or \"convert\" (convert old to new)");
- config.longDesc(
- "storeType",
- "Datastore implementation. Put \"native\" (without the quotes) if you want the new native filesystem datastore, which stores the files in a directory. Put \"convert\" to convert from an old monolithic store to a native store. Note that convert uses lots of disk space while doing the conversion (approximately twice the datastore size), and the resulting store may be (temporarily) slightly larger than the old one due to block size mismatch (this will be fixed as soon as the node tries to add a file to the store).");
- // storeBlockSize
- config.setExpert("storeBlockSize", true);
- config.argDesc("storeBlockSize", "<bytes>");
- config.shortDesc(
- "storeBlockSize",
- "Size of filesystem accounting blocks for storeType=native");
- config.longDesc(
- "storeBlockSize",
- "Size of blocks in the underlying filesystem for purposes of calculating space usage when storeType=native.");
- // storeMaxTempFraction
- config.setExpert("storeMaxTempFraction", true);
- config.argDesc("storeMaxTempFraction", "<number between 0 and 1>");
- config.shortDesc(
- "storeMaxTempFraction",
- "Maximum fraction of the datastore to use for temp files (assuming the temp dir is not overridden)");
- // storeCipherName
- config.setExpert("storeCipherName", true);
- config.argDesc("storeCipherName", "<string>");
- config.shortDesc(
- "storeCipherName",
- "name of symmetric cipher algorithm");
- config.longDesc("storeCipherName", "deprecated");
- // storeCipherWidth
- config.setExpert("storeCipherWidth", true);
- config.argDesc("storeCipherWidth", "<integer>");
- config.shortDesc("storeCipherWidth", "bit-width of cipher key");
- config.longDesc("storeCipherWidth", "deprecated");
- // routingDir
- config.setExpert("routingDir", true);
- config.argDesc("routingDir", "<directory>");
- config.shortDesc(
- "routingDir",
- "The directory in which to store the routing table files. Defaults to parent dir of storeDir");
- // useDSIndex
- config.setExpert("useDSIndex", true);
- config.argDesc("useDSIndex", "true|false");
- config.shortDesc("useDSIndex", "Use a datastore index file");
- config.longDesc(
- "useDSIndex",
- "Use a datastore index file. Shorter startup time, but we have to run checkpoints, which lock the datastore, causing a hiccup");
- // rtMaxRefs
- config.setExpert("rtMaxRefs", true);
- config.argDesc("rtMaxRefs", "<integer>");
- config.shortDesc("rtMaxRefs", "max no. of refs per node");
- config.longDesc(
- "rtMaxRefs",
- "The number of references allowed per node in the routing table.",
- "This should not be set too high.");
- // rtMaxNodes
- config.setExpert("rtMaxNodes", true);
- config.argDesc("rtMaxNodes", "<integer>");
- config.shortDesc("rtMaxNodes", "max no. unique nodes in routing table");
- config.longDesc(
- "rtMaxNodes",
- "The number of unique nodes that can be contained in the routing table. Note that the node will try to keep an idle connection open to each of these, so don't set it to more than half the value of maxNodeConnections. Too big or too small will result in inefficient or completely useless routing, or slow specialization; the default 50 is reasonable (if you see another default, it's because you have an OS with too few connections).");
- // doEstimatorSmoothing
- config.setExpert("doEstimatorSmoothing", true);
- config.argDesc("doEstimatorSmoothing", ARG_BOOLEAN);
- config.longDesc("doEstimatorSmoothing",
- "Whether to use adjacent buckets to estimate the value of a given bucket in a KeyspaceEstimator when it has no reports. "+
- "If you don't understand what I just said you should probably leave it alone!");
- // useFastEstimators
- config.setExpert("useFastEstimators", true);
- config.argDesc("useFastEstimators", ARG_BOOLEAN);
- config.longDesc("useFastEstimators",
- "Whether to use doubles (floating point, 53 bit mantissa, implemented in hardware on most systems) instead of BigIntegers (full 160 bits, slow) in NGRouting estimators.");
-
- // minCP
- config.setExpert("minCP", true);
- config.argDesc("minCP", "<number between 0 and 1>");
- config.shortDesc(
- "minCP",
- "Lower bound on Contact Probability of nodes in the Routing Table");
- // failuresLookupARK
- config.setExpert("failuresLookupARK", true);
- config.argDesc("failuresLookupARK", "<integer>");
- config.shortDesc(
- "failuresLookupARK",
- "Number of consecutive failures required to trigger an ARK lookup");
- // minARKDelay
- config.setExpert("minARKDelay", true);
- config.argDesc("minARKDelay", "<milliseconds>");
- config.shortDesc(
- "minARKDelay",
- "Minimum time that a node in the routing table must have been uncontactable for before we can trigger an ARK lookup");
- // maxARKThreadsFraction
- config.setExpert("maxARKThreadsFraction", true);
- config.argDesc("maxARKThreadsFraction", "<number between 0 and 1>");
- config.shortDesc(
- "maxARKThreadsFraction",
- "Maximum fraction of maximumThreads to use for ARK lookups");
- // maxRoutingSteps
- config.setExpert("maxRoutingSteps", true);
- config.argDesc("maxRoutingSteps", "<integer>");
- config.shortDesc(
- "maxRoutingSteps",
- "max no. node refs used per routing attempt.");
- config.longDesc(
- "maxRoutingSteps",
- "The maximum number or node refs that will be used to route a request before RNFing. ",
- "-1 means 1/10th the routing table size.");
- // messageStoreSize
- config.setExpert("messageStoreSize", true);
- config.argDesc("messageStoreSize", "<integer>");
- config.shortDesc(
- "messageStoreSize",
- "max no. of simultaneous requests.");
- config.longDesc(
- "messageStoreSize",
- "The number of outstanding message replies the node will",
- "wait for before it starts to abandon them.");
- // failureTableSize
- config.setExpert("failureTableSize", true);
- config.argDesc("failureTableSize", "<integer>");
- config.shortDesc("failureTableSize", "max. no. cached failed keys.");
- config.longDesc(
- "failureTableSize",
- "The number keys that failed to be retrieved the node should key track of.");
- //failureTableItems
- config.setExpert("failureTableItems", true);
- // failureTableTime
- config.setExpert("failureTableTime", true);
- config.argDesc("failureTableTime", "<milliseconds>");
- config.shortDesc("failureTableTime", "max. time to fail keys.");
- config.longDesc(
- "failureTableTime",
- "The amount of time to keep keys cache keys that could not be found and",
- "automatically fail requests for them.");
- // newNodePollInterval
- config.setExpert("newNodePollInterval", true);
- config.argDesc("newNodePollInterval", "<milliseconds>");
- config.shortDesc(
- "newNodePollInterval",
- "interval between polling new nodes");
- config.longDesc(
- "newNodePollInterval",
- "The node will send a request for a random "
- + "recently requested key to the node in the routing table with the fewest accesses, "
- + "every N milliseconds. Please enter N.");
- // bandwidthLimit
- config.setExpert("bandwidthLimit", true); // because deprecated
- config.argDesc("bandwidthLimit", "<bytes/sec>");
- config.shortDesc("bandwidthLimit", "DEPRECATED");
- config.setDeprecated("bandwidthLimit", true);
- config.longDesc(
- "bandwidthLimit",
- "The maximum number of bytes per second to transmit, totaled between",
- "incoming and outgoing connections. Ignored if either inputBandwidthLimit",
- "or outputBandwidthLimit is nonzero. DEPRECATED - please set inputBandwidthLimit and outputBandwidthLimit directly. Difficult to implement for NIO and not widely used.");
- // inputBandwidthLimit
- config.argDesc("inputBandwidthLimit", "<bytes/sec>");
- config.shortDesc("inputBandwidthLimit", "incoming bandwidth limit");
- config.longDesc(
- "inputBandwidthLimit",
- "If nonzero, specifies an independent limit for incoming data only, in bytes",
- "per second. A 512kbps broadband (DSL or cable) connection is 64kB/sec, but",
- "you may want to use other things than Freenet on it. However, Freenet's",
- "background usage should be close to the output limit most of the time. ",
- "You may want to set this and then set doLowLevelInputLimiting=false, in ",
- "order to have more accurate pending-transfers load. You SHOULD do this if ",
- "your connection has more outbound than inbound bandwidth.");
- // outputBandwidthLimit
- config.argDesc("outputBandwidthLimit", "<bytes/sec>");
- config.shortDesc(
- "outputBandwidthLimit",
- "if enabled, outgoing bandwidth limit");
- config.longDesc(
- "outputBandwidthLimit",
- "If nonzero, specifies an independent limit for outgoing data only, in bytes",
- "per second. Not entirely accurate. If you need exact limiting, do it at the",
- "OS level. A typical broadband connection has either a 128kbps or a 256kbps",
- "uplink, this equates to 16kB/sec and 32kB/sec respectively. You will need to",
- "keep some bandwidth back for other apps and for downloads (yes, downloading",
- "uses a small amount of upload bandwidth). We suggest therefore limits of",
- "12000 for a 128kbps upload connection, or 24000 for a 256kbps upload",
- "connection. Most broadband connections have far more download bandwidth than",
- "upload bandwidth... just because you have 1Mbps download, does not mean you",
- "have 1Mbps upload; if you do not know what your connection's upload speed is,",
- "use one of the above options.");
- // averageBandwidthLimit
- config.setExpert("averageBandwidthLimit", true);
- config.argDesc("averageBandwidthLimit", "<bytes/sec>");
- config.setDeprecated("averageBandwidthLimit", true);
- config.shortDesc("averageBandwidthLimit", "DEPRECATED");
- config.longDesc(
- "averageBandwidthLimit",
- "The maximum number of bytes per second to transmit (averaged over a week),",
- "totaled between incoming and outgoing connections. Error to define it if",
- "any of (average)inputBandwidthLimit or (average)outputBandwidthLimit is",
- "nonzero. DEPRECATED - please set inputBandwidthLimit and outputBandwidthLimit directly. Difficult to implement for NIO and not widely used.");
- // averageInputBandwidthLimit
- config.argDesc("averageInputBandwidthLimit", "<bytes/sec>");
- config.shortDesc(
- "averageInputBandwidthLimit",
- "incoming bandwidth limit averaged over a week");
- config.longDesc(
- "averageInputBandwidthLimit",
- "If nonzero, specifies an independent limit for incoming data only (averaged",
- "over a week). (overrides averageBandwidthLimit if nonzero)");
- // averageOutputBandwidthLimit
- config.argDesc("averageOutputBandwidthLimit", "<bytes/sec>");
- config.shortDesc(
- "averageOutputBandwidthLimit",
- "outgoing bandwidth limit averaged over a week");
- config.longDesc(
- "averageOutputBandwidthLimit",
- "If nonzero, specifies an independent limit for outgoing data only (averaged",
- "over a week). (overrides bandwidthLimit if nonzero)");
- // maxConnectionsPerMinute
- config.setExpert("maxConnectionsPerMinute", true);
- config.argDesc("maxConnectionsPerMinute", "<int>");
- config.shortDesc(
- "maxConnectionsPerMinute",
- "Max no. of connections in one minute.");
- config.longDesc(
- "maxConnectionsPerMinute",
- "The maximum number of outgoing connections established in a one minute period. "
- + "Deprecated and ignored.");
- // maxConnectionsMinute
- config.setExpert("maxConnectionsMinute", true);
- config.argDesc("maxConnectionsMinute", "<milliseconds>");
- config.shortDesc(
- "maxConnectionsMinute",
- "Length of a minute in milliseconds for purposes of maxConnectionsPerMinute");
- config.longDesc(
- "maxConnectionsMinute",
- "The length of the period over which there must be at most maxConnectionsPerMinute connections. Deprecated"
- + " and ignored.");
- // maxRequestsPerInterval
- config.setExpert("maxRequestsPerInterval", true);
- config.argDesc("maxRequestsPerInterval", "<int>");
- config.shortDesc(
- "maxRequestsPerInterval",
- "Max no. of outgoing requests per maxRequestsInterval.");
- config.longDesc(
- "maxRequestsPerInterval",
- "The maximum number of outgoing requests per maxRequestsInterval. -1 = disable.");
- // maxRequestsInterval
- config.setExpert("maxRequestsInterval", true);
- config.argDesc("maxRequestsInterval", "<milliseconds>");
- config.shortDesc(
- "maxRequestsInterval",
- "Length of the period in milliseconds for purposes of maxRequestsPerInterval");
- config.longDesc(
- "maxRequestsInterval",
- "The length of the period over which there must be at most maxRequestsPerInterval connections.");
- // maxNodeConnections
- config.setExpert("maxNodeConnections", true);
- config.argDesc("maxNodeConnections", "<positive integer>");
- config.shortDesc(
- "maxNodeConnections",
- "Max. no. of connections to other "
- + "nodes. Deprecated unless maximumThreads=0.");
- config.longDesc(
- "maxNodeConnections",
- "The maximum number of incoming and outgoing connections to "
- + "allow at the same time. Forced to 0.4*maximumThreads unless"
- + " maximumThreads = 0.");
- // maxOpenConnectionsNewbieFraction
- config.setExpert("maxOpenConnectionsNewbieFraction", true);
- config.argDesc ("maxOpenConnectionsNewbieFraction", "<number between 0.0 and 1.0>");
- config.shortDesc("maxOpenConnectionsNewbieFraction",
- "Proportion of open connections limit that may be newbie nodes before we start "+
- "rejecting new connections (unless there are free slots)");
-
- // maxNodeFilesOpen
- config.setExpert("maxNodeFilesOpen", true);
- config.argDesc("maxNodeFilesOpen", "<positive integer>");
- config.longDesc(
- "maxNodeFilesOpen",
- "Maximum number of file descriptors used by the node for files. Not including connections.");
- // maxNegotiations
- config.setExpert("maxNegotiations", true);
- config.argDesc ("maxNegotiations", "<positive integer>");
- config.shortDesc("maxNegotiations", "maximum number of simultaneous connection opens initiated by the node");
-
- // ipAddress
- config.setExpert("ipAddress", true);
- config.argDesc("ipAddress", "xxx.xxx.xxx.xxx");
- config.shortDesc(
- "ipAddress",
- "your IP as seen by the public internet (normally this is autoconfigured)");
- config.longDesc(
- "ipAddress",
- "The IP address of this node as seen by the "
- + "public Internet. You only need to override this "
- + "if it cannot be autodetected, for example if you "
- + "have a NAT (a.k.a. IP Masquerading) "
- + "firewall/router, in which case you will need "
- + "to set it to the IP address or DNS name of the "
- + "internet-side interface of the router, which "
- + "needs to be static (www.dyndns.org and similar "
- + "services can help here if you have a dynamic IP).");
- // listenPort
- config.argDesc("listenPort", "<port no.>");
- config.shortDesc("listenPort", "incoming FNP port");
- config.longDesc(
- "listenPort",
- "The port to listen for incoming FNP (Freenet Node Protocol) connections on.");
- // clientPort
- config.setExpert("clientPort", true);
- config.argDesc("clientPort", "<port no.>");
- config.shortDesc("clientPort", "incoming FCP port");
- config.longDesc(
- "clientPort",
- "The port to listen for local FCP (Freenet Client Protocol) connections on.");
- // fcpHosts
- config.setExpert("fcpHosts", true);
- config.argDesc("fcpHosts", "<host list>");
- config.shortDesc("fcpHosts", "hosts allowed to connect with FCP");
- config.longDesc(
- "fcpHosts",
- "A comma-separated list of hosts that may connect to the FCP port",
- "(clientPort). If left blank, only the localhost will be allowed."
- + " If you set this, make sure localhost is included in the list or "
- + " access won't be allowed from the local machine. ",
- "May be given as IP addresses or host names.");
- // logLevel
- config.argDesc("logLevel", "<word>");
- config.shortDesc("logLevel", "error, normal, minor, or debug");
- config.longDesc(
- "logLevel",
- "The error reporting threshold, one of:",
- " Error: Errors only",
- " Normal: Report significant events, and errors",
- " Minor: Report minor events, significant events, and errors",
- " Debug: Report everything that can be reported");
- // logLevelDetail
- config.setExpert("logLevelDetail", true);
- config.argDesc(
- "logLevelDetail",
- "<list of class name or package name = level e.g. freenet.node.rt:debug,freenet.support:minor>");
- config.shortDesc(
- "logLeveā¦
Large files files are truncated, but you can click here to view the full file