SlimeDog / NetworkInterceptor

Monitor and block outgoing network connections
The Unlicense
37 stars 5 forks source link

Deprecated method call on Waterfall #48

Closed SlimeDog closed 1 year ago

SlimeDog commented 1 year ago

Server Environment

Configuration

methods:
  - security-manager
  - proxy-selector
check-for-updates: true
update-source: Hangar
enable-metrics: true
mode: allow
logging:
  enabled: true
  include-traces: false
  mode: file
  truncate-file-on-start: true
blocking:
  enabled: true
mapping:
  enabled: true
  timer: 1000
trusted-plugins:
  - ChessCraft
  - LuckPerms
  - Plan
  - SystemProperties
blocked-plugins: []
targets:
  - 'api.mojang.com'
  - 'sessionserver.mojang.com'
  - 'launcher.mojang.com'
  - 'launchermeta.mojang.com'
  - 'api.papermc.io'
... 

Error from waterfall log

[17:02:46 INFO] [NetworkInterceptor]: Interceptors: [security-manager, proxy-selector]
WARNING: A terminally deprecated method in java.lang.System has been called
WARNING: System::setSecurityManager has been called by me.lucko.networkinterceptor.interceptors.SecurityManagerInterceptor (file:/home/ram/BungeeCord/plugins/NetworkInterceptor-3.4.0.jar)
WARNING: Please consider reporting this to the maintainers of me.lucko.networkinterceptor.interceptors.SecurityManagerInterceptor
WARNING: System::setSecurityManager will be removed in a future release
mart-r commented 1 year ago

I'm fairly certain this has to do with Java deprecating the use of SecurityManager. As far as I know, there's nothing I can do about it. There doesn't seem to be an alternative in the works, either: https://openjdk.org/jeps/411

SlimeDog commented 1 year ago

You are correct. BTW, the WARNING appears on the bungee/waterfall console, not in the log. The same for velocity, and probably for paper/spigot server as well, but it scrolls away so I hadn't noticed it for a while. This despite that I start them per the wiki instruction posted long ago:

⚠️ SecurityManager was terminally deprecated in Java 17. This affects NetworkInterceptor on all platforms. Fortunately, the issue is easily resolved, without change to NetworkInterceptor. Add the following specification to server/proxy start-up java -Djava.security.manager=allow. This specification was verified to be compatible with Java 17.0.1 (and later), Java 18, and Java 19, and Java 20.

I guess eventually it will fail, and NetworkIntercepter will become relatively useless.