A javaagent framework

Overview

ja-netfilter 2022.2.0

A javaagent framework

Usage

  • download from the releases page

  • 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.

    • eg: -javaagent:/path/to/ja-netfilter.jar=appName, your config, logs and plugins directories will be config-appname, logs-appname and plugins-appname.
    • if no javaagent args, they default to config, logs and plugins.
    • this mechanism will avoid extraneous and bloated config, logs and plugins.
  • run your java application and enjoy~

Config file format

[ABC]
# for the specified section name

# for example
[URL]
EQUAL,https://someurl

[DNS]
EQUAL,somedomain

# EQUAL       Use `equals` to compare
# EQUAL_IC    Use `equals` to compare, ignore case
# KEYWORD     Use `contains` to compare
# KEYWORD_IC  Use `contains` to compare, ignore case
# PREFIX      Use `startsWith` to compare
# PREFIX_IC   Use `startsWith` to compare, ignore case
# SUFFIX      Use `endsWith` to compare
# SUFFIX_IC   Use `endsWith` to compare, ignore case
# REGEXP      Use regular expressions to match

Debug info

  • the ja-netfilter will NOT output debugging information by default
  • add environment variable JANF_DEBUG=1 (log level) and start to enable it
  • or add system property -Djanf.debug=1 (log level) to enable it
  • log level: NONE=0, DEBUG=1, INFO=2, WARN=3, ERROR=4

Debug output

  • the ja-netfilter will output debugging information to the console by default
  • add environment variable JANF_OUTPUT=value and start to change output medium
  • or add system property -Djanf.output=value to change output medium
  • output medium value: [NONE=0, CONSOLE=1, FILE=2, CONSOLE+FILE=3, WITH_PID=4]
  • eg: console + file + pid file name = 1 + 2 + 4 = 7, so the -Djanf.output=7

Plugin system

  • for developer:

    • view the scaffold project written for the plugin system
    • compile your plugin and publish it
    • just use your imagination~
  • for user:

    • download the jar file of the plugin
    • put it in the subdirectory called plugins where the ja-netfilter.jar file is located
    • enjoy the new capabilities brought by the plugin
    • if the file suffix is .disabled.jar, the plugin will be disabled
You might also like...

Lattice is a powerful, lightweight business extension invoke framework. By using the Lattice framework, complex business customization can be efficiently organized and managed.

Lattice Framework Introduction Lattice is a powerful, lightweight business extension invoke framework. By using the Lattice framework, complex busines

Dec 30, 2022

Simpler, better and faster Java bean mapping framework

Simpler, better and faster Java bean mapping framework

Orika ! NEW We are pleased to announce the release of Orika 1.5.4 ! This version is available on Maven central repository What? Orika is a Java Bean m

Jan 6, 2023

Mixin is a trait/mixin and bytecode weaving framework for Java using ASM

Mixin is a trait/mixin and bytecode weaving framework for Java using ASM

Mixin is a trait/mixin framework for Java using ASM and hooking into the runtime classloading process via a set of pluggable built-in or user-provided

Jan 7, 2023

Java annotation-based framework for parsing Git like command line structures

Airline Airline is a Java annotation-based framework for parsing Git like command line structures. Latest release is 0.8, available from Maven Central

Nov 26, 2022

Command line parsing framework for Java

