Distributed Deployment¶
There may be times when you’re away from home but want to access your phone that’s left at home. You can achieve distributed deployment using the built-in Frp or OpenVPN client in FIRERPA, allowing you to connect to your devices from anywhere. Both solutions require a public server with appropriate server-side software configured. Instructions for deploying Frp and OpenVPN servers are provided in subsequent documentation.
Danger
The operations described in this section may expose your phone to the public internet, increasing security risks. Please read carefully.
This section will not cover basic operations such as opening firewall ports. We assume you already understand these procedures and have completed the necessary configurations. We also assume you have some familiarity with Frp and OpenVPN. Detailed instructions on deploying both services are covered in this document and later sections. If you choose to deploy your own infrastructure, we strongly recommend using OpenVPN for networking.
Via the Spark Platform Hub¶
Alternatively, you can self-host firerpa/hub + firerpa/hub-bridge to enable P2P access between devices. Refer to the project documentation for detailed instructions.
Forwarding Internal Ports via Frp¶
You need to first download the server program from fatedier/frp, and strictly start it using the command below. You may adjust the port and token values accordingly, but ensure frps version is greater than v0.45.0.
Danger
Exposing services to the public internet is extremely dangerous. Do not assume obscurity of IP or port offers protection—always enable certificate authentication for your service!
frps --token lamda --bind_addr 0.0.0.0 --bind_port 6009 --proxy_bind_addr 127.0.0.1 --allow_ports 10000-15000
Based on this command, configure the properties.local file as follows:
fwd.host=Your server's public IP address
fwd.port=6009
fwd.rport=Target forwarding port (must be within allow_ports range)
fwd.token=lamda
fwd.protocol=tcp
fwd.enable=true
Append or write the above configuration into properties.local, then restart the FIRERPA service.
Exposing Ports to Public Internet via Frp¶
If you intend to access your device from anywhere, please note that exposing internal services directly to the public internet is not recommended due to security concerns. For secure remote access, we suggest using OpenVPN to place your device and computer on the same network segment.
Danger
Exposing services to the public internet is extremely dangerous. Do not assume obscurity of IP or port offers protection—always enable certificate authentication for your service!
If you still wish to proceed with Frp for universal access, ensure that the FIRERPA service is started with TLS encryption enabled. Additionally, change the --proxy_bind_addr 127.0.0.1 parameter in the frps startup command to --proxy_bind_addr 0.0.0.0. This will bind the port (e.g., 12345) directly to the public interface. Without TLS encryption enabled on FIRERPA, anyone could access your device—this is highly dangerous. Be prepared for potential unauthorized access or data destruction.
Connecting to Devices Forwarded via Frp¶
Since the forwarded port in the above example binds only to 127.0.0.1 on the server, verification must be performed directly on the server where frps is deployed. Assuming your fwd.rport is set to 12345, here’s how to connect using the Python client:
from lamda.client import *
d = Device("127.0.0.1", port=12345)
You can also access the device’s remote desktop by visiting http?s://127.0.0.1:12345 in a browser running on the same server.
Networking via OpenVPN¶
Refer to the relevant section on deploying an OpenVPN server to learn how to connect your device to an OpenVPN network.
Connecting to Devices in an OpenVPN Network¶
Once connected to the OpenVPN network, your device behaves just like any other local device. Simply install the OpenVPN client on your personal computer and join the same OpenVPN network. You can then access the device directly using its private OpenVPN IP address. Download the OpenVPN Connect client from the official website openvpn.net/client to get started.