From dcd223994a35e8e888c9640376cf46ecdefc8018 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20V=C3=A1lka?= Date: Thu, 7 Jul 2022 13:44:43 +0200 Subject: [PATCH] Improved deserialization of Charset to work with never Java, updated example preset, changed version to 2.0.3 --- CHANGELOG.md | 5 +++++ presets/EXAMPLE/conf/extensions.json | 13 +++++++++++-- presets/EXAMPLE/conf/proxies.json | 7 +++++-- src/main/java/com/warxim/petep/common/Constant.java | 2 +- src/main/java/com/warxim/petep/util/GsonUtils.java | 4 ++-- 5 files changed, 24 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a67c332..4da970e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ All notable changes to this project will are documented in this changelog file. +## [2.0.3] - 2022-01-01 +### Added +- Improved deserialization of Charset to work with never Java +- Updated example preset + ## [2.0.2] - 2022-01-01 ### Added - Bugfix for crashes when version cannot be obtained diff --git a/presets/EXAMPLE/conf/extensions.json b/presets/EXAMPLE/conf/extensions.json index 7d9c2d1..17f4d83 100644 --- a/presets/EXAMPLE/conf/extensions.json +++ b/presets/EXAMPLE/conf/extensions.json @@ -103,7 +103,11 @@ 46, 99, 111, - 109 + 109, + 58, + 52, + 52, + 51 ], "withCharset": "ISO-8859-1" } @@ -162,7 +166,12 @@ } }, { - "path": "history" + "path": "history", + "store": { + "filter": { + "dataFilterNegative": false + } + } }, { "path": "scripter", diff --git a/presets/EXAMPLE/conf/proxies.json b/presets/EXAMPLE/conf/proxies.json index 0ecf872..0ca2336 100644 --- a/presets/EXAMPLE/conf/proxies.json +++ b/presets/EXAMPLE/conf/proxies.json @@ -9,10 +9,13 @@ "proxyIP": "127.0.0.1", "targetIP": "petep.warxim.com", "proxyPort": 8888, - "targetPort": 80, + "targetPort": 443, "bufferSize": 32768, "charset": "ISO-8859-1", - "connectionCloseDelay": 5000 + "connectionCloseDelay": 5000, + "clientSslConfig": { + "algorithm": "TLSv1.3" + } } } ] \ No newline at end of file diff --git a/src/main/java/com/warxim/petep/common/Constant.java b/src/main/java/com/warxim/petep/common/Constant.java index 05296ba..e65d09a 100644 --- a/src/main/java/com/warxim/petep/common/Constant.java +++ b/src/main/java/com/warxim/petep/common/Constant.java @@ -30,7 +30,7 @@ @PetepAPI public final class Constant { // PETEP version - public static final String VERSION = "2.0.2"; + public static final String VERSION = "2.0.3"; // PETEP web public static final String WEB = "https://petep.warxim.com/"; diff --git a/src/main/java/com/warxim/petep/util/GsonUtils.java b/src/main/java/com/warxim/petep/util/GsonUtils.java index a1ac1a7..1ac3b17 100644 --- a/src/main/java/com/warxim/petep/util/GsonUtils.java +++ b/src/main/java/com/warxim/petep/util/GsonUtils.java @@ -30,8 +30,8 @@ public final class GsonUtils { * GSON instance for serializing/deserializing in PETEP. */ private static final Gson GSON = new GsonBuilder() - .registerTypeAdapter(Charset.class, createCharsetSerializer()) - .registerTypeAdapter(Charset.class, createCharsetDeserializer()) + .registerTypeHierarchyAdapter(Charset.class, createCharsetSerializer()) + .registerTypeHierarchyAdapter(Charset.class, createCharsetDeserializer()) .setPrettyPrinting() .create();