To proxy a plugin, follow the same steps as with Vendetta:
1. Ensure the original source code is public/open-source with a suitable license.
2. Build your plugin and host it publicly, such as on GitHub Pages or your own domain.
3. Post your plugin URL in the #proxy-requests channel.
4. Staff will review and update the proxy.
To streamline the review process, developers must make the following changes before requesting a proxy. These modifications make it easier to review build artifacts. If you've customized your build scripts, you can skip any unnecessary steps.
If you're using Vendetta's plugin template, note that the build file ./build.mjs (line 37-43) has incomplete SWC configuration. Replace the env section with the following to avoid unnecessary polyfills:
env: {
targets: "fully supports es6",
include: [
"transform-block-scoping",
"transform-classes",
"transform-async-to-generator",
"transform-async-generator-functions"
],
exclude: [
"transform-parameters",
"transform-template-literals",
"transform-exponentiation-operator",
"transform-named-capturing-groups-regex",
"transform-nullish-coalescing-operator",
"transform-object-rest-spread",
"transform-optional-chaining",
"transform-logical-assignment-operators"
]
},
Typically, your plugin's JS bundle is minified. While it's possible for proxy managers to review minified JS (yes, this is how it's been done), why would we reverse-engineer open-source code? To proxy plugins in bn-proxy, your JS bundle must be unminified.
Optionally, you can introduce a "min-main" field to specify your minified files for users who directly use your plugin from the source.
manifest.json
:
Reference: https://github.com/pyoncord/Bunny
After reviewing your JS bundle, we will minify it and overwrite the path specified in "min-main"
. If "min-main"
is not specified, we will perform a manifest.main.replace(/(?:\.js)?$/, ".min.js")
* and write the file there. The minification configuration will be shared later.
*This snippet replaces .js with .min.js. If the file name doesn't end with .js, .min.js will be appended.