mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2026-02-19 06:34:55 +01:00
fix: wrong hostname display (#336)
This commit is contained in:
@@ -60,8 +60,8 @@ Future<ServerStatus> _getLinuxStatus(ServerStatusUpdateReq req) async {
|
||||
}
|
||||
|
||||
try {
|
||||
final host = StatusCmdType.host.find(segments);
|
||||
if (host.isNotEmpty) {
|
||||
final host = _parseHostName(StatusCmdType.host.find(segments));
|
||||
if (host != null) {
|
||||
req.ss.more[StatusCmdType.host] = host;
|
||||
}
|
||||
} catch (e, s) {
|
||||
@@ -237,3 +237,9 @@ String? _parseSysVer(String raw) {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
String? _parseHostName(String raw) {
|
||||
if (raw.isEmpty) return null;
|
||||
if (raw.contains(ShellFunc.scriptFile)) return null;
|
||||
return raw;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user