force relay when id is suffixed with "/r"

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages
2023-02-13 16:40:24 +08:00
parent 759c1901a5
commit 6f106251f9
15 changed files with 127 additions and 63 deletions

View File

@@ -26,10 +26,12 @@ class _PortForward {
}
class PortForwardPage extends StatefulWidget {
const PortForwardPage({Key? key, required this.id, required this.isRDP})
const PortForwardPage(
{Key? key, required this.id, required this.isRDP, this.forceRelay})
: super(key: key);
final String id;
final bool isRDP;
final bool? forceRelay;
@override
State<PortForwardPage> createState() => _PortForwardPageState();
@@ -47,7 +49,7 @@ class _PortForwardPageState extends State<PortForwardPage>
void initState() {
super.initState();
_ffi = FFI();
_ffi.start(widget.id, isPortForward: true);
_ffi.start(widget.id, isPortForward: true, forceRelay: widget.forceRelay);
Get.put(_ffi, tag: 'pf_${widget.id}');
if (!Platform.isLinux) {
Wakelock.enable();