Professional-grade Java bytecode obfuscation & license management suite.
Protect your Minecraft plugins (and other Java applications) with multi-layered obfuscation, an embedded license server, and a full-featured web panel β all in a single JAR.
- Overview
- Key Features
- Obfuscation Techniques
- System Architecture
- Project Structure
- Prerequisites
- Installation
- Configuration
- Environment Variables
- Usage
- BarronVM
- API Reference
- Network Configuration
- Troubleshooting
- Security
- Contributing
- Changelog
- License
Barron Obfuscator is a monolithic security suite that combines:
- Advanced Java Obfuscator β Multi-layered bytecode protection (string encryption, control flow, virtualization, reference hiding, anti-debug, and more)
- Embedded License Server β HTTP/HTTPS validation API for protected plugins with HWID binding, grace period, and kill switch
- Web Panel β Full user dashboard, admin panel, product management, and payment integration (Stripe, Shopier, PayTR)
- BarronVM β Custom bytecode virtualization engine that converts Java bytecode to a proprietary instruction set
One JAR, full protection. No need for separate web servers, databases configs, or microservices. Just run Barron on your VPS and it handles everything.
| Category | Feature | Details |
|---|---|---|
| π‘οΈ Obfuscation | 10+ Transform Layers | String encryption, identifier renaming, control flow, dead code, number obfuscation, reference hiding, anti-debug, class encryption, virtualization, metadata removal |
| π License Server | Embedded HTTP/HTTPS | Built-in server (port 8000) with rate limiting, Cloudflare support, HWID auto-lock |
| π₯οΈ GUI | JavaFX Desktop App | Drag & drop obfuscation, license management, real-time logs, settings |
| π» CLI | Headless/Server Mode | Auto-fallback on headless Linux, CLI key generation and obfuscation |
| π Localization | Multi-Language | Turkish (TΓΌrkΓ§e), English, Chinese |
| π³ Payments | 3 Providers | Stripe, Shopier, PayTR integration with webhook verification |
| π₯ User System | Full Auth | Registration, login, 2FA (TOTP), password reset, role-based access |
| βοΈ HA | Database Replication | Active-Passive failover with real-time sync to backup server |
| π Security | Production-Grade | BCrypt, AES-256-GCM, HMAC-SHA256, CSRF protection, rate limiting |
Barron applies the following transformations to protect your Java bytecode:
| # | Technique | Description | Configurable Level |
|---|---|---|---|
| 1 | String Encryption | Encrypts all string literals using multi-strategy encryption (XOR, AES chain, substitution, Base64 mix) | OFF / LIGHT / MODERATE / AGGRESSIVE |
| 2 | Identifier Renaming | Renames classes, methods, and fields to unreadable names. Supports InvokeDynamic/Lambda references. | OFF / LIGHT / MODERATE / AGGRESSIVE |
| 3 | Control Flow Obfuscation | Adds opaque predicates, bogus switches, and try-catch blocks to obscure program flow | OFF / LIGHT / MODERATE / AGGRESSIVE |
| 4 | Number Obfuscation | Replaces numeric constants with computed expressions | OFF / LIGHT / MODERATE / AGGRESSIVE |
| 5 | Dead Code Injection | Injects unreachable but valid code paths to confuse decompilers | OFF / LIGHT / MODERATE / AGGRESSIVE |
| 6 | Reference Hiding | Hides method and field references via reflection or proxy calls | OFF / LIGHT / MODERATE / AGGRESSIVE |
| 7 | Anti-Debug | Detects debugger attachment, breakpoints, and agent injection at runtime | OFF / LIGHT / MODERATE / AGGRESSIVE |
| 8 | Class Encryption | AES-256 encrypts class files, decrypted at runtime by a custom classloader | ON / OFF |
| 9 | Metadata Removal | Strips source file names, line numbers, local variable tables, and annotations | ON / OFF |
| 10 | Bytecode Virtualization | Converts methods to BarronVM proprietary instruction set (see BarronVM) | ON / OFF |
| 11 | License Verification | Injects server-side license check with kill switch, grace period, and HWID binding | ON / OFF |
graph TB
subgraph "Barron Application (Single JAR)"
GUI[JavaFX GUI]
CLI[CLI Mode]
OBF[Obfuscation Engine]
LIC[License Server :8000]
WEB[Web Panel :8080]
DB_MGR[Database Manager]
end
subgraph "Obfuscation Pipeline"
OBF --> STR[String Encrytor]
OBF --> ID[Identifier Renamer]
OBF --> CF[Control Flow]
OBF --> NUM[Number Obfuscator]
OBF --> DC[Dead Code Injector]
OBF --> REF[Reference Hider]
OBF --> AD[Anti-Debug]
OBF --> CE[Class Encryptor]
OBF --> VM[BarronVM Virtualizer]
OBF --> LI[License Injector]
end
subgraph "External"
MYSQL[(MySQL 8.0+)]
PLUGIN[Protected Plugin]
USER_BR[User Browser]
end
GUI --> OBF
CLI --> OBF
DB_MGR --> MYSQL
PLUGIN -->|"HTTP /api/verify"| LIC
LIC --> DB_MGR
USER_BR --> WEB
WEB --> DB_MGR
sequenceDiagram
participant P as Protected Plugin
participant B as Barron Server
participant DB as MySQL
P->>B: POST /api/verify {key, hwid}
B->>B: Rate Limit Check
B->>DB: Validate License & HWID
DB-->>B: License Data
B->>B: Generate HMAC-SHA256 Session Token
B-->>P: {valid: true, sessionToken: "..."}
P->>P: Store token, save grace period
Note over P: Kill switch checks token<br>on every command/event
barron_obfuscator/
βββ src/main/java/dev/barron/
β βββ Barron.java # Main application class
β βββ BarronLauncher.java # Entry point
β βββ api/
β β βββ LicenseAPI.java # Programmatic license API
β βββ cli/
β β βββ CliManager.java # CLI argument handler
β βββ config/
β β βββ ObfuscationConfig.java # All obfuscation settings
β βββ db/
β β βββ DatabaseManager.java # MySQL operations, HikariCP pool
β βββ gui/
β β βββ MainWindow.java # JavaFX GUI
β βββ i18n/
β β βββ I18n.java # Localization (TR/EN/ZH)
β βββ license/
β β βββ LicenseClient.java # Client-side license logic
β β βββ LicenseConfig.java # License configuration
β β βββ LicenseKeyBundle.java # Key bundle management
β β βββ ServerAppGenerator.java # Standalone server generator
β βββ loader/
β β βββ BarronClassLoader.java # Encrypted class loader
β β βββ BarronPluginLauncher.java # Spigot plugin bootstrap
β βββ obfuscator/
β β βββ ObfuscationEngine.java # Main obfuscation pipeline
β βββ server/
β β βββ LicenseServer.java # Embedded HTTP server + Web Panel
β βββ transformers/ # All obfuscation transformers
β β βββ AntiDebug.java
β β βββ ClassEncryptor.java
β β βββ ControlFlowObfuscator.java
β β βββ DeadCodeInjector.java
β β βββ IdentifierRenamer.java
β β βββ LicenseCheckInjector.java
β β βββ MetadataRemover.java
β β βββ NumberObfuscator.java
β β βββ ReferenceHider.java
β β βββ StringEncryptor.java
β β βββ Transformer.java # Transformer interface
β β βββ TransformContext.java
β β βββ VirtualizationTransformer.java
β βββ utils/
β βββ CryptoUtils.java # AES-256-GCM, PBKDF2, key derivation
β βββ JarUtils.java # JAR read/write operations
β βββ LibraryDetector.java # Detect shaded libraries
β βββ MappingGenerator.java # Obfuscation mapping output
β βββ NameGenerator.java # Obfuscated name generation
β βββ RandomizationEngine.java # Strategy randomization per-class
β βββ SafeClassWriter.java # ASM ClassWriter with fallback
β βββ TotpUtil.java # TOTP 2FA implementation
βββ src/main/resources/
β βββ styles/ # JavaFX CSS themes
β βββ web/
β βββ index.html # Web Panel SPA
βββ BarronVM/ # Bytecode Virtualization subproject
β βββ build.gradle # Java 8+ target
β βββ src/...
βββ build.gradle # Main project build (Java 21+)
βββ settings.gradle
βββ start.bat # Windows launcher
βββ start.sh # Linux launcher (GUI + headless)
βββ SECURITY.md # Security policy
βββ YAPILANLAR.txt # Detailed changelog (Turkish)
βββ LICENSE # MIT License
| Resource | Requirement | Notes |
|---|---|---|
| Java JDK | 21+ | For building and running the application |
| MySQL | 8.0+ | License storage and user management |
| OS | Windows / Linux (Ubuntu/Debian) | macOS experimentally supported |
| Disk | ~200 MB | For build artifacts and dependencies |
Note: The BarronVM subproject targets Java 8+, ensuring compatibility with all Minecraft server versions.
git clone https://github.com/BarronDEV/BarronObfuscator.git
cd barron-obfuscator# Linux/macOS
chmod +x gradlew
./gradlew jar
# Windows
gradlew.bat jarThe fat JAR will be created at build/libs/Barron-Obfuscator-2.0.0.jar.
CREATE DATABASE barron_licenses;
CREATE USER 'barron'@'%' IDENTIFIED BY 'your_secure_password';
GRANT ALL PRIVILEGES ON barron_licenses.* TO 'barron'@'%';
FLUSH PRIVILEGES;Tables are automatically created on first launch.
Windows:
.\start.batLinux (Desktop/GUI):
./start.shLinux (Headless/VPS):
./start.sh
# Automatically falls back to Server Mode if GUI unavailable
# Logs: startup.logDirect JAR:
java -Xmx2G -jar build/libs/Barron-Obfuscator-2.0.0.jarOn first launch, configure via the Settings tab:
- MySQL Connection β Host, port, database, username, password
- Server Port β API server port (default: 8000)
- Web Panel Port β Dashboard port (default: 8080)
- Language β Turkish / English / Chinese
- Token Secret β Shared secret for session token signing (set a random, strong value!)
- SSL β Upload PEM certificate and private key for HTTPS
- Backup Server β Configure secondary MySQL host for HA replication
Each transformer can be individually toggled ON/OFF and configured to a level:
- OFF β Disabled
- LIGHT β Minimal transformations
- MODERATE β Balanced protection/performance
- AGGRESSIVE β Maximum protection
All environment variables are optional but strongly recommended for production:
| Variable | Description | Default |
|---|---|---|
DB_HOST |
MySQL server hostname | localhost |
DB_PORT |
MySQL server port | 3306 |
DB_NAME |
MySQL database name | barron_licenses |
DB_USER |
MySQL username | barron |
DB_PASS |
MySQL password | (empty) |
BARRON_ENCRYPTION_KEY |
Passphrase for AES-256-GCM encryption of payment API keys | BarronSecureKey! |
Warning
In production: Always set BARRON_ENCRYPTION_KEY to a strong, unique passphrase. The default value is public knowledge.
Linux:
export DB_HOST=your-mysql-host
export DB_PASS=your-secure-password
export BARRON_ENCRYPTION_KEY=YourStrongRandomPassphrase123!Windows (PowerShell):
$env:DB_HOST = "your-mysql-host"
$env:DB_PASS = "your-secure-password"
$env:BARRON_ENCRYPTION_KEY = "YourStrongRandomPassphrase123!"Systemd Service (recommended for VPS):
[Service]
Environment="DB_HOST=localhost"
Environment="DB_PASS=your-secure-password"
Environment="BARRON_ENCRYPTION_KEY=YourStrongRandomPassphrase123!"
ExecStart=/usr/bin/java -Xmx2G -jar /opt/barron/Barron-Obfuscator-2.0.0.jar- Obfuscate: Drag & drop JAR files β Select transformers β Click Obfuscate
- License Manager: Create/manage licenses, view active sessions, manage IPs
- User Management: Manage registered users, roles, 2FA status
- Products: Create products, upload files, set prices, configure payment
# Generate a license key
java -jar Barron-Obfuscator-2.0.0.jar --gen-key --days 30
# Obfuscate a JAR file
java -jar Barron-Obfuscator-2.0.0.jar --obfuscate input.jar
# Start in server-only mode
java -jar Barron-Obfuscator-2.0.0.jar --serverAccess the user-facing web panel at http://your-server:8080/
Features:
- User Registration & Login (with 2FA support)
- License Dashboard β View owned licenses, manage IPs, download products
- Product Store β Browse products, purchase with Stripe/Shopier/PayTR or account balance
- Admin Panel β User management, license management, payment settings, statistics
- Password Reset β Email-based secure password recovery
After obfuscating a plugin, the end-user must add the license key to config.yml:
# config.yml of the protected plugin
license-key: "XXXX-XXXX-XXXX-XXXX"The plugin will automatically verify against your Barron server on startup.
BarronVM is a lightweight, embeddable virtual machine that acts as an additional obfuscation layer:
- Converts Java bytecode methods into a proprietary instruction set (BarronCode)
- Runtime interpretation by a stack-based virtual CPU
- Renders standard decompilers (JD-GUI, Recaf, FernFlower) ineffective
- Java 8+ compatible β works on all Minecraft server versions
- Ultra-lightweight (< 5 KB compiled)
BarronVM is built as a Gradle subproject and automatically embedded into obfuscated JARs.
// How BarronVM works internally
BarronVM.exec(bytecodeArray, localVariables);Base URL: http://your-server:8000
Validates a license key.
Request Body:
{
"key": "XXXX-XXXX-XXXX-XXXX",
"hwid": "base64-encoded-hardware-hash"
}Success Response (200):
{
"valid": true,
"message": "License valid",
"timestamp": 1713740000000,
"sessionToken": "hmac-sha256-signed-token"
}Invalid License (200):
{
"valid": false,
"message": "Invalid license or IP"
}Rate Limited (429):
{
"error": "Too many requests. Try again later."
}Base URL: http://your-server:8080
| Endpoint | Method | Auth | Description |
|---|---|---|---|
/api/auth/login |
POST | β | User login (with 2FA support) |
/api/auth/register |
POST | β | User registration |
/api/auth/logout |
POST | β | End session |
/api/auth/forgot-password |
POST | β | Request password reset |
/api/auth/reset-password |
POST | β | Reset password with token |
/api/auth/2fa/* |
POST | β | 2FA setup/enable/disable |
/api/user/profile |
GET/POST | β | View/update profile |
/api/user/licenses |
GET | β | List owned licenses |
/api/user/licenses/add |
POST | β | Bind license to account |
/api/products |
GET | β | List available products |
/api/admin/* |
GET/POST | β π | Admin panel operations |
/api/payment/* |
POST | β | Payment processing |
Important
The following ports must be open for the application to function:
| Port | Protocol | Usage | Configurable |
|---|---|---|---|
| 8000 | TCP | License Validation API | β Yes (GUI) |
| 8080 | TCP | Web Panel (Dashboard) | β Yes (GUI) |
| 3306 | TCP | MySQL Database | β (MySQL config) |
sudo ufw allow 8000/tcp comment 'Barron License API'
sudo ufw allow 8080/tcp comment 'Barron Web Panel'
sudo ufw reloadBarron supports Cloudflare proxying out of the box:
- Reads
CF-Connecting-IPandX-Forwarded-Forheaders for real client IP - Configure your domain to proxy through Cloudflare
- Set the Server Domain in GUI settings for proper CORS
| Issue | Solution |
|---|---|
| Client can't connect | Ensure port 8000 is open. Check console for [LicenseServer] Listening on port 8000. |
| Port in use | Change port in Settings > Network or kill the conflicting process. |
| GUI won't open on Linux | Expected on headless servers. App auto-switches to Server Mode. Check startup.log. |
| MySQL connection failed | Verify credentials, ensure MySQL is running, check firewall allows port 3306. |
| License shows invalid | Check: (1) correct license key in config.yml, (2) server is reachable, (3) license not expired, (4) IP limit not exceeded. |
| Build fails | Ensure JDK 21+ is installed. Run java -version to verify. |
| IllegalPluginAccessException | This was fixed in v2.0.0. Ensure you're using the latest build. |
| NoClassDefFoundError (Lambda) | This was fixed in v2.0.0. Lambda/Stream references are now properly updated during renaming. |
See SECURITY.md for:
- Complete list of security features
- Environment variable reference
- Vulnerability reporting guidelines
- Deployment best practices
- Set
BARRON_ENCRYPTION_KEYenvironment variable - Set
DB_PASSenvironment variable - Use HTTPS (SSL certificates in GUI settings or behind Cloudflare)
- Set a strong Token Secret in GUI settings
- Set proper Server Domain for CORS restriction
- Enable 2FA for admin accounts
- Configure firewall (only expose ports 8000, 8080)
- Set up database replication for HA
Contributions are welcome! Please follow these guidelines:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
# Clone and build
git clone https://github.com/yourusername/barron-obfuscator.git
cd barron-obfuscator
./gradlew jar
# Run in development
java -jar build/libs/Barron-Obfuscator-2.0.0.jar- Java 21+ features (records, text blocks, pattern matching)
- UTF-8 encoding
- 4-space indentation (no tabs)
See YAPILANLAR.txt for a detailed, chronological list of all changes, bug fixes, and security improvements.
- β AES-256-GCM encryption for payment API keys (replaced weak XOR)
- β Kill switch token format fix (HMAC mismatch resolved)
- β
Backup server
valid:trueverification (prevents bypass) - β 2FA secret leak prevention
- β Debug log sanitization
- β CORS and CSRF hardening
- β Shopier webhook HMAC signature verification
- β JDK 21-25+ compatibility (BarronVM targets Java 8+)
- β Lambda/InvokeDynamic reference tracking during renaming
- β HikariCP connection pooling
This project is licensed under the MIT License β see the LICENSE file for details.