⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 userguide.html

📁 P2P NAP的C实现 P2P在网络应用中越来越流行
💻 HTML
📖 第 1 页 / 共 5 页
字号:
# your napster email addressemail=anon@napster.com# list of upload directories, separated by semicolonupload=/home/yourname/music# your download directorydownload=/home/yourname/download# your directory for incomplete filesincomplete=/home/yourname/incomplete# your connection speed, according to the following chart:## Connection | Number# -------------------# Unknown    |  0# 14.4       |  1# 28.8       |  2# 33.6       |  3# 56.7       |  4# 64K ISDN   |  5# 128K ISDN  |  6# Cable      |  7# DSL        |  8# T1         |  9# T3 or >    | 10connection=4# maximal number of simultaneous uploads allowed#maxuploads=# maximum number of simultaneous uploads per user#maxupuser=# maximum number of simultaneous downloads allowed#maxdownloads=# maximum number of simultaneous downloads per user#maxdownuser=# list of servers, separated by semicolon (note: this is now ignored# and overwritten unless nometa is set)#servers=# port or range of ports to use for client-client connectionsdataport=6699-6799# log file for transfer logs#logfile=# log file for logging everything#logallfile=</pre></td></tr></table><p>This is the file which nap will create automatically for you, exceptit will use the settings that you enter.  Note that the password entryis left blank or set to a question mark. If you want, you can edityour configuration file and put your password in it; in this case, napwill not prompt you for it in the future. But nap will never save yourpassword for you; whenever you save your config file, your passwordwill show up as a question mark.<p>If you tend to use several different accounts on napster, and youdon't want to be prompted for passwords, you can now also specifypasswords and email addresses for each different account. Simply addsome lines such as<p><pre>        pass.<i>username1</i>=<i>passwd1</i>        pass.<i>username2</i>=<i>passwd2</i>        email.<i>username1</i>=<i>email1</i>        email.<i>username2</i>=<i>email2</i></pre>to your config file. If you specify passwords in this way, it isunderstood that you don't want to be prompted for them; thus, suchpasswords never get be replaced by "?".<p>Any options that are set in the configuration file can be overriddenon the command line, by using the "-o" option. It is also possible tohave more than one alternative configuration file (for instance, ifyou have two different napster accounts with different usernames andpasswords), and to specify on the command line which one to use.<p>There is also the possibility to read a <i>global</i> configurationfile, usually called <code>/etc/naprc</code>. This file, which followsthe same format as the user configuration file discussed above, isonly read if it exists, and it is read <i>after</i> the user'sconfiguration file. However, any options previously set will not beoverwritten, so in effect, the user's configuration file takesprecedence over the global one. It is even possible to change thelocation of the global configuration file by defining the variable<code>globalconfigfile</code> in the user's configuration file.  <h4><a name=7.2.></a>7.2. User variables <font size=3 color=#00ff00><b>[updated 1.5.1]</b></font></h4>Nap has a general mechanism called "user variables". These areinternal variables that correspond to nap's settings; for instance,anything you specify in your config file corresponds to such asetting.  You can type <p><pre>        /set <i>variable</i> <i>value</i>and     /unset <i>variable</i></pre>to set a variable to a value, or to unset a variable. If you just type<p><pre>        /set <i>variable</i></pre>then the current value of this variable will be displayed. Finally, ifyou just type <code>/set</code>, a list of all currently set variablesand their values will be displayed.<p>Here is an alphabetical list of most user variables that have aspecial meaning.<ul><li><code><b>announcepongs</b></code>: If this variable is set to 1,nap will announce when it receives a PONG packet from theserver. I am not sure why this feature is useful, but it once used tobe the default behavior, so I kept this in case someone needs it.<li><code><b>autopurge</b></code>: If this variable is set to anumber, stopped item (i.e., failed, finished, incomplete, timed out)will be automatically deleted from the download list after this manyseconds. If not set or set to -1, stopped items will remain in thedownload items indefinitely, until you explicitly remove them.<li><code><b>autopurgedown</b></code>: Like <code>autopurge</code>,but for downloads only.<li><code><b>autopurgeup</b></code>: Like <code>autopurge</code>,but for uploads only.<li><code><b>autoreply</b></code>: If this variable is set, itrepresents a string which will be sent as an automatic reply to anyuser who sends you a private message. This might be handy if you are runningnap non-interactively, and you don't want to appear rude by notreplying.<li><code><b>autorestart</b></code>: If this variable is set to 1, weattempt to automatically reconnect to a server when the connection tothe server is lost. Same as the command line option of the same name. <li><code><b>bandwidthdown</b></code>: global limit on the bandwidthfor downloads, in kB/s.<li><code><b>bandwidthdown1</b></code>: limit on the bandwidth of asingle download, in kB/s.<li><code><b>bandwidthup</b></code>: global limit on the bandwidthfor uploads, in kB/s.<li><code><b>bandwidthup1</b></code>: limit on the bandwidth of asingle upload, in kB/s.<li><code><b>configfile</b></code>: Predictably, this is the name ofyour configuration file. I'm not sure why you would want to change itin the middle of a session, but you can.<li><code><b>connection</b></code>: Your connection speed. This is anumber from 0 to 10. See the chart in the sample configuration fileabove. <li><code><b>connecttimeout</b></code>: The number of seconds untilnap times out while making a connection to any one server. The defaultis 5 seconds. When set to 0, there is no timeout at all (which cancause nap to hang indefinitely when trying to connect to anon-responsive server).<li><code><b>cursorfollowsscreen</b></code>: If set to 1, the behaviorof the "PgUp" and "PgDn" keys on the search result screen will be"cursor follows screen", else "screen follows cursor". In case you care.<li><code><b>dataport</b></code>: The port on your local machine whichremote clients will connect to. It is advisable to give a range orports, for instance, 6699-6799, in case your chosen port is alreadytaken by another program. You should set this to 0 if you are behind afirewall.<li><code><b>debug</b></code>: This is the same as the debug level set withthe "-d" option, or with the command <code>/debug</code>.<li><code><b>download</b></code>: Your download directory, i.e., whereyou want complete downloaded files to go. Incomplete files will go tothe incomplete directory.<li><code><b>email</b></code>: Your email address, as sent to theserver. It is perfectly acceptable to leave this blank. You can alsoset email addresses for different usernames by defining variables ofthe form <code>email.<i>user</i></code>. <li><code><b>globalconfigfile</b></code>: The name of a globalconfiguration file (default <code>/etc/naprc</code>) which is read<i>after</i> the user's configuration file, but in a special modewhere no values that are already set are overwritten. This file isonly read on startup.<li><code><b>hash</b></code>: If set, calculate MD5 hashes of sharedfiles. This used to be the default until 1.5.0. But since most serversdon't use the hashes anyway, by default, we don't calculate hashesany more. <font size=3 color=#00ff00><b>[new 1.5.1]</b></font><li><code><b>identity</b></code>: This value, if set, defines a fakeclient identification string. Normally the nap client identifiesitself to the server with an identification string such as <nobr>"napv1.5.2"</nobr>. Some dumb servers have been found to refuseconnections from the nap client, and in such cases, you can set<code>identity</code> to a different value, e.g. <nobr>"WinMX1.0"</nobr>, to fool the server. <font size=3 color=#ff0000><b>[new1.5.2]</b></font><li><code><b>incomplete</b></code>: Your incomplete directory, i.e.,where you want incomplete files to go. Completed downloads are movedto the download directory.<li><code><b>incompletesuffix</b></code>: The suffix added to thefilenames of incomplete files. Default is ".incomplete".<li><code><b>libraryfile</b></code>: The location of your libraryfile. The default is <code>~/.nap/shared</code> in your homedirectory.<li><code><b>logallfile</b></code>: If set, this is the name of a fileto which everything that appears on the main screen will be logged.<li><code><b>logfile</b></code>: If set, this is the name of a file towhich a record of all transfers (up- and downloads) will be logged.<li><code><b>maxdownloads</b></code>: limits the number ofsimultaneous downloads.<li><code><b>maxdownuser</b></code>: limits the number ofsimultaneous downloads for any one user.<li><code><b>maxuploads</b></code>: limits the number ofsimultaneous uploads.<li><code><b>maxupuser</b></code>: limits the number ofsimultaneous uploads for any one user.<li><code><b>metaserver</b></code>: the URL of a napigator-stylemetaserver to retrieve a server list from. The default ishttp://www.napigator.com/servers.php.<li><code><b>metatimeout</b></code>: If non-zero, this specifies themaximum number of seconds nap will spend trying to connect to themetaserver. The default is 5 seconds.<li><code><b>napping</b></code>: The name of the "napping" program touse. This can also be an absolute filename. The default is "napping"and is searched for in your $PATH. See also <a href=#5.2.>5.2. Pings</a>.<li><code><b>newstimeout</b></code>: If non-zero, this specifies themaximum number of seconds nap will spend looking for news about newreleases while starting up. The default is 5 seconds.<li><code><b>noechosets</b></code>: If this is set to "1", then the<code>/set</code> command will not echo back its values to you.<li><code><b>nomasq</b></code>: Set this to "1" to disable filenamemasquerading. By default, nap hides the absolute pathnames of yourupload directories from the server and other clients. For instance, ifyour upload directory is /home/username/music, and you are sharing afile /home/username/music/classical/Beethoven.mp3, then this will bereported to the server as /1/classical/Beethoven.mp3. Correspondingdownload requests will be converted to the original pathnames.<font size=3 color=#00ff00><b>[new 1.5.1]</b></font><li><code><b>nometa</b></code>: If set to "1", prevents nap fromcontacting the meta-server on startup. This is useful if you wouldlike to specify your own "servers" variable in your config file.<li><code><b>nonews</b></code>: If set to "1", nap will not attempt tolook for news about new releases while starting up.<li><code><b>noresultscreen</b></code>: If this is set to "1", searchresults will be listed on the main screen, and not on a special searchresults screen. You can then download files with the <code>/get</code>or <code>/g</code> command.<li><code><b>noscroll</b></code>: If this is set to "1", then the mainscreen does not automatically scroll to the bottom on output.<li><code><b>pass</b></code>: your napster password. You can also setpasswords for different users by defining variables of the form<code>email.<i>user</i></code>.<li><code><b>proxy</b></code>: if you are behind a firewall and needto use an http proxy to be able to access the world-wide web, then set<code>proxy</code> to the URL of your proxy server,e.g. <code>http://proxy.mydomain.com/</code>.<li><code><b>savechannels</b></code>: If set to "1" while quitting,nap will save your open channels to the file<code>~/.nap/channels-<i>username</i></code>. If set to "1" whilestarting, load and join channels from that file.<li><code><b>savepass</b></code>: If this is set to "1", nap considersit okay to store your password in your configuration file. By default,nap will only store a "?", which means you will be promted for thepassword next time you start nap.<li><code><b>scrollsize</b></code>: If set, this defines a limit onthe number of lines that are saved on the main screen. The default is10000. If you set this to 0, there will be no limit.<li><code><b>sdefaults</b></code>: A string which determines thedefault layout of the search results screen. This is essentially asequence of keystrokes which will be execute

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -