How can I use a local host together with a cloud host to implement various file services

⌚Time: 2026-02-18 00:31:00

👨‍💻Author: Jack Ge

I need to serve two types of files. One is for a private resource website's file service. I wrote a dtv file server myself, which can display the corresponding shared directory for HTTP downloads based on the download code.

The DTV file server listens on the local port 3000 and provides HTTP service. It uses a Cloudflare tunnel to connect to a CF node and exposes the service to the public internet. Users access the DTV file service through the CF tunnel and download files directly.

Because the home network sometimes disconnects and takes a long time to retry, I use FRP's reverse proxy to map the cloud host's port 3000 to the local machine. A CF tunnel is also started on the cloud host to connect to a CF node. Since CF tunnel allows multiple connections and comes with built-in load balancing, if a Cloudflare node detects that one tunnel connection is unavailable, it automatically redirects to an available node connection.

This is effectively using two network channels to connect to the CF node.

User --> CF node --> Local host
User --> CF node --> Cloud host <==> Local host

Another thing is a large number of operating system images. I use P2P software like eMule to share them.

Firstly, for home networks, they are within the ISP's internal network and usually don't have a public IP. This causes the eD2k and KAD networks that eMule relies on to mostly be in a low ID and unusable state, making it impossible for P2P direct connections between most users. Downloads can only be made from a few users with a high ID, and files cannot be actively uploaded and shared with others. So I run eMule on a cloud server. Using a public IP allows both the eD2k and KAD networks to be open and usable, enabling active file uploads to others.

I use rclone to start a WebDAV service on the local host and use frp for reverse proxy to map the local port of the cloud host to the local host. The WebDAV service of the local host is mounted on the remote host, allowing the cloud host to use the large-capacity hard drive of the local host.

eMule can use the mounted hard drive as the shared directory.


The local host is running a DTV server

Cloudflare Tunnel exposes DTV file services to the internet

Ran rclone to create a WebDAV service

Ran frp to reverse proxy the cf tunnel and WebDAV connection from the remote host to the local host

The cloud server is running the FRP server.

Ran rclone to mount the local host's WebDAV service

Ran another Cloudflare tunnel to expose the DTV file service on the local host to the internet.

Ran eMule to share a large number of operating systems with others using a mounted WebDAV drive