diff --git a/content/docs/admins-guide/_index.md b/content/docs/admins-guide/_index.md deleted file mode 100644 index e101ab0..0000000 --- a/content/docs/admins-guide/_index.md +++ /dev/null @@ -1,3 +0,0 @@ ---- -title: Admins Guide ---- diff --git a/content/docs/admins-guide/admin-management.md b/content/docs/admins-guide/admin-management.md deleted file mode 100644 index caa58a3..0000000 --- a/content/docs/admins-guide/admin-management.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -title: Admin Management -weight: 5 ---- diff --git a/content/docs/admins-guide/user-management.md b/content/docs/admins-guide/user-management.md deleted file mode 100644 index d0e6473..0000000 --- a/content/docs/admins-guide/user-management.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -title: User Management -weight: 1 ---- diff --git a/content/docs/configuration/vpn-backends/hysteria.md b/content/docs/configuration/vpn-backends/hysteria.md index e69de29..c6f91ba 100644 --- a/content/docs/configuration/vpn-backends/hysteria.md +++ b/content/docs/configuration/vpn-backends/hysteria.md @@ -0,0 +1,6 @@ +--- +title: hysteria 2 +weight: 3 +--- + +[Hysteria 2](https://github.com/apernet/hysteria/) is a mono-protocol backend supported by marznode. \ No newline at end of file diff --git a/content/docs/configuration/vpn-backends/sing-box.md b/content/docs/configuration/vpn-backends/sing-box.md new file mode 100644 index 0000000..17b13e7 --- /dev/null +++ b/content/docs/configuration/vpn-backends/sing-box.md @@ -0,0 +1,60 @@ +--- +title: sing-box +weight: 2 +--- + +[Sing-box](https://sing-box.sagernet.org/) is yet another backend supported by marznode. + +Currently supported protocols include: +- VMess +- VLESS +- Trojan +- Shadowsocks +- Hysteria2 +- TUIC + + +## Configuration settings on marznode +The following environmental variables are used to utilize and configure sing-box on marznode: +- `SING_BOX_ENABLED` `True`/`False` +- `SING_BOX_EXECUTABLE_PATH` Path to the sing-box binary. The binary should include `with_v2ray_api` tag. +- `SING_BOX_CONFIG_PATH` Path to sing-box config. +- `SING_BOX_RESTART_ON_FAILURE` Whether to restart in case of crash/exit. `True`/`False` +- `SING_BOX_RESTART_ON_FAILURE_INTERVAL` Interval between restarts in case of crash. + +## Example, using the marznode docker image +Sing-box is included by default in [marznode docker image](https://hub.docker.com/r/dawsh/marznode), with the binary placed in `/usr/local/bin/sing-box`. + +A fine compose.yml looks like this: + +```yaml +services: + marznode: + image: dawsh/marznode:latest + restart: always + network_mode: host + command: [ "sh", "-c", "sleep 10 && python3 marznode.py" ] + + environment: + XRAY_EXECUTABLE_PATH: "/usr/local/bin/xray" + XRAY_ASSETS_PATH: "/usr/local/lib/xray" + XRAY_CONFIG_PATH: "/var/lib/marznode/xray_config.json" + + # The following variables tell marznode to run sing-box: + SING_BOX_ENABLED: "True" + SING_BOX_EXECUTABLE_PATH: "/usr/local/bin/sing-box" + SING_BOX_CONFIG_PATH: "/var/lib/marznode/sing-box.json" + + HYSTERIA_EXECUTABLE_PATH: "/usr/local/bin/hysteria" + SSL_CLIENT_CERT_FILE: "/var/lib/marznode/client.pem" + SSL_KEY_FILE: "./server.key" + SSL_CERT_FILE: "./server.cert" + + volumes: + - /var/lib/marznode:/var/lib/marznode +``` + +Make sure `/var/lib/marznode/sing-box.json` exists, and is a valid sing-box config. + +## See also +- [configuration documents](https://sing-box.sagernet.org/configuration/) \ No newline at end of file diff --git a/content/docs/configuration/vpn-backends/xray.md b/content/docs/configuration/vpn-backends/xray.md index e69de29..f47d60e 100644 --- a/content/docs/configuration/vpn-backends/xray.md +++ b/content/docs/configuration/vpn-backends/xray.md @@ -0,0 +1,26 @@ +--- +title: Xray-core +weight: 1 +--- + + +[Xray-core](https://github.com/xtls/xray-core) is a backend supported by marznode. Xray is enabled by default on marznode. + + +Currently supported protocols include: +- VMess +- VLESS +- Trojan +- Shadowsocks + + +## Configuration settings on marznode +The following environmental variables are used to utilize and configure Xray on marznode: +- `XRAY_ENABLED` `True`/`False` +- `XRAY_EXECUTABLE_PATH` Path to the xray binary. +- `XRAY_CONFIG_PATH` Path to xray config. +- `XRAY_RESTART_ON_FAILURE` Whether to restart in case of crash/exit. `True`/`False` +- `XRAY_RESTART_ON_FAILURE_INTERVAL` Interval between restarts in case of crash. + +## See also +- [configuration documents](https://xtls.github.io/config/) diff --git a/content/docs/how-to-guides/backup.md b/content/docs/how-to-guides/backup.md index 1cbda62..aa1703c 100644 --- a/content/docs/how-to-guides/backup.md +++ b/content/docs/how-to-guides/backup.md @@ -2,8 +2,7 @@ title: "Backup" --- -It's always a good idea to backup your Marzneshin files regularly to prevent data loss in case of system failures or -accidental deletion. Here are the steps to backup Marzneshin: +It's good practice to backup your Marzneshin files regularly to prevent data loss in case of system failures. 1. By default, all Marzneshin important files are saved in `/var/lib/marzneshin` (Docker versions). Copy the entire `/var/lib/marzneshin` directory to a backup location of your choice, such as an external hard drive or cloud diff --git a/content/docs/how-to-guides/docker-deployment.md b/content/docs/how-to-guides/docker-deployment.md deleted file mode 100644 index e69de29..0000000 diff --git a/content/docs/how-to-guides/subscription-settings.md b/content/docs/how-to-guides/subscription-settings.md index b3ed260..7f12dbe 100644 --- a/content/docs/how-to-guides/subscription-settings.md +++ b/content/docs/how-to-guides/subscription-settings.md @@ -2,24 +2,24 @@ title: Subscription Settings --- -Subscription settings determine responses based on user-agent patterns, -prioritize specific v2rayN and v2rayNG versions, and include profile title, -update interval, and support link options. +Subscription settings are used to tune the subscription endpoints. # Subscription Rules - Subscription rules determine how the subscription endpoint would correspond -to different user-agents; each rule consists of a regex pattern to be matched -on the user-agent and the result to be returned. rules are tried from top to bottom -respectively until one matches the request. in case none of the rules match, the +to different user-agents; Each rule consists of a regex pattern to be matched +on the user-agent and the result to be returned. Rules are tried from top to bottom +respectively until one matches the user-agent. In case none of the rules match, the response would be empty. +![Example rules](/images/subscription_rules.png) + The rules in the picture are the default values right now. First rule for v2rayN matches versions higher than 6.40, and returns Xray custom config. Older versions fall in the next rule; the first rule for v2rayNG matches 1.8.16+ and returns Xray custom config, otherwise the next rule returns base64-links. -# Further Settings +# Other Settings +![Other subscription settings](/images/subscription_other.png) If **Template on Acceptance** is set to true, the subscription endpoint would return the html template in case `Accept: text/html` is in request headers. diff --git a/content/docs/how-to-guides/webhook.md b/content/docs/how-to-guides/webhook.md deleted file mode 100644 index c62699f..0000000 --- a/content/docs/how-to-guides/webhook.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -title: "Webhook notifications" ---- - -You can set a webhook address and Marzneshin will send the notifications to that address. - -the requests will be sent as a post request to the address provided by `WEBHOOK_ADDRESS` with `WEBHOOK_SECRET` -as `x-webhook-secret` in the headers. - -Example request sent from Marzneshin: - -``` -Headers: -Host: 0.0.0.0:9000 -User-Agent: python-requests/2.28.1 -Accept-Encoding: gzip, deflate -Accept: */* -Connection: keep-alive -x-webhook-secret: something-very-very-secret -Content-Length: 107 -Content-Type: application/json - -Body: -{"username": "marzneshin_test_user", "action": "user_updated", "enqueued_at": 1680506457.636369, "tries": 0} -``` - -Different action typs -are: `user_created`, `user_updated`, `user_deleted`, `user_limited`, `user_expired`, `user_disabled`, `user_enabled` diff --git a/content/docs/overview/marzneshin.md b/content/docs/overview/marzneshin.md deleted file mode 100644 index 6703fb5..0000000 --- a/content/docs/overview/marzneshin.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -title: Marzneshin -weight: 1 ---- diff --git a/content/docs/overview/marznode.md b/content/docs/overview/marznode.md deleted file mode 100644 index 2d046ec..0000000 --- a/content/docs/overview/marznode.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Marznode -next: getting-started -weight: 2 ---- diff --git a/static/images/subscription_other.png b/static/images/subscription_other.png new file mode 100644 index 0000000..29edb19 Binary files /dev/null and b/static/images/subscription_other.png differ diff --git a/static/images/subscription_rules.png b/static/images/subscription_rules.png new file mode 100644 index 0000000..c6fc389 Binary files /dev/null and b/static/images/subscription_rules.png differ