Personal cloud storage: a public network access platform built using Cpolar and a minimalist file manager

1 Introduction

File sharing and viewing are the most common application scenarios on the Internet today, so a large number of applications have been produced. The functions of these applications are similar, but the installation and deployment processes are very different. However, for users, it is best to achieve the most comprehensive file upload and download functions with the simplest installation process. Today, the author will introduce to you a PHP file management tool with only two files, Tiny File Manager, and use the data tunnel generated by cpolar to publish it to the public Internet, so that we can access it at home from anywhere (office) computer files.

2.Tiny File Manager website construction

Tiny File Manager is a web-based open source small file manager. It is as simple as only two files, but it can support uploading and downloading, multi-user login, multiple languages, online compression and decompression, etc. The only thing it needs is , which is php5.5+.

2.1.Tiny file manager download and installation

First, we download a Tiny File Manager software. The software download address is on github (https://github.com/prasathmani/tinyfilemanager). After the download is complete, you can unzip the downloaded compressed file and paste the two files into the root directory of the website. The author is using the phpstudy web environment, so it is placed in the www folder under the phpstudy installation folder (in the same way, it can also be placed in the website root directory of other environment software, such as wamp, pagoda panel, etc.).

img

img

Next, change the file name of tinyfilemanager.php to index.php. Then enter the address localhost in the browser, and you will see the installation interface of Tiny File Manager.

img

After pasting the website file into the www folder and modifying the file name, you can enter the address in the browser to access localhost (the default phpstudy output port is 80, we can change the output port by creating a new web page).

2.2 Tiny file manager web page test

As long as the web page settings are correct, you can enter the tinyfilemanager web page.

img

Generally speaking, there are two default accounts of Tiny File Manager, namely admin and user. The specific login names and passwords are: admin/admin@123 and user/12345.

2.2 Tiny file manager web page test

Once you've finished installing the Tiny File Manager website, you can start creating a public Internet address for it. Here we use cpolar to complete the work of creating a public Internet address.

We can find the cpolar software download on cpolar’s ​​official website (www.cpolar.com). The author is using the Windows operating system, so I downloaded the Windows version of cpolar directly.

img

img

After the Cpolar software is downloaded, decompress the downloaded compressed package and double-click the decompressed .msi file to enter the automatic installation program. We only need to click "Next" all the way.

img

img

Since cpolar will establish a separate data tunnel for each user and ensure the data security of each user through the user password and the token code generated individually by the user, we also need to register our own account on the official website. The registration procedure is also very simple. Just click "User Registration" on the upper right side of the official website to enter the new user registration interface.

img

img

After completing the above installation and registration work, we can officially enter the public Internet publishing work of the local Tiny File Manager.

3. Local web page publishing

After installing and registering cpolar, the rest of the work is very simple. Just use cpolar to establish a data tunnel, connect the entrance of the data tunnel generated by cpolar to the tiny file manager web port of the local computer, and you can generate a dedicated file for the tiny file. The manager's intranet penetrates the data tunnel, allowing us to access the local tiny file manager web page on the public Internet.

Since file sharing requires stability and long-term performance, it is necessary to upgrade cpolar to the VIP version (the free version of cpolar can also create data tunnels, but the created data tunnels will be reset every 24 hours) so that they can remain stable for a long time. data tunnel to avoid the trouble of setting up a data tunnel every day.

3.1 Cpolar cloud settings

After upgrading cpolar to VIP, we first log in to the cpolar cloud, find the "Reserve" button on the left side of the customer's main interface, click to enter the reservation page, and find the "Reserve Secondary Subdomain Name" field

img

In the "Reserved second-level subdomain name" field, you need to make several simple settings of information, namely:

"Region" (the area where the server is located, just select the nearest one)

"Second-level domain name" (will eventually appear in the generated public Internet address as one of the identifiers of the network address)

"Description" (can be regarded as a description of this data tunnel, as long as it can be distinguished from other tunnels).

After completing these settings, you can click the "Reserve" button on the right to retain this data tunnel.

img

img

Of course, if you no longer plan to use this data tunnel, you can click the "x" on the right to delete it easily to save valuable data tunnel quota.

3.2 Cpolar local settings

After completing the settings of cpolar cloud, half of the data tunnel that can penetrate the LAN is completed. Next, we return to the local computer and log in to the cpolar client (you can enter localhost:9200 in the browser, or click the cpolar shortcut in the start menu)

img

After entering the cpolar client, click the "Create Tunnel" button under the "Tunnel Management" item on the left side of the client's main interface to enter the local tunnel creation page (if you want to create a temporary data tunnel, you can set it directly here without cpolar The official website sets up a blank data tunnel).

On the tunnel creation page, we also need to set several information, including:

Tunnel name – can be regarded as cpolar’s ​​local tunnel information annotation, as long as it is easy to distinguish;

Protocol – Since the output of tiny file manager is a web page, the http protocol is selected here;

Local address – The local address is the output port number of the tiny file manager, so fill in the default port number 80 here;

Domain name type – Since we have reserved the data tunnel of the second-level subdomain name in the cpolar cloud and generated the public Internet second-level domain name of the tiny file manager, here we check the “secondary subdomain name” (if the reserved To customize a domain name, check Custom domain name) and fill in the reserved second-level subdomain name in the "Sub Domain" column on the next line. Of course, if you create a temporary data tunnel, just check "Random domain name" directly, and the cpolar client will generate the network address on its own without having to set it up in the cpolar cloud;

Region – This line is the same as the settings in the cpolar cloud. They are the selection of the server region. We can fill it in according to the actual place of use;

img

After filling in the required information, you can click the "Create" button at the bottom of the page to generate a data tunnel that penetrates the local LAN, allowing us to access the tiny file manager web page on the local computer on the public Internet.

At the same time, cpolar will automatically transfer to the "Tunnel List" page under the "Tunnel Management" item. On this page, we can manage the created tunnels, such as starting, pausing, and deleting; if we need to modify the information of this data tunnel, To modify, you can also click the "Edit" button here to enter the data tunnel information modification page.

img

4. Public network access test

Finally, we click the "Online Tunnel List" button under the "Status" item on the left side of the cpolar client to enter the online tunnel list page. From here, we can obtain the public Internet access address that can connect to the local tiny file manager. Just paste this address into other You can access the seafile server in the device's browser.

img

img

Summarize

It is not difficult to see from the above introduction that it is very simple to install tiny file manager on your local computer, and the steps to publish it to the public Internet using cpolar are also very quick. But it is of great practical significance to allow us to access files in the LAN on the public Internet. Let's give it a try.

Reprinted from cpolar pole cloud article: Personal cloud storage: a public network access platform built using Cpolar and minimalist file managers

Guess you like

Origin blog.csdn.net/syf666250/article/details/132845506