From 0e81e84fa1e7907002c7f5ef1d8a875d6962e936 Mon Sep 17 00:00:00 2001 From: dichgrem Date: Fri, 21 Mar 2025 19:57:23 +0800 Subject: [PATCH] update:readme --- README.md | 50 ++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 48 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4532c42..b7479e5 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,48 @@ -# singbox-example -singbox example config +## singbox-example + +### **安装singbox内核** +``` +Debian +bash <(curl -fsSL https://sing-box.app/deb-install.sh) + +Redhat +bash <(curl -fsSL https://sing-box.app/rpm-install.sh) + +Archlinux +bash <(curl -fsSL https://sing-box.app/arch-install.sh) +``` +默认的配置文件在路径 ``/etc/sing-box/config.json ``下,运行文件在``/usr/local/etc/sing-box/config.json`` 下。 + +### **生成配置文件** + +- UUID生成:``sing-box generate uuid`` +- PrivateKey和PublicKey生成:``sing-box generate reality-keypair`` +- ShortID生成:``sing-box generate rand --hex 8`` + +### 运行服务 + +- 启动服务 +``` +sudo systemctl start sing-box +``` +- 停止服务 +``` +sudo systemctl stop sing-box +``` +- 查询运行状态 +``` +sudo systemctl status sing-box +``` + +### 导出配置 + +标准链接示例(更改所有<>) + +``` +vless://@:<端口>?security=reality&sni=<域名>&fp=&pbk=<公钥>&sid=<你的ShortID>&spx=/&type=tcp&flow=xtls-rprx-vision&encryption=none#<随意填写名称> +``` + +- 编写完成后即可导入一个客户端,开始使用! + +- 如果你想使用原生singbox客户端,参考[这里](singbox-example/client/example-node/single-node-core.yaml),即单节点配置. +