Compare commits
5 Commits
Author | SHA1 | Date |
---|---|---|
pengzhile | 30a07f9c60 | |
jwj | 870513f562 | |
pengzhile | e1aead2838 | |
pengzhile | 2888d8deee | |
pengzhile | 0b215450ca |
14
README.md
14
README.md
|
@ -1,15 +1,21 @@
|
|||
# ja-netfilter 2022.1.0
|
||||
# ja-netfilter 2022.2.0
|
||||
|
||||
### A javaagent framework
|
||||
### A Java Instrumentation Framework
|
||||
|
||||
## Usage
|
||||
|
||||
* download from the [releases page](https://github.com/ja-netfilter/ja-netfilter/releases)
|
||||
* download from the [releases page](https://gitee.com/ja-netfilter/ja-netfilter/releases)
|
||||
* add `-javaagent:/absolute/path/to/ja-netfilter.jar` argument (**Change to your actual path**)
|
||||
* add as an argument of the `java` command. eg: `java -javaagent:/absolute/path/to/ja-netfilter.jar -jar executable_jar_file.jar`
|
||||
* some apps support the `JVM Options file`, you can add as a line of the `JVM Options file`.
|
||||
* **WARNING: DO NOT put some unnecessary whitespace characters!**
|
||||
* or execute `java -jar /path/to/ja-netfilter.jar` to use `attach mode`.
|
||||
* for **Java 17** you have to add at least these `JVM Options`:
|
||||
|
||||
```
|
||||
--add-opens=java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED
|
||||
--add-opens=java.base/jdk.internal.org.objectweb.asm.tree=ALL-UNNAMED
|
||||
```
|
||||
|
||||
* edit your plugin config files: `${lower plugin name}.conf` file in the `config` dir where `ja-netfilter.jar` is located.
|
||||
* the `config`, `logs` and `plugins` directories can be specified through **the javaagent args**.
|
||||
|
@ -62,7 +68,7 @@ EQUAL,somedomain
|
|||
## Plugin system
|
||||
|
||||
* for developer:
|
||||
* view the [scaffold project](https://github.com/ja-netfilter/ja-netfilter-sample-plugin) written for the plugin system
|
||||
* view the [scaffold project](https://gitee.com/ja-netfilter/ja-netfilter-sample-plugin) written for the plugin system
|
||||
* compile your plugin and publish it
|
||||
* just use your imagination~
|
||||
|
||||
|
|
14
pom.xml
14
pom.xml
|
@ -6,16 +6,16 @@
|
|||
|
||||
<groupId>com.ja-netfilter</groupId>
|
||||
<artifactId>ja-netfilter</artifactId>
|
||||
<version>2022.1.0</version>
|
||||
<version>2022.2.0</version>
|
||||
|
||||
<name>ja-netfilter</name>
|
||||
<description>A javaagent framework</description>
|
||||
<url>https://github.com/ja-netfilter/ja-netfilter</url>
|
||||
<description>A Java Instrumentation Framework</description>
|
||||
<url>https://gitee.com/ja-netfilter/ja-netfilter</url>
|
||||
|
||||
<licenses>
|
||||
<license>
|
||||
<name>GNU General Public License v3.0</name>
|
||||
<url>https://github.com/ja-netfilter/ja-netfilter/blob/master/LICENSE</url>
|
||||
<url>https://gitee.com/ja-netfilter/ja-netfilter/blob/master/LICENSE</url>
|
||||
</license>
|
||||
</licenses>
|
||||
|
||||
|
@ -27,9 +27,9 @@
|
|||
</developers>
|
||||
|
||||
<scm>
|
||||
<connection>scm:git:https://github.com/ja-netfilter/ja-netfilter.git</connection>
|
||||
<developerConnection>scm:git:https://github.com/ja-netfilter/ja-netfilter.git</developerConnection>
|
||||
<url>https://github.com/ja-netfilter/ja-netfilter</url>
|
||||
<connection>scm:git:https://gitee.com/ja-netfilter/ja-netfilter.git</connection>
|
||||
<developerConnection>scm:git:https://gitee.com/ja-netfilter/ja-netfilter.git</developerConnection>
|
||||
<url>https://gitee.com/ja-netfilter/ja-netfilter</url>
|
||||
</scm>
|
||||
|
||||
<properties>
|
||||
|
|
|
@ -26,6 +26,7 @@ public class Initializer {
|
|||
}
|
||||
|
||||
try {
|
||||
c.getGenericSuperclass();
|
||||
inst.retransformClasses(c);
|
||||
} catch (Throwable e) {
|
||||
DebugInfo.error("Retransform class failed: " + name, e);
|
||||
|
|
|
@ -12,7 +12,7 @@ import java.util.jar.JarFile;
|
|||
|
||||
public class Launcher {
|
||||
public static final String ATTACH_ARG = "--attach";
|
||||
public static final String VERSION = "2022.1.0";
|
||||
public static final String VERSION = "2022.2.0";
|
||||
public static final int VERSION_NUMBER = 202201000;
|
||||
|
||||
private static boolean loaded = false;
|
||||
|
|
Loading…
Reference in New Issue