### Link to Quickstart Guide
Source: https://github.com/karingx/karing-docu/blob/main/i18n/en/docusaurus-plugin-content-docs/current/faq.md
Use this component to create a link to the Quickstart tutorial for new users.
```mdx
```
--------------------------------
### URL Scheme Examples
Source: https://github.com/karingx/karing-docu/blob/main/i18n/en/docusaurus-plugin-content-docs/current/cooperation/scheme.md
Examples of URL schemes for installing configurations and performing backup/restore operations. Parameters must be URL-encoded.
```jsx
# Add configuration
clash://install-config?url=xxxx&name=xxx
karing://install-config?url=xxxx&name=xxx&isp-name=xxx&isp-faq=xxx&isp-url=xxx
# Backup and restore
karing://restore-backup?url=xxxx
```
--------------------------------
### Install Project Dependencies
Source: https://github.com/karingx/karing-docu/blob/main/AGENTS.md
Installs all necessary packages for the project. Run this after cloning the repository.
```bash
npm install
```
--------------------------------
### Start Development Server
Source: https://github.com/karingx/karing-docu/blob/main/AGENTS.md
Starts a local development server for live preview. Use for editing docs, pages, or CSS.
```bash
npm run start
```
--------------------------------
### Start sing-poet Server
Source: https://github.com/karingx/karing-docu/blob/main/src/pages/sing-poet.md
Move the compiled binary to the desired location, make it executable, and then start the server using its configuration files.
```bash
mv release/poet/test/sing-poet /usr/local/bin/sing-poet
chmod +x /usr/local/bin/sing-poet
#start with configuration files
sudo /usr/local/bin/sing-poet run -c server_vmess.json -p panel_vmess.json
```
--------------------------------
### Start Local Docusaurus Environment
Source: https://github.com/karingx/karing-docu/blob/main/AGENTS.md
Starts the local Docusaurus environment for verification. This is the preferred command for checking for obvious errors.
```bash
npx docusaurus start
```
--------------------------------
### Xboard Configuration for Karing
Source: https://github.com/karingx/karing-docu/blob/main/docs/cooperation/xboard.md
Example configuration for Xboard, showing how to integrate custom JavaScript for Karing. This snippet is from the Xboard theme's dashboard template.
```html
```
--------------------------------
### ADB Commands for Karing Activity Launch with Command
Source: https://github.com/karingx/karing-docu/blob/main/docs/cooperation/android_automation.md
Use these ADB commands to explicitly start Karing's MainActivity and pass a command parameter to control connection states. This method is compatible with older versions.
```bash
adb shell am start -n com.nebula.karing/.MainActivity --es command connect
```
```bash
adb shell am start -n com.nebula.karing/.MainActivity --es command disconnect
```
```bash
adb shell am start -n com.nebula.karing/.MainActivity --es command reconnect
```
--------------------------------
### Connection Operations via URL Scheme
Source: https://github.com/karingx/karing-docu/blob/main/i18n/en/docusaurus-plugin-content-docs/current/cooperation/scheme.md
Examples of URL schemes for managing connections. These commands allow opening, disconnecting, and reconnecting to services.
```jsx
# Connection operation
karing://connect Open connection
karing://disconnect Disconnect
karing://reconnect Reconnect
```
--------------------------------
### Notice.json Structure for Various Platforms
Source: https://github.com/karingx/karing-docu/blob/main/docs/cooperation/harry/notice.json.md
This example demonstrates the structure of `notice.json` for different platforms including Windows, iOS (Test Flight and App Store), macOS, and Android. Each entry defines platform-specific notification parameters.
```json
[
// --- ---> 以下为windows平台消息
{
"platform": "windows",
"channel": "windows",
"version_regex": "",
"region_code": "",
"update_time": "",
"expire_time": "",
"title": "",
"content": "",
"url": ""
},
// --- ---> 以下为ios testflight平台消息
{
"platform": "ios",
"channel": "Apple - Test Flight",
"version_regex": "",
"region_code": "",
"update_time": "",
"expire_time": "",
"title": "",
"content": "",
"url": ""
},
// --- ---> 以下为ios appstore平台消息
{
"platform": "ios",
"channel": "Apple - App Store",
"version_regex": "",
"region_code": "",
"update_time": "",
"expire_time": "",
"title": "",
"content": "",
"url": ""
},
// --- ---> 以下为macos平台消息(包括testflight)
{
"platform": "macos",
"channel": "macos",
"version_regex": "",
"region_code": "",
"update_time": "",
"expire_time": "",
"title": "",
"content": "",
"url": ""
},
// --- ---> 以下为android平台消息
{
"platform": "android",
"channel": "*,android",
"version_regex": "",
"region_code": "",
"update_time": "",
"expire_time": "",
"title": "",
"content": "",
"url": ""
}
]
```
--------------------------------
### Update base.json for Custom Config Hosting
Source: https://github.com/karingx/karing-docu/blob/main/i18n/en/docusaurus-plugin-content-docs/current/cooperation/harry/config.json.md
This example shows how to modify the 'config' field within base.json to specify a custom URL for hosting the config.json file. This allows users to self-host their Karing configurations on their own websites.
```json
{
... ...
"config": "https://your-own-website/karing/config.json",
... ...
}
```
--------------------------------
### Configure Karing Base JSON
Source: https://github.com/karingx/karing-docu/blob/main/docs/cooperation/sspanel.md
Update the `base.json` configuration file in your Karing setup. The 'connect' field should point to your SSPanel's Karing connection URL, and 'spells' can be used for airport identification.
```json
{
"pid": 123456,
...
"connet": "https://your-domain/karing/connect",
"spells": [
'急速云',
'RapidNetwork',
],
...
}
```
--------------------------------
### Manage sing-poet with systemd
Source: https://github.com/karingx/karing-docu/blob/main/src/pages/sing-poet.md
Control the sing-poet service using systemctl commands for starting, stopping, and restarting.
```bash
#start
systemctl start sing-poet
#stop
systemctl stop sing-poet
#restart
systemctl restart sing-poet
```
--------------------------------
### Configure Proxychains-ng for SOCKS5 Proxy
Source: https://github.com/karingx/karing-docu/blob/main/blog/case/wsl2.md
This configuration adds a SOCKS5 proxy entry to the proxychains.conf file, specifying the host IP and port for the proxy server. Ensure the IP and port match your Karing setup.
```jsx
[ProxyList]
socks5 172.31.160.1 3066
```
--------------------------------
### Built-in Rule Set Example
Source: https://github.com/karingx/karing-docu/blob/main/i18n/en/docusaurus-plugin-content-docs/current/tutorial/diversion.md
This list shows examples of built-in rule sets for GeoIP and GeoSite, including specific configurations for China (!cn and cn) and Iran. These rules help determine how traffic is routed based on geographic location.
```plaintext
geoip/ amazon.srs arvancloud.srs bing.srs derakcloud.srs digitalocean.srs github.srs iranserver.srs ir.srs linode.srs malware.srs microsoft.srs openai.srs oracle.srs parspack.srs phishing.srs geosite ads.srs category-ads-ir.srs category-bank-ir.srs category-bourse-ir.srs category-education-ir.srs category-forums-ir.srs category-gov-ir.srs category-insurance-ir.srs category-ir.srs category-media-ir.srs category-news-ir.srs category-payment-ir.srs category-scholar-ir.srs category-shopping-ir.srs category-social-media-ir.srs
category-tech-ir.srs
category-travel-ir.srs
cn@ads.srs
cryptominers.srs
geolocation-!cn@ads.srs
geolocation-cn@ads.srs
ir.srs
malware.srs
nsfw.srs
phishing.srs
social.srs
```
--------------------------------
### APP Initial Configuration (config.json)
Source: https://github.com/karingx/karing-docu/blob/main/i18n/en/docusaurus-plugin-content-docs/current/cooperation/harry/config.json.md
This snippet shows the structure of the initial configuration file for the APP. It includes settings for DNS resolution, including enabling/disabling features like DNS diversion, ECS, and fake IP, as well as specifying various DNS server addresses for different traffic types.
```json
// APP初始配置文件
{
"rule_sets": {
//禁用机场规则, false启用
"disable_isp_diversion_group": true
},
"dns": {
"ttl": 43200,
//启用dns分流规则
"enable_rule": false,
//测试域名
"test_domain": "gstatic.com",
//启用ecs
"enable_client_subnet": true,
//启用fakeip
"enable_fake_ip": true,
//代理流量:通过代理解析dns
"enable_proxy_resolve_by_proxy": true,
//final:通过代理解析dns
"enable_final_resolve_by_proxy": true,
//开启入站域名解析(针对tun)
"enable_inbound_domain_resolve": false,
//dns服务器
"resolver_addresses": [
"local",
"dhcp://auto",
"udp://223.6.6.6"
],
//代理服务器
"outbound_addresses": [
"local",
"dhcp://auto",
"udp://8.8.8.8",
"udp://223.6.6.6"
],
//直连流量
"direct_addresses": [
"local",
"dhcp://auto",
"udp://8.8.8.8",
"udp://223.6.6.6"
],
//代理流量
"proxy_addresses": [
"https://1.1.1.1/dns-query",
"https://dns.google/dns-query"
],
//final
"final_addresses": [
"https://1.1.1.1/dns-query",
"https://dns.google/dns-query"
],
//机场自定义DNS, 默认空
"list": [
{
"isp": "custom dns",
"url": "udp://7.8.9.9"
}
]
}
}
```
--------------------------------
### Serve Built Site Locally
Source: https://github.com/karingx/karing-docu/blob/main/AGENTS.md
Serves the built Docusaurus site locally. Use this after running `npm run build` to inspect production output.
```bash
npm run serve
```
--------------------------------
### Install VPN Module on Android
Source: https://github.com/karingx/karing-docu/blob/main/docs/faq.md
If an Android system has removed the VPN module, it can be restored using ADB. This command reinstalls the VPN dialogs component.
```shell
adb shell pm install-existing com.android.vpndialogs
```
--------------------------------
### Get WSL2 Host IP Address
Source: https://github.com/karingx/karing-docu/blob/main/blog/case/wsl2.md
This command retrieves the IP address of the Windows host from within WSL2 by parsing the 'nameserver' entry in the resolv.conf file.
```bash
grep nameserver /etc/resolv.conf | awk -F ' ' '{print $2}'
```
--------------------------------
### Configure Docker Daemon Proxy Settings
Source: https://github.com/karingx/karing-docu/blob/main/blog/case/docker.md
Add these settings to `/etc/docker/daemon.json` to direct Docker daemon traffic through a proxy. Replace the IP and port with your Karing instance's details.
```json
{
"proxies": {
"http-proxy": "socks5://172.25.83.1:3066",
"https-proxy": "socks5://172.25.83.1:3066"
}
}
```
--------------------------------
### ADB Commands for Karing Deep Links
Source: https://github.com/karingx/karing-docu/blob/main/docs/cooperation/android_automation.md
Test Karing's deep link URLs using ADB to initiate connect, disconnect, or reconnect actions. These commands simulate opening the specified URL.
```bash
adb shell am start -a android.intent.action.VIEW -d "karing://connect"
```
```bash
adb shell am start -a android.intent.action.VIEW -d "karing://disconnect"
```
```bash
adb shell am start -a android.intent.action.VIEW -d "karing://reconnect"
```
--------------------------------
### Verify Docker Daemon Proxy Configuration
Source: https://github.com/karingx/karing-docu/blob/main/blog/case/docker.md
Run `docker info` to confirm that the HTTP and HTTPS proxy settings have been correctly applied to the Docker daemon.
```bash
$docker info
... Debug Mode: false
HTTP Proxy: socks5://172.25.83.1:3066
HTTPS Proxy: socks5://172.25.83.1:3066
...
```
--------------------------------
### Karing Configuration in base.json
Source: https://github.com/karingx/karing-docu/blob/main/docs/cooperation/xboard.md
Configure Karing's 'connect' URL and 'spells' in the base.json file. The 'connect' field should point to the karing-connect.html page, and 'spells' lists the keywords for airport binding.
```json
{
"pid": 123456,
...
"connet": "https://your-domain/karing-connect.html",
"spells": [
'急速云',
'RapidNetwork',
],
...
}
```
--------------------------------
### Check Open Ports on Windows
Source: https://github.com/karingx/karing-docu/blob/main/blog/case/wsl2.md
Use this command to view currently open ports on your Windows system. This can help in verifying if Karing or other applications are listening on expected ports.
```bash
netstat -na
```
--------------------------------
### Auto Import Karing with URL Scheme
Source: https://github.com/karingx/karing-docu/blob/main/i18n/en/docusaurus-plugin-content-docs/current/cooperation/menu.md
Use this URL scheme to call the Karing 'Add Configuration' page. Ensure the URL parameter is properly URL-encoded.
```html
Auto Import Karing
```
--------------------------------
### Add Karing Controller Route
Source: https://github.com/karingx/karing-docu/blob/main/docs/cooperation/sspanel.md
Add this route to your `app/routes.php` file to handle Karing connections. Ensure your SSPanel version is compatible.
```php
// Connect to Karing
$app->get('/karing/connect', App\Controllers\KaringController::class . ':connect');
```
--------------------------------
### Link to Download Karing
Source: https://github.com/karingx/karing-docu/blob/main/i18n/en/docusaurus-plugin-content-docs/current/faq.md
Use this component to create a link to the Karing download page.
```mdx
import DocCard from '@theme/DocCard';
```
--------------------------------
### Deploy Site
Source: https://github.com/karingx/karing-docu/blob/main/AGENTS.md
Deploys the Docusaurus site. This script is present but should not be run unless explicitly requested.
```bash
npm run deploy
```
--------------------------------
### Karing Connect HTML Page
Source: https://github.com/karingx/karing-docu/blob/main/i18n/en/docusaurus-plugin-content-docs/current/cooperation/xboard.md
This HTML file serves as an intermediate page for Karing APP. It sets a 'karing=connect' cookie to mark itself as the Karing connection entry point and then redirects the user to Xboard's login page.
```html
Karing Connect
```