Java agent: ja-netfilter

发表于:2023年11月22日 17点40分 0 阅读 1评论 3点赞

 这两天 pycharm 开始频繁提示授权到期了,之前一直用的大外甥的学校邮箱申请的教育版授权。到现在已经用了两年了,而现在大外甥都毕业了,也不想再继续去弄教育版的授权了。

于是开始找其他的授权,之所以不买正版是因为正版的加个 2000 多一年,多少超出了自己的对正版软件支持的额度那么亿点点。网上搜索了一下,各种乱七八糟的帖子,要求关注公众号的,各种垃圾充满了整个互联网,嗯,整体环境就是这个样子的。

后来觉得还是靠这个库比较合理,先看看官方的说明吧:

A Java Instrumentation 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 configlogs 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-appnamelogs-appname and plugins-appname.
    • if no javaagent args, they default to configlogs and plugins.
    • this mechanism will avoid extraneous and bloated configlogs and plugins.
  • run your java application and enjoy

github 上的链接已经被下掉了,可以看 gitee 的链接:

https://gitee.com/ja-netfilter/ja-netfilter

当然,这个插件并不是只能用来机会 jetbrain 系列,还可以用来干点别的。因为本身已经有个插件系统,可以自定义规则。基本基于 java 的都可以实现这么个和谐。

 从3.jetbra.in/ 找个可用的镜像,例如https://hardbin.com/ipfs/bafybeia4nrbuvpfd6k7lkorzgjw3t6totaoko7gmvq5pyuhl2eloxnfiri/ 点击之后去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/qPj+5/we9NH71WRB0hqUoLI2AKKyiPw++FtN4Su1vsdDlrAzDj9ILjpjJKA1ImuVcG329/WTYIKysZ1CWK3zATg9BeCUPAV1pQy8ToXOq+RSYen6winZ2OO93eyHv2Iw5kbn1dqfBw1BuTE29V2FJKicJSu8iEOpfoafwJISXmz1wnnWL3V/0NxTulfWsXugOoLfv0ZIBP1xH9kmf22jjQ2JiHhQZP7ZDsreRrOeIQ/c4yR8IQvMLfC0WKQqrHu5ZzXTH4NO3CwGWSlTY74kE91zXB5mwWAx1jig+UXYc2w4RkVhy0//lOmVya/PEepuuTTI4+UJwC7qbVlh5zfhj8oTNUXgN0AOc+Q0/WFPl1aw5VV/VrO8FCoB15lFVlpKaQ1Yh+DVU8ke+rt9Th0BCHXe0uZOEmH0nOnH/0onD

下载顶部的:

Download jetbra.zip (230914), and configure as described in readme.txt! For testing purposes only, not for commercial use!
Please note that this is just a personal page, not an official website!

执行对应操作系统的安装脚本,然后重新启动 pycharm 就可以和谐了。

The post Java agent: ja-netfilter first appeared on obaby@mars.

{{c.name}} {{c.create_time|simymdhm}} {{c.like_num}}
{{c.content}}