Java API wrapper for 3x-ui, developed by @megoRU. Supports full interaction with the 3x-ui panel via HTTP API.
Add JitPack repository and dependency:
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependency>
<groupId>com.github.megoRU</groupId>
<artifactId>3x-ui-wrapper</artifactId>
<version>1.9.1</version>
</dependency>
ThreeUIAPI threeUIAPI = new ThreeUIAPI.Builder()
.setHost("http://your-host:port")
.setLogin("admin")
.setPassword("admin")
.enableDevMode()
.build();
boolean success = threeUIAPI.deleteClient(1, "uuid-or-email");
System.out.println("Deleted: " + success);
ThreeUIAPI threeUIAPI = new ThreeUIAPI.Builder()
.setHost("http://your-host:port")
.setLogin("admin")
.setPassword("admin")
.enableDevMode()
.build();
Client client = new Client.Builder()
.email("testuser123")
.method("aes-256-gcm")
.enable(true)
.subId("your-sub-id")
.inboundId(1)
.password("secure-password")
.build();
boolean success = threeUIAPI.addClient(client);
System.out.println("Created: " + success);
This wrapper is distributed under the MIT License.