mirror of
https://github.com/tobychui/zoraxy.git
synced 2025-06-04 22:57:20 +02:00
304 lines
13 KiB
HTML
304 lines
13 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en" class="is-white">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<link rel="icon" type="image/png" href="/favicon.png">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>
|
|
What is Zoraxy Plugin | Zoraxy Documentation
|
|
</title>
|
|
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/showdown/2.1.0/showdown.min.js" integrity="sha512-LhccdVNGe2QMEfI3x4DVV3ckMRe36TfydKss6mJpdHjNFiV07dFpS2xzeZedptKZrwxfICJpez09iNioiSZ3hA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
|
<!-- css -->
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/tocas-ui/5.0.2/tocas.min.css">
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/tocas-ui/5.0.2/tocas.min.js"></script>
|
|
<!-- Fonts -->
|
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@400;500;700&display=swap" rel="stylesheet">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
|
<!-- Code highlight -->
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/styles/default.min.css">
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/highlight.min.js"></script>
|
|
<!-- additional languages -->
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/languages/go.min.js"></script>
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/languages/c.min.js"></script>
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/languages/javascript.min.js"></script>
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/languages/xml.min.js"></script>
|
|
<script>
|
|
hljs.highlightAll();
|
|
</script>
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/styles/tomorrow-night-bright.css">
|
|
<style>
|
|
#msgbox{
|
|
position: fixed;
|
|
bottom: 1em;
|
|
right: 1em;
|
|
z-index: 9999;
|
|
}
|
|
|
|
@keyframes fadeIn {
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
dialog[open] {
|
|
animation: fadeIn 0.3s ease-in-out;
|
|
}
|
|
|
|
code{
|
|
border-radius: 0.5rem;
|
|
}
|
|
</style>
|
|
<script src="/html/assets/theme.js"></script>
|
|
</head>
|
|
<body>
|
|
<div class="ts-content">
|
|
<div class="ts-container">
|
|
<div style="float: right;">
|
|
<button class="ts-button is-icon" id="darkModeToggle">
|
|
<span class="ts-icon is-moon-icon"></span>
|
|
</button>
|
|
</div>
|
|
<div class="ts-tab is-pilled">
|
|
<a href="" class="item" style="user-select: none;">
|
|
<img id="sysicon" class="ts-image" style="height: 30px" white_src="/html/assets/logo.png" dark_src="/html/assets/logo_white.png" src="/html/assets/logo.png"></img>
|
|
</a>
|
|
<a href="#!" class="is-active item">
|
|
Documents
|
|
</a>
|
|
<a href="#!" class="item">
|
|
Examples
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="ts-divider"></div>
|
|
<div>
|
|
<div class="has-padded">
|
|
<div class="ts-grid mobile:is-stacked">
|
|
<div class="column is-4-wide">
|
|
<div class="ts-box">
|
|
<div class="ts-menu is-end-icon">
|
|
<a class="item">
|
|
Introduction
|
|
<span class="ts-icon is-caret-down-icon"></span>
|
|
</a>
|
|
<div class="ts-menu is-dense is-small is-horizontally-padded">
|
|
<a class="item is-active" href="/html/1. Introduction/1. What is Zoraxy Plugin.html">
|
|
What is Zoraxy Plugin
|
|
</a>
|
|
<a class="item" href="/html/1. Introduction/2. Getting Started.html">
|
|
Getting Started
|
|
</a>
|
|
</div>
|
|
<a class="item">
|
|
Architecture
|
|
<span class="ts-icon is-caret-down-icon"></span>
|
|
</a>
|
|
<div class="ts-menu is-dense is-small is-horizontally-padded">
|
|
<a class="item" href="/html/2. Architecture/1. Plugin Architecture.html">
|
|
Plugin Architecture
|
|
</a>
|
|
<a class="item" href="/html/2. Architecture/2. Introspect.html">
|
|
Introspect
|
|
</a>
|
|
<a class="item" href="/html/2. Architecture/3. Configure.html">
|
|
Configure
|
|
</a>
|
|
</div>
|
|
<a class="item">
|
|
Getting Started
|
|
<span class="ts-icon is-caret-down-icon"></span>
|
|
</a>
|
|
<a class="item" href="/html/index.html">
|
|
index
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="column is-12-wide">
|
|
<div class="ts-box">
|
|
<div class="ts-container is-padded has-top-padded-large">
|
|
<h1 id="what-is-zoraxy-plugin">
|
|
What is Zoraxy Plugin?
|
|
</h1>
|
|
<p>
|
|
<p class="ts-text">
|
|
Zoraxy Plugin is a powerful extension feature designed to enhance the functionality of the Zoraxy system. It provides additional features and capabilities that are not part of the core system, allowing users to customize their experience and optimize performance. The plugin is built to be modular and flexible, enabling users to tailor their Zoraxy environment to meet specific needs.
|
|
</p>
|
|
</p>
|
|
<p>
|
|
<p class="ts-text">
|
|
Zoraxy plugins are distributed as binaries, and developers have the flexibility to choose whether to open source them or not
|
|
<strong>
|
|
as the plugin library and interface are open source under the LGPL license
|
|
</strong>
|
|
.
|
|
</p>
|
|
</p>
|
|
<p>
|
|
<p class="ts-text">
|
|
There are two primary types of plugins:
|
|
</p>
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<strong>
|
|
Router plugins
|
|
</strong>
|
|
: Involved with connections from HTTP proxy rules.
|
|
<br>
|
|
</li>
|
|
<li>
|
|
<strong>
|
|
Utility plugins
|
|
</strong>
|
|
: Provide user interfaces for various network features that operate independently of the Zoraxy core.
|
|
<br>
|
|
</li>
|
|
</ul>
|
|
<div class="ts-divider"></div>
|
|
<h2 id="how-plugins-are-distributed-installed">
|
|
How plugins are distributed & installed
|
|
</h2>
|
|
<p>
|
|
<p class="ts-text">
|
|
Zoraxy plugins are distributed as platform-dependent binaries, tailored to specific operating systems and CPU architectures. These binaries follow a naming convention that includes the operating system, CPU architecture, and plugin name, such as
|
|
<code>
|
|
linux_amd64_foobar
|
|
</code>
|
|
,
|
|
<code>
|
|
windows_amd64_foobar.exe
|
|
</code>
|
|
, or
|
|
<code>
|
|
linux_arm64_foobar
|
|
</code>
|
|
.
|
|
</p>
|
|
</p>
|
|
<p>
|
|
<p class="ts-text">
|
|
To manually install a plugin for testing, place the binary file into the
|
|
<code>
|
|
/plugins/{plugin_name}/
|
|
</code>
|
|
folder within your Zoraxy installation directory.
|
|
</p>
|
|
</p>
|
|
<div class="ts-quote">
|
|
<p>
|
|
<p class="ts-text">
|
|
<strong>
|
|
Warning:
|
|
</strong>
|
|
The binary name inside the folder must match the plugin folder name. For example, the binary should be named
|
|
<code>
|
|
foobar
|
|
</code>
|
|
(or
|
|
<code>
|
|
foobar.exe
|
|
</code>
|
|
on Windows) if placed in the
|
|
<code>
|
|
/plugins/foobar/
|
|
</code>
|
|
folder. Avoid using names like
|
|
<code>
|
|
foobar_plugin.exe
|
|
</code>
|
|
.
|
|
</p>
|
|
</p>
|
|
</div>
|
|
<p>
|
|
<p class="ts-text">
|
|
For distribution, a plugin store system is used. The plugin store architecture is similar to the one built into the Arduino IDE, with a manager URL (a JSON file) listing all the plugins supported by that store. See the documentation section for more details on how to implement your own plugin store.
|
|
</p>
|
|
</p>
|
|
<div class="ts-divider"></div>
|
|
<h2 id="plugin-vs-pull-request">
|
|
<div class="ts-header is-large">
|
|
Plugin vs Pull Request
|
|
</div>
|
|
</h2>
|
|
<p>
|
|
<p class="ts-text">
|
|
The Zoraxy plugin was introduced to address specific use cases that enhance its functionality. It serves as an extension to the core Zoraxy system, providing additional features and capabilities while maintaining the integrity of the core system.
|
|
</p>
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
Designed to handle features that are challenging to integrate directly into the Zoraxy core.
|
|
<br>
|
|
</li>
|
|
<li>
|
|
Caters to scenarios where certain features are only applicable in limited situations, avoiding unnecessary resource consumption for other users.
|
|
<br>
|
|
</li>
|
|
<li>
|
|
Allows for frequent updates to specific code components without impacting the core’s stability or causing downtime.
|
|
<br>
|
|
</li>
|
|
</ul>
|
|
<div class="ts-divider"></div>
|
|
<h3 id="when-should-you-add-a-core-pr-or-a-plugin">
|
|
<div class="ts-header">
|
|
When should you add a core PR or a plugin?
|
|
</div>
|
|
</h3>
|
|
<p>
|
|
<p class="ts-text">
|
|
In certain situations, implementing a feature as a plugin is more reasonable than directly integrating it into the Zoraxy core:
|
|
</p>
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<strong>
|
|
Core PR
|
|
</strong>
|
|
: If the feature is relevant to most users and enhances Zoraxy’s core functionality, consider submitting a core Pull Request (PR).
|
|
<br>
|
|
</li>
|
|
<li>
|
|
<strong>
|
|
Plugin
|
|
</strong>
|
|
: If the feature is targeted at a smaller user base or requires additional dependencies that not all users need, it should be developed as a plugin.
|
|
<br>
|
|
</li>
|
|
</ul>
|
|
<p>
|
|
The decision depends on the feature’s general relevance and its impact on core stability. Plugins offer flexibility without burdening the core.
|
|
</p>
|
|
</div>
|
|
<br>
|
|
<br>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="ts-container">
|
|
<div class="ts-divider"></div>
|
|
<div class="ts-content">
|
|
<div class="ts-text">
|
|
Zoraxy © tobychui
|
|
<span class="thisyear">
|
|
2025
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script>
|
|
$(".thisyear").text(new Date().getFullYear());
|
|
</script>
|
|
</body>
|
|
</html> |