JCommander This is an annotation based parameter parsing framework for Java 8. Here is a quick example: public class JCommanderTest { @Parameter

Dec 29, 2022

uniVocity-parsers is a suite of extremely fast and reliable parsers for Java. It provides a consistent interface for handling different file formats, and a solid framework for the development of new parsers.

uniVocity-parsers is a suite of extremely fast and reliable parsers for Java. It provides a consistent interface for handling different file formats, and a solid framework for the development of new parsers.

Welcome to univocity-parsers univocity-parsers is a collection of extremely fast and reliable parsers for Java. It provides a consistent interface for

Dec 15, 2022

Guice (pronounced 'juice') is a lightweight dependency injection framework for Java 6 and above, brought to you by Google.

Guice Latest release: 5.0.1 Documentation: User Guide, 5.0.1 javadocs, Latest javadocs Continuous Integration: Mailing Lists: User Mailing List Licens

Dec 29, 2022

A reactive Java framework for building fault-tolerant distributed systems

Atomix Website | Javadoc | Slack | Google Group A reactive Java framework for building fault-tolerant distributed systems Please see the website for f

Dec 29, 2022

Java 8 annotation processor and framework for deriving algebraic data types constructors, pattern-matching, folds, optics and typeclasses.

Derive4J: Java 8 annotation processor for deriving algebraic data types constructors, pattern matching and more! tl;dr Show me how to write, say, the

Nov 23, 2022

Desktop/Android/HTML5/iOS Java game development framework

Desktop/Android/HTML5/iOS Java game development framework

Cross-platform Game Development Framework libGDX is a cross-platform Java game development framework based on OpenGL (ES) that works on Windows, Linux

Jan 1, 2023

Eclipse Collections is a collections framework for Java with optimized data structures and a rich, functional and fluent API.

Eclipse Collections is a collections framework for Java with optimized data structures and a rich, functional and fluent API.

English | 中文 | Deutsch | Español | Ελληνικά | Français | 日本語 | Norsk (bokmål) | Português-Brasil | Русский | हिंदी Eclipse Collections is a comprehens

Jan 5, 2023

A Light-weight Job Scheduling Framework

Sundial A Lightweight Job Scheduling Framework for Java. In a Nutshell Sundial makes adding scheduled jobs to your Java application a walk in the park

Dec 9, 2022

The simple, stupid batch framework for Java

The simple, stupid batch framework for Java

Easy Batch The simple, stupid batch framework for Java™ Project status As of November 18, 2020, Easy Batch is in maintenance mode. This means only bug

Dec 29, 2022

Spring Framework

Spring Framework This is the home of the Spring Framework: the foundation for all Spring projects. Collectively the Spring Framework and the family of

Jan 9, 2023

Play Framework

Play Framework - The High Velocity Web Framework The Play Framework combines productivity and performance making it easy to build scalable web applica

Dec 29, 2022

:rocket: Lightning fast and elegant mvc framework for Java8

:rocket: Lightning fast and elegant mvc framework for Java8

Based on Java8 + Netty4 to create a lightweight, high-performance, simple and elegant Web framework 😋 Spend 1 hour to learn it to do something intere

Dec 28, 2022

The Grails Web Application Framework

Build Status Slack Signup Slack Signup Grails Grails is a framework used to build web applications with the Groovy programming language. The core fram

Jan 5, 2023
Owner
null
Event capture and querying framework for Java

Eventsourcing for Java Enabling plurality and evolution of domain models Instead of mutating data in a database, Eventsourcing stores all changes (eve

Eventsourcing, Inc. 408 Nov 5, 2022
Multi-DBMS SQL Benchmarking Framework via JDBC

BenchBase BenchBase (formerly OLTPBench) is a Multi-DBMS SQL Benchmarking Framework via JDBC. Table of Contents Quickstart Description Usage Guide Con

CMU Database Group 213 Dec 29, 2022
LSPatch: A non-root Xposed framework fork from Xpatch

Introduction LSPatch fork from Xpatch. LSPatch provides a way to insert dex and so into the target APK by repackaging. The following changes have been

LSPosed 1.9k Jan 2, 2023
Apache Cayenne is an open source persistence framework licensed under the Apache License

Apache Cayenne is an open source persistence framework licensed under the Apache License, providing object-relational mapping (ORM) and remoting services.

The Apache Software Foundation 284 Dec 31, 2022
Reladomo is an enterprise grade object-relational mapping framework for Java.

Reladomo What is it? Reladomo is an object-relational mapping (ORM) framework for Java with the following enterprise features: Strongly typed compile-

Goldman Sachs 360 Nov 2, 2022
Apache Aurora - A Mesos framework for long-running services, cron jobs, and ad-hoc jobs

NOTE: The Apache Aurora project has been moved into the Apache Attic. A fork led by members of the former Project Management Committee (PMC) can be fo

The Apache Software Foundation 627 Nov 28, 2022
A javaagent framework

ja-netfilter 2022.2.0 A javaagent framework Usage download from the releases page add -javaagent:/absolute/path/to/ja-netfilter.jar argument (Change t

null 35 Jan 2, 2023
A gradle plugin for developing javaagent applications.

Javaagent Packing A gradle plugin for developing javaagent applications. Why this plugin Fast packing all dependencies Used many dependencies? Javaage

微莹·纤绫 0 May 13, 2022
💡极致性能的企业级Java服务器框架,RPC,游戏服务器框架,web应用服务器框架。(Extreme fast enterprise Java server framework, can be RPC, game server framework, web server framework.)

?? 为性能而生的万能服务器框架 ?? Ⅰ. zfoo简介 ?? 性能炸裂,天生异步,Actor设计思想,无锁化设计,基于Spring的MVC式用法的万能RPC框架 极致序列化,原生集成的目前二进制序列化和反序列化速度最快的 zfoo protocol 作为网络通讯协议 高可拓展性,单台服务器部署,

null 1k Jan 1, 2023
Google Mr4c GNU Lesser 3 Google Mr4c MR4C is an implementation framework that allows you to run native code within the Hadoop execution framework. License: GNU Lesser 3, .

Introduction to the MR4C repo About MR4C MR4C is an implementation framework that allows you to run native code within the Hadoop execution framework.

Google 911 Dec 9, 2022