Distributed Deployment

Sometimes you may encounter this situation: your phone is at home while you are elsewhere. How can you use it? You can use the built-in frp or OpenVPN client in FIRERPA to achieve distributed deployment, allowing you to connect to the distributed device from any location. Both solutions require you to have a public server, and you need to configure the relevant server-side software to function properly.

Danger

The operations in this chapter may expose your phone to the public network, increasing security risks. Please read carefully.

In this chapter, we will not cover basic operations such as opening firewall ports; we assume you are familiar with and have completed the required settings, and we assume you have some understanding of frp and OpenVPN. If you choose to deploy on your own, we strongly recommend using the OpenVPN networking approach.

If you need to manage devices uniformly through the FIRERPA StarLink platform, please refer to the FIRERPA StarLink Platform chapter. You can also self-deploy our open-source version firerpa/hub + firerpa/hub-bridge to achieve P2P access between devices. For specific instructions, please consult the project documentation.

Via frp Forwarding

For frp server deployment and device-side fwd.* configuration, please refer to Deploy Forwarding Service. After configuration, the forwarded ports are by default bound to 127.0.0.1 on the frps server, suitable for accessing the device locally on the public server.

Danger

Exposing forwarding to the public network is extremely dangerous. Do not take chances, do not assume that IP addresses and ports are very secret. Be sure to enable certificate verification for the service!

If you wish to access the device directly from anywhere on the public network, we still do not recommend exposing ports via frp; we recommend using OpenVPN to place the device and your computer in the same network segment. If you indeed need to expose a public port via frp, first ensure that FIRERPA uses a service certificate, and change the frps proxy_bind_addr to 0.0.0.0.

Connecting to a Device via frp Forwarding

The following demonstrates how to connect to the device on a public server where frps is deployed. Assuming fwd.rport is 12345:

from lamda.client import *
d = Device("127.0.0.1", port=12345)

You can also open http://127.0.0.1:12345 or https://127.0.0.1:12345 in a browser on the server to access the device's remote desktop.

Networking via OpenVPN

Please refer to Deploy OpenVPN Service to learn how to connect the device to the OpenVPN network. After networking, add your personal computer to the same OpenVPN network, and then you can directly access the device using its private IP address. The client can be downloaded from OpenVPN Connect.