Sample Use Cases - SlimeDog/NetworkInterceptor GitHub Wiki

NetworkInterceptor ▪ Monitor and block outgoing network connections

The following are some simple examples of configuration options.

Use case #1: Allow plugin update checks

We would like to allow plugins to check for updates. We can configure NetworkInterceptor to allow such connections.

mode: allow
blocking:
  enabled: true
targets:
  - 'api.github.com'
  - 'api.spiget.org'
  - 'api.spigotmc.org'

In allow mode, you must list all of the targets to which you want to allow connections; many more targets must be allowed for the server to function properly. See sample-allow-config.yml for a list of the more common targets that must be considered.

Use case #2: Deny plugin update checks

We developed an offline plugin update checker. We do not want plugins to perform update checks from the running server. Unfortunately, all of them do not offer configuration options to disable the checks. We can configure NetworkInterceptor to deny such connections.

mode: deny
blocking:
  enabled: true
targets:
  - 'api.github.com'
  - 'api.spiget.org'
  - 'api.spigotmc.org'

In deny mode, only targets that you want to block need to be listed, so it is often the better choice. See sample-deny-config.yml.