NCDC(1)
π NCDC(1) β the ncdc manual, bestie edition π
ncdc manual β¨ okay so welcome to the Ncurses Direct Connect Client page, we're doing this together, grab a snack π
πΈ NAME πΈ
ncdc β Ncurses Direct Connect Client π
that's the whole name, she's short, she's iconic, she's the moment
β¨ SYNOPSIS β¨
ncdc [options]
that's it. that's the whole summoning ritual π§
π¦ DESCRIPTION π¦
Ncdc is a modern and lightweight direct connect client, and she comes with a friendly ncurses interface. like. she's pretty AND she works. we love a multi-hyphenate π
π GETTING STARTED π
okay bestie, this part is the baby's first ncdc section, for anyone who's never touched this thing before. the chapters further down go way deeper into everything she can do, no worries.
π what you're looking at when you open her
What you see when starting up ncdc is basically two things:
- an input line where you type commands
- a log window where the results show up
ngl it's giving regular terminal energy, and that's on purpose. π«Ά
Commands within ncdc start with a slash β like /help β and there's tab completion to help you out, because typing full words is for people with time β¨
π± first-time setup
so the very first thing you're gonna wanna do after launching ncdc for the first time is set up some basic info and settings, fr fr:
/set nick MyNick
/set description ncdc is awesome!
/set connection 10
/share "My Awesome Files" /path/to/files
and if you have a direct connection to the internet, or if your router is cool with port forwarding, you might also wanna turn on active mode:
/set active_port 34194
/set active true
π go read the help text for each of those commands and settings if you want more, it's all there.
π and yes β all of the above settings are saved to the database and will be used again on the next run. she remembers. she's not gonna make you redo it. queen behavior.
π connecting to a hub
to connect to a hub, you use /open:
/open ncdc adc://dc.blicky.net:2780/
so in that line, ncdc is the personal name you're giving to that hub, and the second argument is the URL. π
This URL will be saved in the database, so next time you wanna connect to this hub you can literally just do /open ncdc and you're in. π«
go read the help text for /open and /connect for the full tea. and if you want ncdc to auto-connect to a hub when she starts up, that's the autoconnect setting π
ποΈ the tab situation
Ncdc uses a tabbed interface: every hub opens in a new tab, and there are several other kinds of tabs available too. the type of tab is indicated in the tab list on the bottom of the screen with a character prefix. hubs, for example, are prefixed with a #. π
and if a tab needs your attention, there's a colored exclamation mark displayed before the tab name β different colors are used for different types of activity, so you can tell at a glance what kind of chaos is happening π₯
π§ everything else
Everything else should be fairly self-explanatory</purl>, but let's speedrun it anyway because I got you:
- to search for files β
/search - to browse through the user list of a hub β
/userlistor hit Alt+u - to browse someone's file list β
/browseor hit the 'b' key in the user list - to monitor your upload and download connections β
/connectionsor hit Alt+n
slay. that's the whole starter pack. π
β¨ OPTIONS β¨
here's every flag she takes, no skips, no cuts π
-c,--session-dir= dirβ use a different session directory. defaults to whatever's in the environment variable$NCDC_DIR, or if that's not set, it falls back to$HOME/.ncdcπ-h,--helpβ display a summary of options. the "help me please" button π-n,--no-autoconnectβ don't automatically connect to hubs that have the"autoconnect"option set. like, she'll hold back, respectfully π«Ά--no-bracketed-pasteβ disable bracketed pasting. that's it, that's the flag βοΈ-v,--versionβ display the ncdc version. flex check π
π GETTING CONNECTED π
okay so as with most file sharing clients, ncdc supports two modes of being connected: active and passive. let's talk about it because this is lowkey the most important part π
π΄ passive mode (the default)
In passive mode, you can connect out to the outside world, but nobody can connect (directly) to you.
when you're passive, you'll only be able to transfer files with people who are in active mode. so you're kinda limited, ngl π
β‘ active mode
In active mode, however, you'll have some port open to the rest of the network that other clients can connect to. and when you're active:
- you'll be able to transfer files with everyone π
- you may get more and faster search results π₯
Configuring active mode is therefore recommended. like genuinely, do it bestie, it's worth it π
π οΈ how to switch to active mode
In many setups, all you need to do is set a TCP/UDP port and enable the "active" setting:
/set active_port 34194
/set active true
that's it. two lines. iconic β¨
π checking your status
When you connect to a hub</purl>, the status bar will tell you whether you're active or passive on that particular hub, and what IP address is being used to let others connect to you. π
For most hubs, your IP address will be detected automatically, but in the event that this fails, you can set it yourself:
/set active_ip 13.33.33.7
manual override, we love a backup plan π«Ά
πͺ NAT and firewalls
If you are behind a NAT or firewall, you have to make sure that the port you configured is somehow allowed and/or forwarded. no port forwarding, no active mode, that's just how it is π€
here's the deets:
- the
"active_port"setting is used for incoming TCP connections and UDP messages - you can configure a different UDP port with the
"active_udp_port"setting - Contrary to many other Direct Connect clients, ncdc only uses a single port for incoming TCP and TLS connections β there is no separate port for TLS π
π the /listen command
The /listen command can tell you which ports it expects to be forwarded, and for which hubs these ports will be used. π
β οΈ it only lists hubs on which you are currently active, so the output will change when you open or close a hub connection. don't be confused bestie, it's just doing its job π
π§ multiple network interfaces
If you have multiple network interfaces, you can force ncdc to use only a single interface by setting the "local_address" setting to the address of that interface. β¨
this affects both:
- outgoing connections β they'll be forced to go through the configured interface
- incoming connections β the ports will be bound to the configured interface
π per-hub settings, the plot twist
All of the previously mentioned settings can be set:
- globally β with
/set - on a per-hub basis β with
/hset
and this is genuinely so good, because it means you can:
- be active on an internet hub and a LAN-only hub at the same time π
- be active in one hub while passive in another π
- use different ports for each hub π
main character energy, honestly. she contains multitudes π
more chapters coming, bestie β don't go anywhere π¦
π¬ INTERACTIVE COMMANDS π¬
okay bestie, here's the full tea on every single command you can type inside ncdc. You can also just run /help to pull up the command list and get to this very documentation. iykyk π«Ά
/accept
Use this one to accept the TLS certificate of a hub. It's only for that one situation where the keyprint of the hub's TLS certificate does not match the keyprint sitting in the database. π
/browse [[-f] <user>]
With no arguments, this pops open a new tab where you can browse your own file list. β οΈ Heads up though: changes you make to your list are not immediately visible in the browser. You've gotta re-open the tab to get the latest version of your list. no shortcuts, sorry π₯²
With arguments, the file list of the specified user gets downloaded (if it hasn't been downloaded already) and the browse tab opens up once it's done. The -f flag forces the file list to be (re-)downloaded. π
/clear
Clears the log showing on your screen. Does not touch the log files in any way. Ctrl+l is a shortcut for this one. β¨
/close
Closes the current tab. When you close a hub tab, you get disconnected from the hub, and all related userlist and PM tabs also get closed. Alt+c is the shortcut. πͺ
/connect [<address>]
Kicks off a connection with a hub. If you don't give an address, it connects to the hub you last used on the current tab. The address should look like protocol://host:port/ or host:port. The :port part is optional in both cases and defaults to :411. These protocols are recognized: dchub, nmdc, nmdcs, adc, adcs. When you're connecting to an nmdcs or adcs hub and the SHA256 keyprint is known, you can attach it to the url as ?kp=SHA256/<base32-encoded-keyprint>. π
Note: this command only works on hub tabs. Want a brand new connection to a hub? You need /open first.
For example:
/open testhub
/connect dchub://dc.some-test-hub.com/
See the /open command for more info. π
/connections
Opens the connections tab. π
/delhub <name>
Removes a hub from the configuration. bye bye π
/disconnect
Disconnects from a hub. that's it, that's the command π
/gc
Cleans up unused data and reorganizes existing data so storage and usage are more efficient. Currently this command removes unused hash data, does a VACUUM on db.sqlite3, removes unused files in inc/ and old files in fl/. π§Ή
This command may take some time to complete, and it will fully block ncdc while it's running. It's recommended you run this every once in a while β every month is a good interval. And note: when ncdc says it's completed this command, it's lying to you. π Ncdc will still run a few large queries in the background, which may take up to a minute to complete.
/grant [-list|<user>]
Grants someone a slot. This lets the user download from you even if you have no free slots. The slot stays granted until you use the /ungrant command β even if ncdc has been restarted in the meantime. π
Want a list of everyone you've granted a slot to? Use /grant with no arguments, or with -list.
Be warned: using/grantwith no arguments on a PM tab will grant the slot to the user you're talking with. Make sure you use-listin that case. π
Note that a granted slot is specific to a single hub. If the same user is also on other hubs, they will not be granted a slot on those hubs. fr fr
/help [<command>|set <key>|keys [<section>]]
Want a list of available commands? /help with no arguments. Want info on a particular command? /help <command>. Want info on a configuration setting? /help set <setting>. Want help on key bindings? /help keys. π
/hset [<key> [<value>]]
Get or set per-hub configuration variables. Works just like /set, but it can only be used on hub tabs. Use /hunset to reset a variable back to its global value. π§
/hunset [<key>]
Resets a per-hub configuration variable back to its global value. β¨
/kick <user>
Kicks a user from the hub. This only works on NMDC hubs, and you need to be an OP to use it. π
/listen
Lists currently opened ports. πͺ
/me <message>
Lets you talk in third person. Most clients will show your message as something like:
** Nick is doing something
Note: this only works correctly on ADC hubs. The NMDC protocol doesn't have this feature, so your message gets sent as-is, including the /me. π
/msg <user> [<message>]
Sends a private message to a user on the currently opened hub. If no message is given, the tab opens but nothing gets sent. π¬
/nick [<nick>]
Alias for /hset nick on hub tabs, and /set nick otherwise. π
/open [-n] [<name>] [<address>]
With no arguments, this lists all hubs known by the current configuration. Otherwise, it opens a new tab to use for a hub. The name is a (short) personal name you use to identify the hub, and it gets used for storing hub-specific configuration. π·οΈ
If you've specified an address, or you've previously connected to a hub from a tab with the same name, /open will automatically connect to the hub. Use the -n flag to disable this behaviour.
See /connect for more info on connecting to a hub. π
/password <password>
Sends a password to the hub without saving it to the database. If you want to log in automatically without typing /password every time, use /hset password <password>.
Be warned: in that case your password will be saved unencrypted. π³π
/pm <user> [<message>]
Alias for /msg. π«Ά
/queue
Opens the download queue. π₯
/quit
Quits ncdc. βοΈ
/reconnect
Reconnects to the hub. When your nick or the hub encoding have been changed, the new settings get used after the reconnect. π
This command can also be used on the main tab, in which case all connected hubs get reconnected.
/refresh [<path>]
Initiates share refresh. No argument means the complete list gets refreshed. Otherwise only the specified directory gets refreshed. The path argument can be either an absolute filesystem path or a virtual path within your share. πΈ
/say <message>
Sends a chat message to the current hub or user. You normally don't have to use /say explicitly β any command not starting with / automatically implies /say <command>. For example, typing hello. in the command line is equivalent to /say hello.. Using /say explicitly is handy for sending a message that starts with / to the chat, like /say /help is what you are looking for. π¬
/search [options] <query>
Performs a file search, opening a new tab with the results. π
Available options:
-hubβ Search the current hub only. (default)-allβ Search all connected hubs, except those withchat_onlyset.-le <s>β Size of the file must be less than <s>.-ge <s>β Size of the file must be larger than <s>.-t <t>β File must be of type <t>. (see below)-tth <h>β TTH root of this file must match <h>.
File sizes (<s> above) accept these suffixes: G (GiB), M (MiB) and K (KiB). π
These file types can be used with the -t option:
anyβ Any file or directory. (default)audioβ Audio files.archiveβ (Compressed) archives.docβ Text documents.exeβ Windows executables.imgβ Image files.videoβ Video files.dirβ Directories.
Note: file type matching is done using file extensions, and it's not very reliable. π
/set [<key> [<value>]]
Get or set global configuration variables. Use it with no arguments to get a list of all global settings and their current values. Glob-style pattern matching on the settings is also possible β use, for example, /set color* to list all color-related settings. π
See /unset to change a setting back to its default, and /hset to manage configuration on a per-hub basis. Changes to the settings are automatically saved to the database, and won't be lost after restarting ncdc. πΎ
To get information on a particular setting, use /help set <key>. π
/share [<name> <path>]
Use /share with no arguments to get a list of shared directories. Called with a name and a path, the path gets added to your share. Note that shell escaping may be used in the name. For example, to add a directory with the name Fun Stuff, you could do:
/share "Fun Stuff" /path/to/fun/stuff
Or:
/share Fun\ Stuff /path/to/fun/stuff
The full path to the directory will not be visible to others β only the name you give it is public. An initial /refresh is done automatically on the added directory. π
/ungrant [<user>]
Revokes a granted slot. π«
/unset [<key>]
Resets a global configuration variable back to its default value. β¨
/unshare [<name>]
To remove a single directory from your share, use /unshare <name>. To remove all directories from your share, use /unshare /. ποΈ
Note: the hash data associated with the removed files will remain in the database. This lets you re-add the files to your share without needing to re-hash them. The downside? The database file may grow fairly large with unneeded information. See the /gc command to clean that up. π§Ή
/userlist
Opens the user list of the currently selected hub. Can also be accessed with Alt+u. π₯
/version
Displays version information. β
/whois <user>
Opens the user list and selects the given user. π
βοΈ SETTINGS βοΈ
Here's the list of configuration settings, bestie. These can be changed and queried using the /set command for global settings and /hset for hub-local settings. All configuration data is stored in the db.sqlite3 file in the session directory. πΎ
active <boolean>
Enables or disables active mode. You may have to configure your router and/or firewall for this to work β see the active_ip and active_port settings for more info. π₯
active_ip <string>
Your public IP address for active mode, bestie. If this isn't set, or it's set to 0.0.0.0 for IPv4 or :: for IPv6, then ncdc will try to automatically get your IP address from the hub. If you do set it manually, it is super important that other clients can reach you using this IP address. If you connect to a hub on the internet, this should be your internet (WAN) IP. Likewise, if you connect to a hub on your LAN, this should be your LAN IP. π
Both an IPv4 and an IPv6 address are set by providing two IP addresses separated with a comma. When unset, 0.0.0.0,:: is assumed. Only the IP version used to connect to the hub is used. That is, if you connect to an IPv6 hub, then the configured IPv6 address is used and the IPv4 address is ignored. No cap.
When set to the special value local, ncdc will automatically get your IP address from the local network interface that is used to connect to the hub. This option should only be used if there is no NAT between you and the hub, because this will give the wrong IP if you are behind a NAT. Periodt.
active_port <integer>
The listen port for incoming connections in active mode. Set to 0 to automatically assign a random port. This setting is by default also used for the UDP port, see the active_tls_port settings to change that. If you are behind a router or firewall, make sure that you have configured it to forward and allow these ports. π₯
active_udp_port <integer>
The listen port for incoming UDP connections in active mode. Defaults to the active_port setting, or to a random number if active_port is not set.
adc_blom <boolean>
Whether to support the BLOM extension on ADC hubs. This may decrease the bandwidth usage on the hub connection, in exchange for a bit of computational overhead. Some hubs require this setting to be enabled. This setting requires a reconnect with the hub to be active. π
autoconnect <boolean>
Set to true to automatically connect to the current hub when ncdc starts up. It's giving "I'm already there" energy. β¨
autorefresh <interval>
The time between automatic file refreshes. Recognized suffices are s for seconds, m for minutes, h for hours and d for days. Set to 0 to disable automatically refreshing the file list. This setting also determines whether ncdc will perform a refresh on startup. See the /refresh command to manually refresh your file list. π¦
backlog <integer>
When opening a hub or PM tab, ncdc can load a certain amount of lines from the log file into the log window. Setting this to a positive value enables this feature and configures the number of lines to load. Note that, while this setting can be set on a per-hub basis, PM windows will use the global value (global.backlog). π
chat_only <boolean>
Set to true to indicate that this hub is only used for chatting. That is, you won't or can't download from it. This setting affects the /search command when it is given the -all option.
color_* <color>
The settings starting with the color_ prefix allow you to change the interface colors. The following is a list of available color settings:
list_defaultβ default item in a listlist_headerβ header of a listlist_selectβ selected item in a listlog_defaultβ default log colorlog_timeβ the time prefix in log messageslog_nickβ default nick colorlog_highlightβ nick color of a highlighted linelog_ownnickβ color of your own nicklog_joinβ color of join messageslog_quitβ color of quit messagesseparatorβ the list separator/footer bartab_activeβ the active tab in the tab listtabprio_lowβ low priority tab notification colortabprio_medβ medium priority tab notification colortabprio_highβ high priority tab notification colortitleβ the title bar
The actual color value can be set with a comma-separated list of color names and/or attributes. The first color in the list is the foreground color, the second color is used for the background. When the fore- or background color is not specified, the default colors of your terminal will be used. The following color names can be used: black, blue, cyan, default, green, magenta, red, white and yellow. The following attributes can be used: bold, blink, reverse and underline. The actual color values displayed by your terminal may vary. Adding the bold attribute usually makes the foreground color appear brighter as well. π
connection <string>
Set your upload speed. This is just an indication for other users in the hub so that they know what speed they can expect when downloading from you. The actual format you can use here may vary, but it is recommended to set it to either a plain number for Mbit/s (e.g. 50 for 50 mbit) or a number with a KiB/s indicator (e.g. 2300 KiB/s). On ADC hubs you must use one of the previously mentioned formats, otherwise no upload speed will be broadcasted. This setting is broadcasted as-is on NMDC hubs, to allow for using old-style connection values (e.g. DSL or Cable) on hubs that require this. π‘
This setting is ignored if upload_rate has been set. If it is, that value is broadcasted instead.
description <string>
A short public description that will be displayed in the user list of a hub. Make it cute, make it you. π
disconnect_offline <boolean>
Automatically disconnect any upload or download transfers when a user leaves the hub, or when you leave the hub. Setting this to true ensures that you are only connected with people who are online on the same hubs as you are. No ghost transfers, bestie. π
download_dir <path>
The directory where finished downloads are moved to. Finished downloads are by default stored in <session directory>/dl/. It is possible to set this to a location that is on a different filesystem than the incoming directory, but doing so is not recommended: ncdc will block when moving the completed files to their final destination. π
download_exclude <regex>
When recursively adding a directory to the download queue β by pressing d on a directory in the file list browser β any item in the selected directory with a name that matches this regular expression will not be added to the download queue. π«
This regex is not checked when adding individual files from either the file list browser or the search results.
download_rate <speed>
Maximum combined transfer rate of all downloads. The total download speed will be limited to this value. The suffixes G, M, and K can be used for GiB/s, MiB/s and KiB/s, respectively. Note that, similar to upload_rate, TCP overhead are not counted towards this limit, so the actual bandwidth usage might be a little higher. π’
download_segment <size>
Minimum segment size to use when requesting file data from another user. Set to 0 to disable segmented downloading.
download_shared <boolean>
Whether to download files which are already present in your share. When this is set to false, adding already shared files results in a UI message instead of adding the file to the download queue. π
download_slots <integer>
Maximum number of simultaneous downloads. Multitasking queen. π
email <string>
Your email address. This will be displayed in the user list of the hub, so only set this if you want it to be public. Privacy check, bestie. π
encoding <string>
The character set/encoding to use for hub and PM messages. This setting is only used on NMDC hubs, ADC always uses UTF-8. Some common values are:
CP1250β Central EuropeCP1251β CyrillicCP1252β Western EuropeISO-8859-7β GreekKOI8-Rβ CyrillicUTF-8β International
filelist_maxage <interval>
The maximum age of a downloaded file list. If a file list was downloaded longer ago than the configured interval, it will be removed from the cache (the fl/ directory) and subsequent requests to open the file list will result in the list being downloaded from the user again. Recognized suffices are s for seconds, m for minutes, h for hours and d for days. Set to 0 to disable the cache altogether. ποΈ
flush_file_cache <none|upload|download|hash>[,...]
Tell the OS to flush the file (disk) cache for file contents read while hashing and/or uploading or written to while downloading. On one hand, this will avoid trashing your disk cache with large files and thus improve the overall responsiveness of your system. On the other hand, ncdc may purge any shared files from the cache, even if they are still used by other applications. In general, it is a good idea to enable this if you also use your system for other things besides ncdc, you share large files (>100MB) and people are not constantly downloading the same file from you. π§
geoip_cc <path>|disabled
Path to the GeoIP2 Country database file (GeoLite2-Country.mmdb), or disabled to disable GeoIP lookups. The database can be downloaded from https://dev.maxmind.com/geoip/geoip2/geolite2/. π
hash_rate <speed>
Maximum file hashing speed. See the download_rate setting for allowed formats for this setting.
hubname <string>
The name of the currently opened hub tab. This is a user-assigned name, and is only used within ncdc itself. This is the same name as given to the /open command. β¨
incoming_dir <path>
The directory where incomplete downloads are stored. This setting can only be changed when the download queue is empty. Also see the download_dir setting.
local_address <string>
Specifies the address of the local network interface to use for connecting to the outside and for accepting incoming connections in active mode. Both an IPv4 and an IPv6 address are set by providing two IP addresses separated with a comma. When unset, 0.0.0.0,:: is assumed. π«Ά
Okay so real quick β if you don't hand over an IPv4 address, 0.0.0.0 just gets added for you automatically. Same energy with IPv6: no address specified? Boom, :: appears on its own. Which one actually gets used depends on the IP version that's actually in play. So like, if you're on an IPv6 hub, ncdc listens on the IPv6 address you gave it. But heads up bestie β even if your hub is on IPv6, ncdc may still try to connect to another client over IPv4, and at that point the socket gets bound to the IPv4 address you configured. Multitasking queen π
log_debug <boolean>β Logs debug messages tostderr.loginside the session directory. Highly recommended if you wanna debug or hack on ncdc, fr fr. But be warned β οΈ β if you're connected to a large hub, this can generate a lot of data.log_downloads <boolean>β Logs downloaded files totransfers.log.log_hubchat <boolean>β Logs the main hub chat. Note: changing this requires any affected hub tabs to be closed and reopened before the change actually kicks in.log_uploads <boolean>β Logs file uploads totransfers.log.max_ul_per_user <integer>β The max number of simultaneous upload connections to one single user.minislots <integer>β Sets how many minislots you've got available. Aminislotis a special little slot that gets used when all your regular upload slots are busy and someone's asking for your filelist or a small file. In that case the other client automatically applies for a minislot, and can still download from you as long as not all minislots are taken. What counts as asmallfile is configurable with theminislot_sizesetting. Also peep theslotsconfiguration setting and the/grantcommand. πminislot_size <integer>β The maximum size of a file that can be downloaded using aminislot, in KiB. See theminislotssetting for the full tea.nick <string>β Your nick, obviously. Nick changes only show up on newly connected hubs, so use the/reconnectcommand if you want your new nick to take effect immediately. Heads up though: it's highly discouraged to change your nick on NMDC hubs. Why? Because clients downloading from you have literally no way of knowing you changed it, so they can't immediately keep downloading from you. Rude to them, honestly. πnotify_bell <disable|low|medium|high>β When enabled, ncdc rings a bell at your terminal when a tab shows a notification. The notification types are:highβ Messages directed to you (PM or highlight in hub chat),mediumβ Regular hub chat,lowβ User joins/quits, new search results, etc.
How a "bell" (or "beep", or "alert", call it whatever you want bestie) actually manifests depends entirely on your terminal. Some setups give you an audible system bell. Some make your terminal window flash or do other annoying little things to grab your attention. And some setups just ignore it completely. π
password <string>β Sets your password for the current hub and enables auto-login on connect. If you just wanna log in to a hub without saving your password, use the/passwordcommand instead. Passwords are saved unencrypted in the config file β no cap, keep that in mind.reconnect_timeout <interval>β How long to wait before automatically reconnecting to a hub. Set it to0to disable automatic reconnect.sendfile <boolean>β Whether or not to use thesendfile()system call to upload files, if it's supported. Usingsendfile()means less resource usage while uploading, but it may not work well on all systems. YMMV β¨share_emptydirs <boolean>β Share empty directories. When disabled (which is the default), empty directories in your share won't be visible to others. This also affects empty directories that contain only empty directories, and so on and so forth. A file list refresh is required for this setting to actually take effect.share_exclude <regex>β Any file or directory whose name matches this regular expression won't be shared. A file list refresh is required for this setting to take effect.share_hidden <boolean>β Whether to share hidden files and directories. Ahiddenfile or directory is one whose file name starts with a dot (like.bashrc). A file list refresh is required for this setting to take effect.share_symlinks <boolean>β Whether to follow symlinks in shared directories. When disabled (the default), ncdc will never share any files outside the directory you specified. When enabled, any symlinks in your shared directories get followed β even when they point to a directory outside your share. πshow_free_slots <boolean>β When set to true,[n sl]gets prepended to your description, wherenis the number of currently available upload slots.show_joinquit <boolean>β Whether to display join/quit messages in the hub chat.slots <integer>β The number of upload slots. This is basically what decides how many people can download from you at the same time. It is possible for this limit to get exceeded in certain circumstances β see theminislotssetting and the/grantcommand.sudp_policy <disabled|allow|prefer>β Sets the policy for sending or receiving encrypted UDP search results. Set it todisabledand all UDP search results get sent and received in plain text. Set it toallowto let ncdc reply with encrypted search results if the other client asked for it.preferwill also make ncdc itself request encryption.
Note: no matter what this is set to, encrypted UDP search results are only used on ADCS hubs. They'll never be sent on NMDC or non-TLS ADC hubs. And also β even if you set this to prefer, encryption is still only used when the client on the other side of the connection supports it too. It takes two to tango, bestie. π«Ά
tls_policy <disabled|allow|prefer|force>β Sets the policy for secure client-to-client connections. Setting it todisableddisables TLS support for client connections, but you can still connect to TLS-enabled hubs.allowwill allow the use of TLS if the other client requests it, but ncdc itself won't request TLS when connecting to others.prefertells ncdc to request TLS when connecting to others. And setting it toforcewill disallow non-TLS connections entirely, plus it requires that the hub connection itself is TLS.
Using TLS for client connections usually results in less optimal performance when uploading and downloading, but it's quite effective at avoiding the protocol-specific traffic shaping some ISPs like to do. π‘οΈ
tls_priority <string>β Sets the GnuTLS priority string used for all TLS-enabled connections. See the "Priority strings" section in the GnuTLS manual for details on what this does and how it works. Currently it is not possible to set a different priority string for different types of connections (like hub vs. incoming/outgoing client connections). One string to rule them all, I guess. πui_time_format <string>β The format of the time displayed in the lower-left of the screen. Set it to-to not display a time at all. The string gets passed to the Glibg_date_time_format()function, which accepts roughly the same formats asstrftime(). Check out the strftime(3) man page or the Glib documentation for more info. Note: this setting does not influence the date/time format used in other places, like the chat window or log files.upload_rate <speed>β Maximum combined transfer rate of all uploads. See thedownload_ratesetting for more info on rate limiting. Note: this setting also overrides anyconnectionsetting.
β¨ KEY BINDINGS β¨
Okay so bestie, if you're on any tab that doesn't have a text input line, you can just smash ? and it'll spill all the key bindings for that exact tab. Iconic. You can also get the whole list with the /help keys command, and I'm literally reproducing it below so you don't even have to ask. π
π Global key bindings
Alt+jβ Open previous tab.Alt+kβ Open next tab.Alt+hβ Move current tab left.Alt+lβ Move current tab right.Alt+aβ Move tab with recent activity.Alt+<num>β Open tab with number<num>.Alt+cβ Close current tab.Alt+nβ Open the connections tab.Alt+qβ Open the download queue tab.Alt+oβ Open own file list.Alt+rβ Refresh file list.
π Keys for tabs with a log window:
Ctrl+lβ Clear current log window.PgUpβ Scroll the log backward.PgDownβ Scroll the log forward.
β¨οΈ Keys for tabs with a text input line:
Left/Rightβ Move cursor one character left or right.End/Homeβ Move cursor to the end / start of the line.Up/Downβ Scroll through the command history.Tabβ Auto-complete current command, nick or argument.Alt+bβ Move cursor one word backward.Alt+fβ Move cursor one word forward.Backspaceβ Delete character before cursor.Deleteβ Delete character under cursor.Ctrl+wβ Delete to previous space.Alt+dβ Delete to next space.Ctrl+kβ Delete everything after cursor.Ctrl+uβ Delete entire line.
π File browser
Up/Downβ Select one item up/down.k/jβ Select one item up/down.PgUp/PgDownβ Select one page of items up/down.End/Homeβ Select last/first item in the list./β Start incremental regex search (press Return to stop editing).,/.β Search next / previous.Right/lβ Open selected directory.Left/hβ Open parent directory.tβ Toggle sorting directories before files.uβ Toggle sorting unknown files before files existing locally.sβ Order by file size.nβ Order by file name.dβ Add selected file/directory to the download queue.mβ Match selected item with the download queue.Mβ Match entire file list with the download queue.aβ Search for alternative download sources.
π Connection list
Up/Downβ Select one item up/down.k/jβ Select one item up/down.PgUp/PgDownβ Select one page of items up/down.End/Homeβ Select last/first item in the list.dβ Disconnect selected connection.i/Returnβ Toggle information box.fβ Find user in user list.mβ Send a PM to the selected user.qβ Find file in download queue.b/Bβ Browse the selected user's list,Bto force a redownload.
π₯ Download queue
Up/Downβ Select one item up/down.k/jβ Select one item up/down.PgUp/PgDownβ Select one page of items up/down.End/Homeβ Select last/first item in the list.K/Jβ Select one user up/down.fβ Find user in user list.cβ Find connection in the connection list.aβ Search for alternative download sources.dβ Remove selected file from the queue.+/-β Increase/decrease priority.i/Returnβ Toggle user list.rβ Remove selected user for this file.Rβ Remove selected user from all files in the download queue.xβ Clear error state for the selected user for this file.Xβ Clear error state for the selected user for all files.
π Note: when an item in the queue hasERRindicated in the priority column, you have two choices: You can remove the item from the queue usingd, or attempt to continue the download by increasing its priority using+.
π Search results tab
Up/Downβ Select one item up/down.k/jβ Select one item up/down.PgUp/PgDownβ Select one page of items up/down.End/Homeβ Select last/first item in the list.fβ Find user in user list.b/Bβ Browse the selected user's list,Bto force a redownload.dβ Add selected file to the download queue.hβ Toggle hub column visibility.uβ Order by username.sβ Order by file size.lβ Order by free slots.nβ Order by file name.mβ Match selected item with the download queue.Mβ Match all search results with the download queue.qβ Match selected users' list with the download queue.Qβ Match all matched users' lists with the download queue.aβ Search for alternative download sources.
π€ User list tab
Up/Downβ Select one item up/down.k/jβ Select one item up/down.PgUp/PgDownβ Select one page of items up/down.End/Homeβ Select last/first item in the list./β Start incremental regex search (press Return to stop editing).,/.β Search next / previous.oβ Toggle sorting OPs before others.s/Sβ Order by share size.u/Uβ Order by username.t/Tβ Toggle visibility / order by tag column.e/Eβ Toggle visibility / order by email column.c/Cβ Toggle visibility / order by connection column.p/Pβ Toggle visibility / order by IP column.i/Returnβ Toggle information box.mβ Send a PM to the selected user.gβ Grant a slot to the selected user.b/Bβ Browse the selected users' list,Bto force a redownload.qβ Match selected users' list with the download queue.
π€ WEIRD UI FLAGS
Some listings have a little flags display, and honestly their meaning might not be giving what you think it's giving. Let's decode. π΅οΈββοΈ
π File status
You might see one-letter flags to the left of file names in search results and file list tabs. Here's the tea:
Hβ The file had been added to the file list, but has not been hashed yet and thus is not visible to others. This flag can appear only when browsing your own list. πSβ The file is already in your share. If"download_shared"is set to"false", trying to download it will result only in an informational message. This flag never appears when browsing your own file list. π«ΆQβ The file is currently in your download queue. Trying to download it will result only in an informational message. π₯
π Connection flags
On the connection list window, there are two flags:
Sβ Connection state, can be eitherConnecting,Handshake,Idle,Downloading,Uploadingor-for disconnected. πtβ This means that the connection is encrypted with TLS. π
π₯ User flags
The user list has some flags too:
oβ Set if the user is an operator in the hub. πpβ When the user is passive. If this flag is not set, the user is active. π€tβ Set if connections with this user will be encrypted with TLS. π
π± ENVIRONMENT
$NCDC_DIR is used to determine the session dir, it is only honoured if -c is not set on the command line. So like, if you're passing -c, this env var is lowkey ignored, periodt. π
π FILES πΎ
okay bestie, so here's where ncdc keeps all its stuff. $NCDC_DIR is literally just the session dir β the one you set with -c, or the env var $NCDC_DIR, or it defaults to $HOME/.ncdc. pick your fighter β¨
$NCDC_DIR/cert/β where your client certificates live. It has to contain a private key file (client.key) and a public certificate (client.crt). Good news: these get generated automatically the very first time ncdc starts up, so don't stress. π$NCDC_DIR/db.sqlite3β the database, bestie. It stores all the configuration variables, hash data of shared files, download queue information and other state info. Technically you can hand-edit it with thesqlite3commandline toolβ¦ but it's discouraged, fr fr. Any changes you make while ncdc is running won't be read, and ncdc might literally just overwrite them. π$NCDC_DIR/dl/β where completed downloads get moved to by default. You can change this with the"download_dir"configuration option.$NCDC_DIR/files.xml.bz2β the filelist, containing a listing of all your shared files. iconic.$NCDC_DIR/fl/β where downloaded file lists from other users are stored. The file names are hex-encoded user IDs that ncdc uses internally. Old file lists get deleted automatically after a configurable interval β check the"filelist_maxage"configuration option for that. π¦$NCDC_DIR/historyβ your command history. all your greatest hits π$NCDC_DIR/inc/β default location for incomplete downloads. Changeable with the"incoming_dir"setting. The file names in here are the base32-encoded TTH root of the completed file.$NCDC_DIR/logs/β where all the log files go. File names starting with#are hub logs and~are user (PM) logs. The special ones aretransfers.logandmain.log.
heads up, bestie: ncdc does not have built-in functionality to rotate or compress log files automatically. So when you rotate log files manually (like via a cron job, iykyk), make sure you send the SIGUSR1 signal afterwards to force ncdc to flush the old logs and create or open the new log files. no cap.
$NCDC_DIR/stderr.logβ the error/debug log. This file gets cleared every single time ncdc starts up. fresh start energy β¨$NCDC_DIR/versionβ the version of the data directory. This file is locked while an ncdc instance is running, which makes sure no two ncdc instances ever work with the same session directory at the same time. mutual exclusivity slay π
π Format of transfers.log π
Uploads and downloads get logged in the transfers.log file. Transfers are separated by a newline (0x0a). Each log line has the following fields, separated by a space:
- Date/time when the transfer ended, formatted as
"[YYYY-MM-DD HH:MM:SS ZONE]", - Hub name, including the
"#"prefix, - Base32-encoded CID of the other user for ADC transfers, or a
-for NMDC, - User name (escaped),
- IPv4 or IPv6 address,
- Direction,
"u"for upload or"d"for download, - Whether the transfer completed successfully (
"c") or has been interrupted/disconnected before all requested file data has been transferred ("i"), - Base32-encoded TTH of the transferred file, or
-for"files.xml.bz2", - Total transfer time, in seconds,
- File size, in bytes,
- File offset, in bytes,
- Transfer size, in bytes,
- File path (escaped). Absolute virtual path for uploads, destination path for downloads.
All fields are encoded in UTF-8. Fields that may contain a space or newline are escaped as follows: a space is escaped as "\s", a newline as "\n" and a backslash as "\\". The timestamp is not escaped. π
Many clients download files in separate (smallish) chunks. Ncdc makes no attempt to combine multiple chunk requests in a single log entry, so you may see the same uploaded file several times with a different file offset. don't be confused bestie, that's just how it is π«Ά
π LICENSE π
Copyright (C) Yoran Heling <projects@yorhel.nl>
ncdc is distributed under the MIT license, please read the COPYING file for more information. β¨
π BUGS π
Please report bugs or feature requests to the bug tracker or the mailing list. Both can be found on the ncdc homepage at <https://dev.yorhel.nl/ncdc>. There's also an ADC hub available at "adc://dc.blicky.net:2780/" for general support and discussions. come hang out π«Ά
π AUTHOR π
ncdc is written by Yoran Heling <projects@yorhel.nl>
Web: <https://dev.yorhel.nl/ncdc>
and that's the whole page, bestie!! you made it to the end, main character energy fr fr π
this is ncdc version ncdc-1.24.1, dated 2024-07-18, and it lives in section NCDC(1) of the manual β go slay some downloads π¦β¨π
π¦ where this page comes from
- fedora 43: ncdc 1.24.1-2.fc43 Β· MIT
- fedora 44: ncdc 1.24.1-3.fc44 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms