back

eXport-it Server usage

Starting the server

On the title line, you have on the left the server name and the URL to access this server. Using it with a Web browser, give the default home page which is just a table with all files exported by the server. On the right side of the title line, is the external URL to use if you are connected to Internet by an ADSL router supporting "port aliasing". Initially the external port alias is set to zero, and you are not accessible through an Internet Gateway. If you change this value to a number between 1024 and 65535, the server will try to set it up by UPnP with a lease time of 24 hours . I am not sure it will work with all Internet Gateways. Don't hesitate to report problems (by e-mail) documented with the XML presentation text of your Internet Gateway. You can configure your router manually as explained below, if UPnP doesn't work.

When you start eXport-it server application, it starts automatically a long running UPnP service including the media and HTTP servers. This service gives a small icon on the Android desktop when running. By default, all your video, audio, image and eBook files are exported. To get file lists up to date, a mediascanner can be invoked at server startup, because Android updates only its media files database when file systems are mounted. This scan process can be long if you have big SD cards with many many files. An option (called simply "scan") permits to enable or disable this feature to avoid long delay at server start-up.

The default server name is "eXport-it", but if you have more than one server on a Wifi network, it looks better to change at least one of the names.

Hotspot

In place to use your device settings, you can configure a Wifi HotSpot just clicking on the top right corner icon. If the WRITE_SETTINGS permission is not yet given to this application, you should be prompted to give it. Then you can give an network SSID name and define a password key to configure this new network in the device settinngs. This network is automatically activated and the server is configured.

Clicking on configure button:



With the configuration dialog window, you can change the font size set by default to adapt it depending on your screen density and dimension: 1 is for 8sp character size, 2 for 10sp, ... till 6 for 18sp. "0" is undefined (it should give 10sp). This text size is used for all eXport-it windows including the help.

You have also the choice to change the default language (taken from system set-up if the language is known by eXport-it), but it is not totally dynamic, you must save the config and go back to the server main window to set the change effective. As for other changes, a stop and start of the service is required to adapt the web pages and messages to the new language setting.

It looks better to set a real server name than to keep the default. You can also adapt the port numbers to what you want, the media server port can be "0" (ephemeral) but I prefer to define one for debugging purpose. The alias depends on your ADSL router configuration and if you want to publish your files on the public Internet or not.

The "max line number" parameter permits to limit the number of lines in file lists, splitting the total list in smaller elements, to avoid scrolling a too large list. This value is also applied on the Web page.

About the TCP buffer size, the default of 64 KB, looks good for streaming audio and video on the Wifi network. If you have a lot of retransmissions, you should reduce this size. If your network is good and you need to stream very high definition movies, you can try to increase it. A change of one of these parameters, requires to stop and start the service after saving the new configuration.

It is not always the best to set up too large TCP buffers. My Blu Ray reader prefers 8 or 16 Kb, than higher. You can define in addition, the number of buffers you want to send at once. This setup depends on your network, devices and the files you want to transmit, the results are not easily analyzed.

If you have the technical background you can define your own "default home page" for the HTTP server (both internal and external). This file must be called "index.html" and must be somewhere on the Android file system (SD card?). You have also the choice to keep the default table in appendix or not.

By default we use self-signed SSL certificate for HTTPS connection, but in this case you are getting some error messages depending on the Web browser you are using. Disabling this option permits to use signed certificates like the normal HTTPS servers. They are still dynamically built at server startup. But the use of signed certificates requires to add a Certificate Authority in the web browser configuration. You must add the CA root certificate and the CA Intermediate certificate. These public key certificates are into the "assets" directory included in the application itself and on www.ddcs.re web site. You can get these files locally on your Wifi network from your server using URLs like http://192.168.1.47:8192/assets/export-it-1.crt and export-it-2.crt when simple HTTP is available. Otherwise you must install these certificates via http://www.ddcs.re/export-it-1.crt and export-it-2.crt over Internet.

And finally, you can change the CSS profile of the Web page for getting other colors and appearance.

When saving the configuration, you must get a message prompt saying it is saved, before going back to the main page. You must stop and start the service for setting up the changes related to the server sockets like port numbers, TCP buffer size, and UPnP server name, but most of the changes are dynamic like the language, HTTP server name, the user's definitions and categories, and the file lists...

You have two buttons at the end of the configuration page, the first to take a backup of the database, not the file lists, but the parameters like the server name, font size, the user's definitions including the categories, and all the comments. The second button permits to restore a backup in the database. Use it with caution, taking backups after changes, but restore the database only if needed. This option permits to distribute a configuration to different servers, but the comments on file level can only work if the file is found with the same fully qualified path.

You can activate the club option just giving a small message and an image for describing your server. This option works only when on Wifi with port forwarding enabled and if authentication is configured with at least one username and password. In this way, your server will be accessible externally on www.ddcs.re. To test your own server requires the use of a Web proxy server.

Configuration Page 2: Files selection and categories


On the page 2, is the file selection and their category setting (see below about authentication). Do you want to export everything or just a few files? The checkbox permits to unselect files, to avoid their distribution by UPnP. You can also set their category names related to authentication over HTTPS. After modifications, you must save your changes and they are active a few seconds later.

Configuring HTTPS and user authentication


By default the HTTPS port number is set to 0, and there is no HTTPS server. To use HTTPS you must give a value between 1024 and 65535 to this port number. If HTTPS is activated, it is really used outside the Wifi network, because UPnP requires HTTP over the local network, but you can test HTTPS locally, using an URL with "https:", the Wifi IP address, and a ":" followed by the HTTPS port number like "https://192.168.1.47:8193".

