diff --git a/cyberwow/lib/config.dart b/cyberwow/lib/config.dart index 631ac9f..490adce 100644 --- a/cyberwow/lib/config.dart +++ b/cyberwow/lib/config.dart @@ -32,5 +32,8 @@ const arch = 'arm64'; // const arch = 'x86_64'; const minimumHeight = 118361; -const isPC = arch == 'x86_64'; +const isEmu = arch == 'x86_64'; +const emuHost = '192.168.10.100'; + +const host = isEmu ? emuHost : '127.0.0.1'; diff --git a/cyberwow/lib/controller/rpc.dart b/cyberwow/lib/controller/rpc.dart index 6ec3bc7..c160c1d 100644 --- a/cyberwow/lib/controller/rpc.dart +++ b/cyberwow/lib/controller/rpc.dart @@ -30,7 +30,7 @@ import '../config.dart'; int rpcID = 0; Future rpc(String method) async { - final url = 'http://127.0.0.1:${config.port}/json_rpc'; + final url = 'http://${host}:${config.port}/json_rpc'; rpcID += 1; @@ -154,7 +154,7 @@ Future getConnectionsString() async => rpcString('get_connections', fiel Future rpcOther(String method) async { - final url = 'http://127.0.0.1:${config.port}/json_rpc'; + final url = 'http://${host}:${config.port}/json_rpc'; var response; try { diff --git a/cyberwow/lib/controller/syncing.dart b/cyberwow/lib/controller/syncing.dart index 9c09946..b91dc53 100644 --- a/cyberwow/lib/controller/syncing.dart +++ b/cyberwow/lib/controller/syncing.dart @@ -63,7 +63,7 @@ Stream runBinary (String name) async* { yield line; } - if (isPC) return; + if (isEmu) return; // the app should never reach here log.severe('Daemon is gone!');