mirror of
https://github.com/wanghongenpin/proxypin.git
synced 2026-04-26 22:39:48 +08:00
14 lines
344 B
Dart
14 lines
344 B
Dart
import 'package:flutter/services.dart';
|
|
|
|
class Vpn {
|
|
static const MethodChannel proxyVpnChannel = MethodChannel('com.proxy/proxyVpn');
|
|
|
|
static startVpn(String host, int port) {
|
|
proxyVpnChannel.invokeMethod("startVpn", {"proxyHost": host, "proxyPort": port});
|
|
}
|
|
|
|
static stopVpn() {
|
|
proxyVpnChannel.invokeMethod("stopVpn");
|
|
}
|
|
}
|