Compare commits

...

5 Commits

Author SHA1 Message Date
pengzhile 30a07f9c60
!1 fix url
Merge pull request !1 from jwj/N/A
2022-06-07 04:42:49 +00:00
jwj 870513f562
fix url 2022-06-06 02:46:16 +00:00
pengzhile e1aead2838 update links
Signed-off-by: pengzhile <pengzhile@gmail.com>
2022-06-01 11:09:17 +08:00
pengzhile 2888d8deee update links
Signed-off-by: pengzhile <pengzhile@gmail.com>
2022-06-01 09:56:54 +08:00
pengzhile 0b215450ca 1. fixed for java17
Signed-off-by: pengzhile <pengzhile@gmail.com>
2022-05-20 22:51:23 +08:00
4 changed files with 19 additions and 12 deletions

View File

@ -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
View File

@ -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>

View File

@ -26,6 +26,7 @@ public class Initializer {
}
try {
c.getGenericSuperclass();
inst.retransformClasses(c);
} catch (Throwable e) {
DebugInfo.error("Retransform class failed: " + name, e);

View File

@ -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;