The default port alias is zero to signify that no alias port is used. If you need this functionality on your home network, you can set a value between 1024 and 65535, and after saving the configuration, you must check the result on the status line of the main screen. The application tries to configure it by UPnP on the Internet Gateway.. If it can not be configured by UPnP, you must configure an alias directly in your ADSL router linked to the HTTPS port if it is activated, or for the HTTP port without HTTPS.

If you are connected on a Wifi network or on Mobile network appears in the middle of the title line. When on mobile network only HTTP/HTTPS protocol can be used, and the best is to use HTTPS with authentication to protect your data.

Initially you can only use authentication under HTTPS, but now in HTTP the password is also crypted.

To enable authentication, you must set at least one user name, password and associate minimum one category to this name.

To create a user name, you must introduce one in the text field, make the choice of a category, and set twice the same password before clicking on the add button. You can create different user names in the different categories. A small message text appears just above the save button to help you in your definitions.

Before leaving, don't forget to save your definitions clicking on the save button and a message must say it is done.

I define by default three categories, their names are not really important but there is a sequence in these categories. The "owner" category can access all files, the "family" category covers all the "friends" categories in addition to files in this category, and the "friends" categories are more specific. You can modify the category names, selecting one category, just giving a new name in the entry field, and pressing the "modify" button. You can create additional "friends" categories with different names, giving a new name in the entry field and clicking the "add" button. Only people with a user name can use their Web browser to read your files (no write access), because there is no anonymous access if you define one user name. By default all files are in the "owner" category. When defining a new user name, you must select at least one category.

To simplify definitions if you have a lot of files, a "default" name exists, to set up the category for new files (new video, photos, ..). A second system name is related to the UPnP server, setting the UPnP server on family or friends category, permits to limit the files distributed in UPnP.

In the background (long running service)

When the server is started, it runs in the background as an Android service, showing a notification icon on the android status bar. This service contains different programs: the media server with its UPnP Directory Content Server and a small UPnP Connection Manager, and the HTTP server. Both are required up and running to provide the service to clients.

The HTTP server defines at startup an initial "home page" which just a list (a table) of the files exported by this server, the first column permits to play (HTTP get) the file, the second (HTTP post in binary mode) to download it, the third column gives in text mode, the URL of the file (for copy/past it when preparing your own HTML page). In addition, the HTTP server has a very simple OPDS catalog for the local eBooks (this catalog is just a list of the selected files, there is no summary of the book or information about the author)...

For controlling the server, you can use the eXport-it client or a Web browser pointing it to the URL as given in the first page of the "server" window, something like http://192.168.1.47:8192. For checking the OPDS catalog, you must use the same URL but with "/opds" (http://192.168.1.47:8192/opds), or from Internet the "external" URL if your ADSL router is configured for "port aliasing".

Configuring port forwarding

This parameter is only for people using a home (Wifi) network with a router connected to Internet. It is not used when using the mobile network (if the parameter is coded it is only used when the device is connected on Wifi network).

An Internet gateway has at least one external IP address and one on the Wifi network and perhaps still one or more on ethernet. The configuration of port forwarding on a router is dynamic and does not cut the service. You have just to add an alias in a table. Each application uses at least one port number (less than 65535). If the port number you wanted is already defined you have just to use another.

eXportit like all HTTP servers, uses TCP protocol. The default port numbers used by this HTTP server are 8192 for HTTP and 8193 for HTTPS but you can modify these numbers in the configuration. If you set the HTTPS port as zero, this protocol is disabled.

On my router, I defined with name "HTTP2" an external port number of 8080 to forward to 192.168.1.47 (the IP address of my Android tablet on the Wifi network) with port 8192, and with name "exportit" the port 4343 to forward to 192.168.1.47 and port 8193.

configuring port forwarding

When I want that the eXportit server to be accessible from Internet, I have to configure the "External port number" in the configuration, to be 4343. This permits to configure automatically an external HTML Page with the external IP address and this alias port number 4343.

To disable remote use of your web page, you have just to reconfigure the server with an "external port number" of zero and the HTML page will be configured with a wrong port number and not usable. In fact all requests sent externally to 4343 are forwarded to the HTTPS server on port 8193, but the server will send back the login page with URLs pointing to port 8193 which is NOT accessible on Internet. You can see these requests in your HTTP log on the eXport-it server window. In addition, your external IP address is, in most of the cases, changed every day.

If you want to use the simple HTTP over Internet to get better performances than with HTTPS but without security, you have just to set the HTTPS port to zero, and the "external port number" to be 8080. You avoid to configure the router very often with such a configuration.

If your ADSL box has a firewall, don't forget to permit these TCP ports to be used from Internet. configuring port forwarding

Easily trying your port forwarding configuration

You can test this setting from your Wifi network using a public Web proxy with javascript support like www.faceofliberty.com, to connect to your external URL with your external IP address and port alias...

You can by this way, test the login and check all the pages, unfortunately it is not possible to listen to music, or to look at series of images. Only direct clicks on files are usable due to Web proxy environment.

Video subtitles

The video subtitle files are distributed by UPnP (.srt, .sub and .vtt)... The .srt can be shown on UPnp client video player, but currently there is no user interface to enable/disable it and no choice in a list of subtitles by language... Only the first .srt subtitle is shown. For that the subtitle file name must start as the video file name (it could be completed with "- en" for English, "- de" for German, ... or any other suffix before .srt). With the HTTP server it also feasible to show .vtt subtitles, their file names must also start with the video file name but can have any suffix before .vtt). The Playr HTML5 video player permits to make choice on the subtitle files...

back