diff --git a/README.md b/README.md index d3a7853f..89ea64c3 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,8 @@ - `acmedns` - 安装脚本默认生成: - `/etc/sing-box/config.d/10-base.json` - - `/etc/sing-box/config.d/20-outbounds.json` + - `/etc/sing-box/config.d/route.json` + - `/etc/sing-box/config.d/outbound.json` - 安装后的服务名为: - `singbox.service` @@ -139,7 +140,13 @@ sing-box -D /var/lib/sing-box -C /etc/sing-box/config.d run - `services` - 基础路由规则 -### `20-outbounds.json` +### `route.json` + +- `route.rules` +- `route.auto_detect_interface` +- common DNS hijack rules + +### `outbound.json` 放这些内容: @@ -157,7 +164,8 @@ sing-box -D /var/lib/sing-box -C /etc/sing-box/config.d run - [configs/10-base.single-node.json](./configs/10-base.single-node.json) - [configs/10-base.multi-node.json](./configs/10-base.multi-node.json) -- [configs/20-outbounds.example.json](./configs/20-outbounds.example.json) +- [configs/route.json](./configs/route.json) +- [configs/outbound.json](./configs/outbound.json) ## `services.xboard` 配置说明 @@ -362,7 +370,8 @@ Xboard setup error: missing certificate 单节点基础配置 - [configs/10-base.multi-node.json](./configs/10-base.multi-node.json) 多节点基础配置 -- [configs/20-outbounds.example.json](./configs/20-outbounds.example.json) +- [configs/route.json](./configs/route.json) +- [configs/outbound.json](./configs/outbound.json) 出站配置模板 - [configs/panel-response.vless-reality.json](./configs/panel-response.vless-reality.json) VLESS REALITY 面板回包 diff --git a/building-install.sh b/building-install.sh index 17a69da7..44a6a417 100644 --- a/building-install.sh +++ b/building-install.sh @@ -15,7 +15,8 @@ NC='\033[0m' CONFIG_DIR="/etc/sing-box" CONFIG_MERGE_DIR="$CONFIG_DIR/config.d" CONFIG_BASE_FILE="$CONFIG_MERGE_DIR/10-base.json" -CONFIG_OUTBOUNDS_FILE="$CONFIG_MERGE_DIR/20-outbounds.json" +CONFIG_ROUTE_FILE="$CONFIG_MERGE_DIR/route.json" +CONFIG_OUTBOUNDS_FILE="$CONFIG_MERGE_DIR/outbound.json" WORK_DIR="/var/lib/sing-box" BINARY_PATH="/usr/local/bin/sing-box" SERVICE_NAME="singbox" @@ -332,7 +333,12 @@ ${DNS_SERVER_JSON} "services": [ ${SERVICE_JSON} ], - "inbounds": [], + "inbounds": [] +} +EOF + +cat > "$CONFIG_ROUTE_FILE" < "$CONFIG_OUTBOUNDS_FILE" < "$CONFIG_ROUTE_FILE" < "$CONFIG_OUTBOUNDS_FILE" <