### Application Initialization Source: https://github.com/tobychui/zoraxy/blob/main/src/mod/sshprox/wintty/index.html Calls the initial setup function to start the application. ```javascript // Start the application init(); ``` -------------------------------- ### Install WebsocketProxy Source: https://github.com/tobychui/zoraxy/blob/main/src/mod/websocketproxy/README.md Use 'go get' to install the websocketproxy package. ```bash go get github.com/koding/websocketproxy ``` -------------------------------- ### Start Quickstart Tour in Zoraxy Source: https://github.com/tobychui/zoraxy/blob/main/src/web/components/quickstart.html This JavaScript code handles click events on tutorial elements to activate them and initiate the quick start tour. It updates the active service option and calls the startQuickStartTour function. ```javascript $("#quickstart .tutorial").on("click", function(data){ $(".serviceOption.active").removeClass("active"); let tourType = $(this).attr("name"); currentQuickSetupClass = tourType; startQuickStartTour(); }); ``` -------------------------------- ### Install Go on Debian/Ubuntu using Snap Source: https://github.com/tobychui/zoraxy/wiki/Troubleshooting----Workarounds Use this command to install the Go snap package on Ubuntu systems. ```bash sudo snap install go --classic ``` -------------------------------- ### Example index.html for Plugin UI Source: https://github.com/tobychui/zoraxy/blob/main/docs/plugins/html/3. Basic Examples/1. Hello World.html An example HTML file for the plugin's web UI, demonstrating the use of Zoraxy's internal resources like CSS and theme toggling. ```html Hello World Plugin

Hello World!

This is a simple 'Hello World' plugin.

``` -------------------------------- ### Initiate Plugin List Display Source: https://github.com/tobychui/zoraxy/blob/main/src/web/components/plugins.html Fetches and displays a list of installed plugins in a table. It formats author contact information and version strings, and handles the case where no plugins are installed. ```javascript initiatePluginList(){ $.get("/api/plugins/list", function(data){ $("#pluginTable").html(""); data.forEach(plugin => { let authorContact = plugin.Spec.author_contact; if(!authorContact.startsWith('http')){ authorContact = `mailto:${authorContact}`; } let versionString = `v${plugin.Spec.version_major}.${plugin.Spec.version_minor}.${plugin.Spec.version_patch}`; const row = `

${plugin.Spec.name}
${versionString} by ${plugin.Spec.author}

${plugin.Spec.description}
${plugin.Spec.url} ${plugin.Spec.type==0?"Router":"Utilities"} ${plugin.SupportHotRebuild ? ` ` : ''} `; $("#pluginTable").append(row); }); if (data.length == 0){ $("#pluginTable").append(` No plugins installed `); } console.log(data); }); } initiatePluginList(); ``` -------------------------------- ### HTML for RESTful Example Source: https://github.com/tobychui/zoraxy/blob/main/docs/plugins/docs/3. Basic Examples/2. RESTful Example.md This HTML file sets up the user interface for interacting with RESTful APIs. It includes forms for sending GET and POST requests and displays responses. Note the CSRF token meta tag for POST requests. ```html RESTful Example

RESTFul API Example

Echo Test (HTTP GET)

Form Post Test (HTTP POST)