smart-license is an open source project for security hardening. It mainly serves non-open source products, commercial software, paid software with trial functions, etc., and provides authorized usage methods for software.

1. Applicable scenarios

  • Non-open source products, commercial software, paid software.
  • To limit the dissemination of products, each customer has an exclusive license.
  • The same software distribution package provides different service capabilities according to different licenses.
  • Limit the validity of software licenses.

2. Product Features

  • Open source, the code is completely open, and the principle of license generation is transparent.
  • Easy to use, generate license in seconds.
  • Safe, the generated license is tamper-proof to a certain extent, and it is difficult to crack.

3. Update instructions

This is a subversive version, in order to provide users with a better experience. We decisively eliminated the license generation function in version 1.x, and provided an online license application service, and the whole process only takes a few seconds.

In smart-license 2.0, we adjusted the protocol rules to a language-independent mode. This means that in addition to Java, we will be able to provide equivalent licensing services for other programming languages ​​in the future.

3.1 Shield.Shield

This is the product name of the license online application service, which means: guard.

You can find the address of the service through our usage documentation link. I would like to thank the friends who provided us with the server, as well as the technical support given by the author of the front-end framework layui-vue.

3.2 Client

Only a little optimization has been done on the client side, and old users can adapt to it with a little adjustment, but the original license file needs to be regenerated.


<dependency>
    <groupId>org.smartboot.license</groupId>
    <artifactId>license-client</artifactId>
    <version>2.0</version>
</dependency>

Sample program:


private void loadLicense(Properties properties) {
    1️⃣ License license = new License(entity -> EnterprisePlugin.this.uninstall(),10);

    2️⃣ try (InputStream inputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream("License.shield")) {
        ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
        byte[] bytes = new byte[1024];
        int size;
        while ((size = inputStream.read(bytes)) > 0) {
        byteArrayOutputStream.write(bytes, 0, size);
        }
    3️⃣  LicenseEntity entity = license.loadLicense(byteArrayOutputStream.toByteArray());
    4️⃣  properties.load(new ByteArrayInputStream(entity.getData()));
        System.out.println(properties);
    } catch (IOException e) {
        throw new RuntimeException(e);
    }
}
  1. Initialize the license client. The callback logic after the registration license expires, and the repeated trigger frequency of the callback in the expired state (unit: second).
  2. Load the license file stream.
  3. Parse the license for legality verification and obtain authorized content.
  4. The configuration initialization of the software runtime is performed based on the authorization content.

Four, finally

We hope to use the power of technology to protect the rights and interests of technical people, so we created smart-license.

However, due to some factors, the project has been in custody for a long time. I would like to say sorry to the friends who have followed the project and come to technical consultation.

We cannot promise to continue to maintain the project, nor do we plan to provide free consulting services in the community.

If anyone is willing to contribute to this project (including but not limited to: strategy optimization, documentation, promotion and operation, paid consultation), I would like to express my great welcome and thanks!

storehouse:https://gitee.com/smartboot/smart-license

Documentation:https://smartboot.gitee.io/smart-license/ (with Shield.Shield jump link)

#Smartlicense #released #protect #software #rights #News Fast Delivery #Chinese #Open #Source #Technology #Exchange #Community

Leave a Comment

Your email address will not be published. Required fields are marked *