Configuration file
During normal operation, the daemon stores all user actions and does not require a configuration file at every launch. Configuration file can be used for daemon reinitialization (all settings are reset and default ones are imported from the config). An example configuration file is included in the product package as ftvusbnet.conf.
To reinitialize the daemon, start it with -i option:
$ sudo /opt/ftvusbnet/sbin/ftvusbnetd -i ftvusbnet.conf
Alternatively, you can use command line utility:
$ /opt/ftvusbnet/bin/ftvusbnetctl import ftvusbnet.conf
To export current daemon settings to the configuration file:
$ /opt/ftvusbnet/bin/ftvusbnetctl export ftvusbnet.conf
Example configuration file:
# # This is the default configuration file for FabulaTech USB over Network Client. # # The following properties change the behavior of the client: logging, ssl options, # callback, server and device declaration. # # # Configuration description. # # log [debug|info|warning| error] [file path | syslog] # ssl [require] [trusted path] [checkCN] [key path cert path] # callback ip|*[:port] [password secret] [confirm UI|script path] # by default, no password, no confirmation # server ip[:port] [auto|manual] [password secret] [ssl no|require] # server ip|* callback [password secret] [ssl no|require] # device [auto|manual] [hwid vendor[:product[:revision]]] [class class[:subclass[:protocol]]] [serial string] [port N] [password secret] [exec [user:]path] # log - configure logging # debug|info|warning|error - log level # file path - log to file. # syslog - log to system syslog. # # ssl - configure SSL # require - requires server to switch to SSL. Close connection if server doesn't support SSL. # trusted path - root/intermediate certificates in PEM format. # checkCN - check server's CommonName field from certificate to be the same as server's address. # key path - key for client authentication in PEM format. # cert path - client's certificate for authentication in PEM format. # # callback - configure callback connection # ip|* - IP address to listen for incoming connections. * - listen on all interfaces. # port - TCP port for incoming connections. By default, 33001 is used. # password secret - if specified, server must provide password to establish connection. # confirm UI - confirm incoming connection via UI's dialog. # confirm script path - confirm incoming connection via shell script. $1 argument - IP address on the peer. Shell script exits with exit code 0 - connection is allowed. Otherwise, it isn't allowed. # if confirm is not specified, connection doesn't require confirmation. # # server - server declaration. ``device'' directives below server belong to this server. # ip|* - IP address of the server to connect to. * is used only in callback server, means default server configuration for callback servers. # port - TCP port of the server. Not used for callback servers. By default, 33000 is used. # auto - (default) connect to server automatically. # manual - connect to server manually. It doesn't reconnect after restart of the daemon. But it reconnects if the connection is broken. # callback - specifies settings for specific callback server. # password secret - client provides password to establish connection with the server. # ssl no - SSL is not required for the connection. # ssl require - SSL is required for the connection. # # device - device declaration. # auto - (default) connect the device automatically as soon as connection to the server is established. # manual - connect device manually by means of CLI or UI. # hwid vendor[:product[:revision]]] - device specification. # class class[:subclass[:protocol]] - USB device class. Make specification more precise. # serial string - USB device serial number. Make specification even more precise. # port N - connect USB device into specified local virtual port. # password secret - client provides password to connect the device. # exec [user:] path - execute script (under user or root, if it's not specified). Script has the following arguments: $1 - "plug" or "unplug", $2 - hub number, $3 - device ID, $4 - port. # # Here are some examples. Uncomment to change the behavior. # # log debug file /var/log/ftvusbsrvd.log # callback *:33001 # # server 192.168.1.1 # device # connect all devices # # server 192.168.1.2:33010 # device manual hwid 05ac:8511 # Apple FaceTime HD Camera # device # connect all devices # # server 192.168.1.105 callback password SeCrEt_WOrd # device # connect all devices