import{_ as p,o as t,c,a as e,b as a,w as d,e as s,d as o,r as n}from"./app.fe610a35.js";const h={},m=e("h1",{id:"configuration-options",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#configuration-options","aria-hidden":"true"},"#"),s(" Configuration Options")],-1),u=e("h2",{id:"introduction",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#introduction","aria-hidden":"true"},"#"),s(" Introduction")],-1),D=s("zProtect uses the "),v={href:"https://en.wikipedia.org/wiki/YAML",target:"_blank",rel:"noopener noreferrer"},y=s("YAML"),b=s(" data serialization language for configuring the behavior of the zProtect obfuscator. It is possible to hand-write the configuration file to upload on the web interface, however, you may wish to modify the "),f=e("a",{href:"#example"},"example file",-1),C=s(" or generate one using the "),g=s("command line tool"),x=s("."),_=o(`
There are a few value types used in the zProtect configuration, which are listed below.
Only accepts true
and false
as the value.
For example:
# A key with value as true
key1: true
# A key with value as false
key2: false
Accepts any text character.
For example:
# A key with a string value
key: value
A list of strings
, separated by a newline and prefixed with a dash.
For example:
# An array with entries
key:
- something
- another thing
# An empty array
empty: []
A string array
with a boolean
value enabled
.
For example:
# Option enabled
key:
enabled: true
A string array
with a boolean
key enabled
and a string
key path
.
For example:
# Option enabled
key:
enabled: true
path: something
These options specify runtime information and general configuration.
Dependencies required to obfuscate your jar to prevent "Not found" errors.
Value type: string array
Class files and directories that should be ignored by the obfuscator. They will not have any obfuscation applied to them.
Value type: string array
Note
Transformer priority will fix this in the future.
Class files and directories that should be blacklisted by the obfuscator before processing. This will prevent issues with exclusions if the regular exclusions fail for some unknown reason.
Value type: string array
Adds a watermark to the obfuscated JAR for advertisement. Only removable for users with a Commercial License.
Value type: boolean
These options specify wherether to enable available obfuscation techniques.
`,39),k={id:"antidebug",tabindex:"-1"},R=e("a",{class:"header-anchor",href:"#antidebug","aria-hidden":"true"},"#",-1),w=s(" AntiDebug "),V=e("div",{class:"custom-container tip"},[e("p",{class:"custom-container-title"},"Warning!"),e("p",null,"This option may cause issues with certain programs.")],-1),A=e("p",null,"Blocks debugging options on terminal.",-1),E=e("p",null,[s("Value type: "),e("a",{href:"#simple-option"},[e("code",null,"simple option")])],-1),S={id:"decompilercrasher",tabindex:"-1"},M=e("a",{class:"header-anchor",href:"#decompilercrasher","aria-hidden":"true"},"#",-1),F=s(" DecompilerCrasher "),N=o(`Warning!
This option is very buggy at the moment and will likely cause problems. You are strongly advised not to use this.
Manipulates instructions to crash decompilers.
Value type: simple option
Manipulates annotations to break bad decompilers. This should not cause any major issues.
Value type: simple option
Adds fake jumps, and such to code.
Value type: simple option
Renames various components of your JAR's contents.
Renames class files.
Value type: option with path
Renames field names.
Value type: simple option
Renames local variables.
Value type: simple option
Renames methods.
Value type: simple option
Modifies or removes various aspects of your jar file to make debugging harder.
Removes all clone call(s) and returns an array to optimize enum values.
Value type: simple option
Removes finals from your code.
Value type: simple option
Mark classes as synthetic to hide them from bad decompilers.
Value type: simple option
Removes the instructions const_.
and tableswitch
.
Value type: simple option
Removes Kotlin-specific Metadata such as NotNull
, Nullable
, etc.
Value type: simple option
Removes extended type information.
Value type: simple option
Removes the signature attribute from classes and methods.
Value type: simple option
Move values into an array to make the resulting JAR harder.
Moves numbers into an array.
Value type: simple option
Moves strings into an array.
Value type: simple option
Remove various attributes to make it harder to understand the resulting JAR.
Removes line numbers so StackTraces show (Unknown)
on errors.
Value type: simple option
Removes the local variable attribute from methods.
Value type: simple option
Removes various attributes such as outerClass
, outerMethod
, etc. from the class.
Value type: simple option
Removes the SourceDebug
attribute from the class.
Value type: simple option
Removes the SourceFile
attribute from the class.
Value type: simple option
Randomly shuffles various elements of your jar file to make it more difficult to find them.
Randomly shuffles elements in the mutable list of fields.
Value type: simple option
Randomly shuffles elements in the mutable list of methods.
Value type: simple option
Randomly shuffles elements in the mutable list of classes.
Value type: simple option
Below is a fully functional example configuration file with some zProtect transformers enabled and some disabled.
# zProtect Configuration File Version 1
# Reference: https://docs.zprotect.dev/config.html
# May cause issues with certain programs.
antiDebug:
enabled: false
# Strongly advised not to use this.
decompilerCrasher:
enabled: false
badAnnotationCrasher:
enabled: true
flow:
enabled: false
classRenamer:
enabled: false
path: ""
fieldRenamer:
enabled: false
localVariableRenamer:
enabled: false
methodRenamer:
enabled: false
# Optimization
enumOptimiser:
enabled: false
finalRemover:
enabled: false
hideClassMembers:
enabled: false
insnRemover:
enabled: false
kotlinMetadataRemover:
enabled: false
NOPInsnRemover:
enabled: false
removeSignatures:
enabled: false
# Poolers
numberPooler:
enabled: false
stringPooler:
enabled: false
# Shrinking
lineNumberRemover:
enabled: false
localVariableRemover:
enabled: false
removeInnerClasses:
enabled: false
sourceDebugRemover:
enabled: false
sourceFileRemover:
enabled: false
# Shufflers
shuffleFields: false
shuffleMethods: false
shuffleClasses: false