Protector4j
Protect Java Code from Decompilation, beyond Obfuscation
Install / Use
/learn @inaccel/Protector4jREADME
What is Protector4J
VLINX Protector4J is a tool to prevent Java applications from decompilation. Protector4J provides a custom native ClassLoader by modifying the JVM. The Java classes are encrypted by AES and decrypted in the native ClassLoader.
Quick reference
-
Maintained by:
-
Source of this description:
How to use this image
You can run a VLINX Protector4J task by using this Docker image directly, passing the Java task parameters to docker run:
$ docker run -it --rm --name my-java-task -u $(id -u):$(id -g) -v $(pwd):/usr/src/myvlinx -w /usr/src/myvlinx inaccel/protector4j \
--version <jre-version> \
--email <account-email> \
--password <md5-of-password> \
--protect-all \
jar-path1 jar-path2 ...
Building local Docker image (optional)
This is a base image that you can extend, so it has the bare minimum packages needed. If you add custom package(s) to the Dockerfile, then you can build your local Docker image like this:
$ docker-compose build
Multi-stage Builds
You can build your application with Maven, protect it with Protector4J and package everything in an image that does not include Maven nor Protector4J using multi-stage builds.
# build
FROM maven
WORKDIR /usr/src/app
COPY pom.xml .
RUN mvn -B -e -C -T 1C org.apache.maven.plugins:maven-dependency-plugin:3.1.1:go-offline
COPY . .
RUN mvn -B -e -o -T 1C verify
# protect
FROM inaccel/protector4j
WORKDIR /usr/src/app
COPY --from=0 /usr/src/app .
ARG VLINX_EMAIL
ARG VLINX_PASSWORD
RUN vlinx-protector4j \
--version 11 \
--email ${VLINX_EMAIL} \
--password ${VLINX_PASSWORD} \
--protect-all \
target/*.jar
# package without maven, protector4j
FROM debian
ENV JAVA_HOME="/usr/vlinx/jre"
ENV PATH="${JAVA_HOME}/bin:${PATH}"
COPY --from=1 /usr/src/app/jre ${JAVA_HOME}
COPY --from=1 /usr/src/app/target/*.jar ./
Related Skills
node-connect
349.7kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.7kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
349.7kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
349.7kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
