diff --git a/lib/network/proxy_helper.dart b/lib/network/proxy_helper.dart index 86dc530..cc3206c 100644 --- a/lib/network/proxy_helper.dart +++ b/lib/network/proxy_helper.dart @@ -12,7 +12,6 @@ import 'package:network_proxy/network/http/http_headers.dart'; import 'package:network_proxy/network/util/file_read.dart'; import 'components/host_filter.dart'; -import 'util/process_info.dart'; class ProxyHelper { //请求本服务 diff --git a/lib/network/util/process_info.dart b/lib/network/util/process_info.dart index 9c91201..4643092 100644 --- a/lib/network/util/process_info.dart +++ b/lib/network/util/process_info.dart @@ -84,7 +84,6 @@ class ProcessInfoUtils { var result = await Process.run('cmd', ['/c', 'wmic process where processid=$pid get ExecutablePath']); var output = result.stdout.toString(); var path = output.split('\n')[1].trim(); - print(output); String name = path.substring(path.lastIndexOf('\\') + 1); return ProcessInfo(name, name.split(".")[0], path); } diff --git a/lib/ui/content/panel.dart b/lib/ui/content/panel.dart index 2b994de..25fc709 100644 --- a/lib/ui/content/panel.dart +++ b/lib/ui/content/panel.dart @@ -208,10 +208,11 @@ class NetworkTabState extends State with SingleTickerProvi rowWidget("Request Package", getPackage(request)), const SizedBox(height: 20), rowWidget("Response Package", getPackage(response)), + const SizedBox(height: 20), ]; if (request.processInfo != null) { - content.add(const SizedBox(height: 20)); content.add(rowWidget("App", request.processInfo!.name)); + content.add(const SizedBox(height: 20)); } return ListView(children: [expansionTile("General", content)]); diff --git a/lib/ui/desktop/left/request_editor.dart b/lib/ui/desktop/left/request_editor.dart index 6fbe329..fece685 100644 --- a/lib/ui/desktop/left/request_editor.dart +++ b/lib/ui/desktop/left/request_editor.dart @@ -249,7 +249,7 @@ class _HttpState extends State<_HttpWidget> { message = widget.message; body = TextEditingController(text: widget.message?.bodyAsString); if (widget.message?.headers == null && !widget.readOnly) { - initHeader["User-Agent"] = ["ProxyPin/1.0.8"]; + initHeader["User-Agent"] = ["ProxyPin/1.0.9"]; initHeader["Accept"] = ["*/*"]; return; } diff --git a/lib/ui/mobile/request/request.dart b/lib/ui/mobile/request/request.dart index a37650f..199704b 100644 --- a/lib/ui/mobile/request/request.dart +++ b/lib/ui/mobile/request/request.dart @@ -93,16 +93,15 @@ class RequestRowState extends State { Platform.isIOS ? const EdgeInsets.symmetric(horizontal: 8) : const EdgeInsets.only(left: 3, right: 5), onLongPress: menu, onTap: () { - NavigatorHelper.push( - MaterialPageRoute( - settings: const RouteSettings(name: "NetworkTabController"), - builder: (context) { - return NetworkTabController( - proxyServer: widget.proxyServer, - httpRequest: request, - httpResponse: response, - title: Text(localizations.captureDetail, style: const TextStyle(fontSize: 16))); - })); + NavigatorHelper.push(MaterialPageRoute( + settings: const RouteSettings(name: "NetworkTabController"), + builder: (context) { + return NetworkTabController( + proxyServer: widget.proxyServer, + httpRequest: request, + httpResponse: response, + title: Text(localizations.captureDetail, style: const TextStyle(fontSize: 16))); + })); }); } @@ -192,14 +191,17 @@ class RequestRowState extends State { ), ]); }, - ).then((value) => setState(() => selected = false)); + ).then((value) { + selected = false; + if (mounted) setState(() {}); + }); } //显示高级重发 showCustomRepeat(HttpRequest request) { NavigatorHelper.pop(); - NavigatorHelper - .push(MaterialPageRoute(builder: (context) => MobileCustomRepeat(onRepeat: () => onRepeat(request)))); + NavigatorHelper.push( + MaterialPageRoute(builder: (context) => MobileCustomRepeat(onRepeat: () => onRepeat(request)))); } onRepeat(HttpRequest request) { diff --git a/lib/ui/mobile/request/request_editor.dart b/lib/ui/mobile/request/request_editor.dart index 80972ba..d76a97d 100644 --- a/lib/ui/mobile/request/request_editor.dart +++ b/lib/ui/mobile/request/request_editor.dart @@ -225,7 +225,7 @@ class _HttpState extends State<_HttpWidget> with AutomaticKeepAliveClientMixin { message = widget.message; body = widget.message?.bodyAsString; if (widget.message?.headers == null && !widget.readOnly) { - initHeader["User-Agent"] = ["ProxyPin/1.0.8"]; + initHeader["User-Agent"] = ["ProxyPin/1.0.9"]; initHeader["Accept"] = ["*/*"]; return; } diff --git a/lib/ui/mobile/widgets/about.dart b/lib/ui/mobile/widgets/about.dart index 5ab855a..c22b486 100644 --- a/lib/ui/mobile/widgets/about.dart +++ b/lib/ui/mobile/widgets/about.dart @@ -20,9 +20,9 @@ class About extends StatelessWidget { const SizedBox(height: 20), Padding( padding: const EdgeInsets.only(left: 10, right: 10), - child: Text(isCN ? "全平台开源免费抓包软件" : "Full platform open source free packet capture software")), + child: Text(isCN ? "全平台开源免费抓包软件" : "Full platform open source free capture HTTP(S) traffic software")), const SizedBox(height: 10), - const Text("V1.0.8"), + const Text("V1.0.9"), ListTile( title: const Text("Github"), trailing: const Icon(Icons.arrow_right), diff --git a/lib/utils/har.dart b/lib/utils/har.dart index fd2d983..8512ae3 100644 --- a/lib/utils/har.dart +++ b/lib/utils/har.dart @@ -65,7 +65,7 @@ class Har { title = title.contains("ProxyPin") ? title : "[ProxyPin]$title"; har["log"] = { "version": "1.2", - "creator": {"name": "ProxyPin", "version": "1.0.8"}, + "creator": {"name": "ProxyPin", "version": "1.0.9"}, "pages": [ { "title": title, diff --git a/linux/build.sh b/linux/build.sh index cb0ec00..d360beb 100644 --- a/linux/build.sh +++ b/linux/build.sh @@ -4,7 +4,7 @@ cd ../build/linux/x64/release rm -rf package mkdir -p package/DEBIAN echo "Package: ProxyPin" >> package/DEBIAN/control -echo "Version: 1.0.8" >> package/DEBIAN/control +echo "Version: 1.0.9" >> package/DEBIAN/control echo "Priority: optional" >> package/DEBIAN/control echo "Architecture: amd64" >> package/DEBIAN/control echo "Depends: ca-certificates" >> package/DEBIAN/control