Configuration
The hub is configured using one main configuration file, and a access control list file (ACL). The configuration file usually resides in /etc/uhub/uhub.conf, the location of the ACL is configured in this.
Sample configuration files are included in the tar-balls available from the download page.
Configuration directives
General
| directive | type | default | description |
|---|---|---|---|
| hub_name | string | uhub | Specifies the name of the hub as sent to clients. |
| hub_description | string | "" | Specifies the description of the hub as sent to clients. |
| max_users | number | 500 | The maximum amount of users allowed on the hub. |
| show_banner | boolean | yes | If enabled, the software version will be announced to clients after login. |
| registered_users_only | boolean | no | If enabled, only registered users can log in to the hub. |
| chat_only | boolean | no | If enabled, only chat messages are allowed relayed through the hub. |
| file_motd | file | "" | Specify a file containing a message of the day (motd). This will be sent to all clients after login. |
| file_acl | file | "" | Specify a file containing the access control list (ACL) file. See below for details. |
Networking
| directive | type | default | description |
|---|---|---|---|
| server_bind_addr | string | any | Specify the IP address the local hub should bind to. This can be either an IPv6 or IPv4 address, "any" or "loopback". The latter will automatically detect if IPv6 and setup listening on IPv6 (this includes IPv4). |
| server_port | number | 1511 | Specify the port for the hub to bind to. Must be 1-65535, ports below 1024 requires root access. |
| max_recv_buffer | number | 4096 | Maximum receive buffer allowed before commands are procesed. If a single ADC message exceeds this limit, it will be discarded by the hub. |
| max_send_buffer | number | 16384 | Maximum amount of bytes allowed to be queued for sending to any particular user before the hub will disconnect the user. The lower the limit, the more aggressive the hub will be to disconnect slow clients. |
| max_send_buffer_soft | number | 8192 | Low priority messages may be discarded if this limit is reached. |
Limitations
Note: Setting these to 0 will disable the limitation.| directive | type | default | description |
|---|---|---|---|
| limit_max_hubs_user | number | 10 | Limit the number of hubs a client can be logged into as a user. |
| limit_max_hubs_reg | number | 10 | Limit the number of hubs a client can be logged into as a registered user. |
| limit_max_hubs_op | number | 10 | Limit the number of hubs a client can be logged into as a operator. |
| limit_max_hubs | number | 25 | Limit the number of hubs a client can be logged into in total. |
| limit_min_share | number | 0 | Minimum share limit in megabytes (MiB). |
| limit_max_share | number | 0 | Maximum share limit in megabytes (MiB). |
| limit_min_slots | number | 0 | Minimum number of upload slots required. |
| limit_max_slots | number | 0 | Maximum number of upload slots allowed. |
ACL directives
| directive | argument | description |
|---|---|---|
| user_admin | username:password | This specifies an administrator user. An administrator has full access to configure the hub, in addition to operator privileges. |
| user_op | username:password | This specifies a operator user. An operator can kick and ban users from the hub. |
| user_reg | username:password | This specifies a registered user. A registered user has no particular privileges, except the username is protected by password, and is able to log in to a hub for registered users only. |
| deny_nick | username | This specifies a bad username. Any user identifying with this particular user name is denied access. Example of such bad names can be "Administrator", "root", "Hub-Security", etc. |
| ban_nick | username | This specifies a user banned by the nickname. The difference between this and "deny_nick" is the message the user receives when trying to log in. |
| ban_cid | cid | This specifies a user banned by CID (client ID). The CID is a 39 byte base32-encoded identifier unique to every user. |
| deny_ip | ip range/mask | This directive allows the hub to deny access to users coming from certain IP addresses. This can be specified as IP-address ranges or IP-addresses with a bitmask. Example: "192.168.0.1-192.168.0.255" or "192.168.0.0/24" (these are equivalent). |