Skip to content

Commit

Permalink
add description for xray & sing-box, also drop empty stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
khodedawsh committed Nov 27, 2024
1 parent 2e83f2b commit 38085c5
Show file tree
Hide file tree
Showing 14 changed files with 101 additions and 58 deletions.
3 changes: 0 additions & 3 deletions content/docs/admins-guide/_index.md

This file was deleted.

4 changes: 0 additions & 4 deletions content/docs/admins-guide/admin-management.md

This file was deleted.

4 changes: 0 additions & 4 deletions content/docs/admins-guide/user-management.md

This file was deleted.

6 changes: 6 additions & 0 deletions content/docs/configuration/vpn-backends/hysteria.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: hysteria 2
weight: 3
---

[Hysteria 2](https://github.com/apernet/hysteria/) is a mono-protocol backend supported by marznode.
60 changes: 60 additions & 0 deletions content/docs/configuration/vpn-backends/sing-box.md
Original file line number Diff line number Diff line change
@@ -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/)
26 changes: 26 additions & 0 deletions content/docs/configuration/vpn-backends/xray.md
Original file line number Diff line number Diff line change
@@ -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/)
3 changes: 1 addition & 2 deletions content/docs/how-to-guides/backup.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Empty file.
16 changes: 8 additions & 8 deletions content/docs/how-to-guides/subscription-settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
28 changes: 0 additions & 28 deletions content/docs/how-to-guides/webhook.md

This file was deleted.

4 changes: 0 additions & 4 deletions content/docs/overview/marzneshin.md

This file was deleted.

5 changes: 0 additions & 5 deletions content/docs/overview/marznode.md

This file was deleted.

Binary file added static/images/subscription_other.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/images/subscription_rules.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 38085c5

Please sign in to comment.