Skip to content

Commit

Permalink
Improved deserialization of Charset to work with never Java, updated …
Browse files Browse the repository at this point in the history
…example preset, changed version to 2.0.3
  • Loading branch information
Warxim committed Jul 7, 2022
1 parent 85d6fe3 commit dcd2239
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 7 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 11 additions & 2 deletions presets/EXAMPLE/conf/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,11 @@
46,
99,
111,
109
109,
58,
52,
52,
51
],
"withCharset": "ISO-8859-1"
}
Expand Down Expand Up @@ -162,7 +166,12 @@
}
},
{
"path": "history"
"path": "history",
"store": {
"filter": {
"dataFilterNegative": false
}
}
},
{
"path": "scripter",
Expand Down
7 changes: 5 additions & 2 deletions presets/EXAMPLE/conf/proxies.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
}
]
2 changes: 1 addition & 1 deletion src/main/java/com/warxim/petep/common/Constant.java
Original file line number Diff line number Diff line change
Expand Up @@ -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/";
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/warxim/petep/util/GsonUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit dcd2239

Please sign in to comment.