Merge branch 'refs/heads/main' into flutter-3.19.6

# Conflicts:
#	pubspec.yaml
This commit is contained in:
wanghongenpin
2026-01-30 18:56:44 +08:00
14 changed files with 68 additions and 28 deletions

View File

@@ -1,3 +1,7 @@
import java.util.Properties
import java.io.FileInputStream
import java.io.File
plugins {
id "com.android.application"
id "kotlin-android"
@@ -96,5 +100,22 @@ flutter {
source '../..'
}
// Set a fixed APK name for release builds
// Use the older ApplicationVariants API which is compatible across AGP versions
android.applicationVariants.all { variant ->
if (variant.buildType.name == 'release') {
variant.outputs.all { output ->
def apkName = "proxypin-android.apk"
try {
// Newer output API
output.outputFileName = apkName
} catch (Exception e) {
// Fallback for older API
output.outputFile = new File(output.outputFile.parent, apkName)
}
}
}
}
dependencies {
}

View File

@@ -1,6 +1,6 @@
#Tue Nov 28 00:35:45 CST 2023
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

View File

@@ -1,3 +1,5 @@
import java.util.Properties
pluginManagement {
def flutterSdkPath = {
def properties = new Properties()
@@ -19,7 +21,7 @@ pluginManagement {
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version '8.6.0' apply false
id "com.android.application" version '8.9.1' apply false
id "org.jetbrains.kotlin.android" version "2.1.0" apply false
}

View File

@@ -125,12 +125,15 @@ abstract class HttpMessage {
charset ??= this.charset;
try {
List<int> rawBody = body!;
if (headers.contentEncoding == 'br') {
rawBody = brDecode(body!);
}
if (headers.isGzip) {
rawBody = gzipDecode(body!);
}else
if (headers.contentEncoding == 'br') {
rawBody = brDecode(body!);
} else if (headers.contentEncoding == 'deflate') {
rawBody = zlibDecode(body!);
}
if (charset == 'utf-8' || charset == 'utf8') {

View File

@@ -40,3 +40,15 @@ Future<List<int>?> zstdDecode(List<int> byteBuffer) async {
// }
return byteBuffer;
}
///zlib
List<int> zlibDecode(List<int> byteBuffer) {
try {
final rawDeflateDecoder = ZLibDecoder(raw: true);
return rawDeflateDecoder.convert(byteBuffer);
} catch (e) {
logger.e("zlibDecode error: $e");
return byteBuffer;
}
}

View File

@@ -63,7 +63,7 @@ class ThemeModel {
}
class AppConfiguration {
static const String version = "1.2.4";
static const String version = "1.2.5";
ValueNotifier<bool> globalChange = ValueNotifier(false);
@@ -71,7 +71,7 @@ class AppConfiguration {
Locale? _language;
//是否显示更新内容公告
bool upgradeNoticeV24 = true;
bool upgradeNoticeV25 = true;
/// 是否启用画中画
ValueNotifier<bool> pipEnabled = ValueNotifier(Platform.isAndroid);
@@ -199,7 +199,7 @@ class AppConfiguration {
_theme = ThemeModel(mode: mode, useMaterial3: config['useMaterial3'] ?? true);
_theme.color = config['themeColor'] ?? "Blue";
upgradeNoticeV24 = config['upgradeNoticeV24'] ?? true;
upgradeNoticeV25 = config['upgradeNoticeV25'] ?? true;
_language = config['language'] == null
? null
: Locale.fromSubtags(
@@ -251,7 +251,7 @@ class AppConfiguration {
'mode': _theme.mode.name,
'themeColor': _theme.color,
'useMaterial3': _theme.useMaterial3,
'upgradeNoticeV24': upgradeNoticeV24,
'upgradeNoticeV25': upgradeNoticeV25,
"language": _language?.languageCode,
"languageScript": _language?.scriptCode,
"headerExpanded": headerExpanded,

View File

@@ -93,7 +93,7 @@ class _DesktopHomePagePageState extends State<DesktopHomePage> implements EventL
proxyServer.addListener(this);
panel = NetworkTabController(tabStyle: const TextStyle(fontSize: 16), proxyServer: proxyServer);
if (widget.appConfiguration.upgradeNoticeV24) {
if (widget.appConfiguration.upgradeNoticeV25) {
WidgetsBinding.instance.addPostFrameCallback((_) {
showUpgradeNotice();
});
@@ -162,7 +162,7 @@ class _DesktopHomePagePageState extends State<DesktopHomePage> implements EventL
actions: [
TextButton(
onPressed: () {
widget.appConfiguration.upgradeNoticeV24 = false;
widget.appConfiguration.upgradeNoticeV25 = false;
widget.appConfiguration.flushConfig();
Navigator.pop(context);
},
@@ -181,8 +181,9 @@ class _DesktopHomePagePageState extends State<DesktopHomePage> implements EventL
'3. 脚本支持远程URL获取执行\n'
'4. HTTP Header 展示增加文本和表格切换;\n'
'5. 增加 Request Param 列表展示;\n'
'6. 应用过滤列表增加是否显示系统应用;\n'
'7. 更新JSON深色主题色以提高可见度和美观度\n'
'6. 添加zlib解码支持\n'
'7. 应用过滤列表增加是否显示系统应用\n'
'8. 更新JSON深色主题色以提高可见度和美观度\n'
: 'Note: HTTPS capture is disabled by default — please install the certificate before enabling HTTPS capture.\n'
'Click the HTTPS capture (lock) icon, choose "Install Root Certificate", and follow the prompts to complete installation.\n\n'
'1. Added import/export for Favorites.\n'
@@ -190,8 +191,9 @@ class _DesktopHomePagePageState extends State<DesktopHomePage> implements EventL
'3. Scripts can now be fetched from remote URLs and executed.\n'
'4. HTTP header view now supports switching between text and table modes.\n'
'5. Added a Request Params list view.\n'
'6. App filter list now includes an option to show system apps.\n'
'7. Updated JSON dark-theme colors for better visibility and appearance.\n',
'6. Add zlib decoding support.\n'
'7. App filter list now includes an option to show system apps.\n'
'8. Updated JSON dark-theme colors for better visibility and appearance.\n',
style: const TextStyle(fontSize: 14))));
});
}

View File

@@ -938,7 +938,7 @@ class _ScriptListState extends State<ScriptList> {
var map = item.toJson();
map.remove("scriptPath");
if (item.remoteUrl != null && item.remoteUrl!.trim().isNotEmpty) {
if (item.remoteUrl == null || item.remoteUrl!.trim().isEmpty) {
map['script'] = await scriptManager.getScript(item);
}

View File

@@ -117,7 +117,7 @@ class MobileHomeState extends State<MobileHomePage> implements EventListener, Li
proxyServer.addListener(this);
proxyServer.start();
if (widget.appConfiguration.upgradeNoticeV24) {
if (widget.appConfiguration.upgradeNoticeV25) {
WidgetsBinding.instance.addPostFrameCallback((_) {
showUpgradeNotice();
});
@@ -292,19 +292,21 @@ class MobileHomeState extends State<MobileHomePage> implements EventListener, Li
'3. 脚本支持远程URL获取执行\n'
'4. HTTP Header 展示增加文本和表格切换;\n'
'5. 增加 Request Param 列表展示;\n'
'6. 应用过滤列表增加是否显示系统应用;\n'
'7. 更新JSON深色主题色以提高可见度和美观度\n'
'6. 添加zlib解码支持\n'
'7. 应用过滤列表增加是否显示系统应用\n'
'8. 更新JSON深色主题色以提高可见度和美观度\n'
: 'Note: HTTPS capture is disabled by default — please install the certificate before enabling HTTPS capture.\n\n'
'1. Added import/export for Favorites.\n'
'2. Added request decryption with configurable AES automatic body decryption.\n'
'3. Scripts can now be fetched from remote URLs and executed.\n'
'4. HTTP header view now supports switching between text and table modes.\n'
'5. Added a Request Params list view.\n'
'6. App filter list now includes an option to show system apps.\n'
'7. Updated JSON dark-theme colors for better visibility and appearance.\n';
'6. Added zlib decoding support.\n'
'7. App filter list now includes an option to show system apps.\n'
'8. Updated JSON dark-theme colors for better visibility and appearance.\n';
showAlertDialog(isCN ? '更新内容V${AppConfiguration.version}' : "What's new in V${AppConfiguration.version}", content,
() {
widget.appConfiguration.upgradeNoticeV24 = false;
widget.appConfiguration.upgradeNoticeV25 = false;
widget.appConfiguration.flushConfig();
});
}

View File

@@ -1015,7 +1015,7 @@ class _ScriptListState extends State<ScriptList> {
var item = widget.scripts[idx];
var map = item.toJson();
map.remove("scriptPath");
if (item.remoteUrl != null && item.remoteUrl!.trim().isNotEmpty) {
if (item.remoteUrl == null || item.remoteUrl!.trim().isEmpty) {
map['script'] = await scriptManager.getScript(item);
}
json.add(map);

View File

@@ -5,7 +5,7 @@ cd ../build/linux/x64/release
rm -rf package
mkdir -p package/DEBIAN
echo "Package: ProxyPin" >> package/DEBIAN/control
echo "Version: 1.2.4" >> package/DEBIAN/control
echo "Version: 1.2.5" >> package/DEBIAN/control
echo "Priority: optional" >> package/DEBIAN/control
echo "Architecture: amd64" >> package/DEBIAN/control
echo "Depends: ca-certificates" >> package/DEBIAN/control

View File

@@ -9,7 +9,6 @@ import desktop_multi_window
import device_info_plus
import flutter_desktop_context_menu
import flutter_js
import path_provider_foundation
import proxy_manager
import screen_retriever_macos
import share_plus
@@ -22,7 +21,6 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin"))
FlutterDesktopContextMenuPlugin.register(with: registry.registrar(forPlugin: "FlutterDesktopContextMenuPlugin"))
FlutterJsPlugin.register(with: registry.registrar(forPlugin: "FlutterJsPlugin"))
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
ProxyManagerPlugin.register(with: registry.registrar(forPlugin: "ProxyManagerPlugin"))
ScreenRetrieverMacosPlugin.register(with: registry.registrar(forPlugin: "ScreenRetrieverMacosPlugin"))
SharePlusMacosPlugin.register(with: registry.registrar(forPlugin: "SharePlusMacosPlugin"))

View File

@@ -2,7 +2,7 @@ name: proxypin
description: ProxyPin
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 1.2.4+27
version: 1.2.5+28
environment:
sdk: '>=3.0.2 <4.0.0'

View File

@@ -3,7 +3,7 @@ publisher_display_name: ProxyPin
publisher: CN=8EC6F6C3-E66C-4189-8421-A6F2A451F552
identity_name: ProxyPin.ProxyPin
publisher_url: https://github.com/wanghongenpin/proxypin
msix_version: 1.2.2.0
msix_version: 1.2.5.0
logo_path: D:\IdeaProjects\proxypin\assets\icon.png
capabilities: internetClient
store: "true"