| # ProGuard Configuration for TimechoDB Security Build |
| # This configuration obfuscates ALL IoTDB.TimechoDB project components while preserving functionality |
| |
| # Basic settings |
| -dontskipnonpubliclibraryclasses |
| -verbose |
| -dontwarn |
| -dontnote |
| -dontoptimize |
| -dontshrink |
| |
| # for debugging purposes, you can enable the following line to see the final configuration used |
| -addconfigurationdebugging |
| |
| -target 1.8 |
| # Keep main entry points |
| # -keep public class * { |
| # public static void main(java.lang.String[]); |
| # } |
| |
| -keepclasseswithmembers public class * { |
| public static void main(java.lang.String[]); |
| } |
| |
| |
| -keep class com.timecho.iotdb.service.** { |
| public *; |
| } |
| |
| # 为了IT,发布时要删掉 |
| -keep class com.timecho.iotdb.manager.TimechoConfigManager { |
| *; |
| } |
| |
| -keep class com.timecho.iotdb.service.ConfigNode { |
| *; |
| } |
| |
| -keep class com.timecho.iotdb.manager.** { |
| *; |
| } |
| |
| -keep class com.timecho.iotdb.manager.regulate.RegulateManager { |
| *; |
| } |
| |
| |
| -keep class com.timecho.iotdb.commons.commission.** { |
| *; |
| } |
| |
| -keep class com.timecho.iotdb.schemaregion.EnterpriseSchemaConstant { |
| *; |
| } |
| -keep class com.timecho.iotdb.schemaregion.mtree.EnterpriseCachedMNodeFactory { |
| *; |
| } |
| -keep class com.timecho.iotdb.schemaregion.mtree.EnterpriseMemMNodeFactory { |
| *; |
| } |
| -keep class com.timecho.iotdb.dataregion.utils.tableDiskUsageIndex.TimechoTableDiskUsageIndexProvider { |
| *; |
| } |
| -keep class com.timecho.iotdb.rpc.IPFilter { |
| *; |
| } |
| |
| -keep class com.timecho.iotdb.DataNode { |
| public static void prepare(); |
| } |
| # 结束 |
| |
| |
| -keep class com.timecho.iotdb.rpc.IPCheckListServerContextFactory { |
| public *; |
| } |
| |
| -keep class com.timecho.iotdb.dataregion.migration.MigrationTaskManager { |
| public *; |
| } |
| |
| -keep class com.timecho.iotdb.dataregion.compaction.execute.task.SharedStorageCompactionTask { |
| public *; |
| } |
| |
| -keep class com.timecho.iotdb.dataregion.compaction.execute.recover.SharedStorageCompactionRecoverTask { |
| public *; |
| } |
| |
| -keep class com.timecho.iotdb.dataregion.compaction.selector.impl.SharedStorageCompactionSelector { |
| public *; |
| } |
| |
| -keep class com.timecho.iotdb.dataregion.compaction.execute.task.SharedStorageCompactionTask { |
| public *; |
| } |
| |
| -keep class com.timecho.iotdb.os.fileSystem.OSTsFileOutput { |
| public *; |
| } |
| |
| -keep class com.timecho.iotdb.os.fileSystem.OSTsFileInput { |
| public *; |
| } |
| |
| -keep class com.timecho.iotdb.os.fileSystem.OSFile { |
| public *; |
| } |
| |
| -keep class com.timecho.iotdb.utils.AsyncBatchMetrics { |
| public *; |
| } |
| |
| -keep class com.timecho.iotdb.utils.AsyncBatchUtils { |
| public *; |
| } |
| |
| -keep class com.timecho.iotdb.utils.AsyncBatchUtils$BatchConsumer { |
| public *; |
| } |
| |
| -keep class **.*Properties* { |
| *; |
| } |
| |
| -keep class * implements java.sql.Driver |
| |
| -keep class com.timecho.iotdb.commons.encrypt.AES128.AES128 |
| -keep class com.timecho.iotdb.commons.encrypt.SM4128.SM4128 |
| |
| # Keep enums (often used in configurations and APIs) |
| -keepclassmembers enum * { |
| public static **[] values(); |
| public static ** valueOf(java.lang.String); |
| **[] $VALUES; |
| public *; |
| } |
| |
| # Keep serialization related |
| -keepclassmembers class * implements java.io.Serializable { |
| static final long serialVersionUID; |
| private static final java.io.ObjectStreamField[] serialPersistentFields; |
| private void writeObject(java.io.ObjectOutputStream); |
| private void readObject(java.io.ObjectInputStream); |
| java.lang.Object writeReplace(); |
| java.lang.Object readResolve(); |
| } |
| |
| # Keep native method names |
| -keepclasseswithmembernames class * { |
| native <methods>; |
| } |
| |
| |
| # Keep JMX MBeans |
| -keep class * implements javax.management.MXBean { |
| *; |
| } |
| |
| |
| -keep class **.*MBean { |
| *; |
| } |
| |
| # Keep org.apache |
| -keep class org.apache.** { |
| *; |
| } |
| |
| -keep interface org.apache.** { |
| *; |
| } |
| |
| |
| # Keep exception and error classes for debugging |
| -keep class **.*Exception* { |
| <init>(...); |
| public *; |
| } |
| |
| -keep class **.*Error* { |
| <init>(...); |
| public *; |
| } |
| |
| # Keep factory and builder patterns |
| -keep class **.*Factory* { |
| public *; |
| protected *; |
| } |
| |
| -keep class **.*Builder* { |
| public *; |
| protected *; |
| } |
| |
| |
| |
| # Obfuscation dictionary configuration |
| -obfuscationdictionary obfuscation-dict.txt |
| -classobfuscationdictionary obfuscation-dict.txt |
| -packageobfuscationdictionary obfuscation-dict.txt |
| |
| # Apply aggressive obfuscation to internal implementation |
| # Repackage all classes to make reverse engineering harder |
| -repackageclasses 'com.timecho' |
| |
| # Allow more aggressive optimizations |
| -allowaccessmodification |
| -mergeinterfacesaggressively |
| -overloadaggressively |
| |
| -dontusemixedcaseclassnames |
| |
| # Don't warn about missing classes (external dependencies) |
| -dontwarn javax.** |
| -dontwarn org.slf4j.** |
| -dontwarn org.apache.log4j.** |
| -dontwarn org.apache.commons.** |
| -dontwarn com.google.** |
| -dontwarn io.netty.** |
| -dontwarn scala.** |
| -dontwarn org.apache.iotdb.common.rpc.thrift.** |
| |