sing-box-main
sing-box 配置文件
主界面配置(Front End)
height: 8px;
margin: 0 auto;
padding: 2px;
background-color: #f5f5f5;
border-radius: 8px;
}
#sing-box-main .code-container {
background-color: white;
padding: 2px;
border-radius: 4px;
box-shadow: 0 2px 5px rgba(,,,.1);
min-height: 4px;
}
#sing-box-main .shortcut-key {
cursor: pointer;
color: #666;
position: fixed;
top: 5%;
left: 5%;
transform: translate(-5%, -5%);
}
#sing-box-main .shortcut-key span {
color: red;
font-size: 14px;
}
#sing-box-main .context-menu {
margin-top: 1px;
padding: 1px;
background-color: white;
border-radius: 4px;
}
编程界面配置(Backend)
<div class="sing-box-main .编程-interface">
<div class="sing-box-main .project-instance">
<h2>Project Instance</h2>
<div class="text-center">
<h3>Code</h3>
<pre class="code-container">
<!-- 代码在这里 -->
</pre>
<h3>Comments</h3>
<div class="text-center">
<!-- 代码注释在这里 -->
</div>
</div>
</div>
<div class="sing-box-main .toolbar">
<!-- 工具条目 -->
<button class="sing-box-button" onclick="openWindow()">打开当前项目</button>
<button class="sing-box-button" onclick="closeWindow()">关闭当前项目</button>
<!-- 其他工具条按钮 -->
</div>
<div class="sing-box-button" onclick="showProjectHistory()">查看项目历史</div>
</div>
<style>
.sing-box-button {
padding: 8px 16px;
margin: 0 4px;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 14px;
color: #666;
transition: background-color 0.3s;
}
.sing-box-button:hover {
background-color: #4CAF5;
}
.sing-box-button:active {
background-color: #45a49;
}
.text-center {
margin-top: 1px;
color: #666;
font-size: 14px;
}
.shortcut-key {
color: red;
margin-left: 2px;
cursor: pointer;
}
</style>
常用配置参数
{
"projectPath": "./sing-box",
"rootDir": "src",
"installDir": "./sing-box[],
"extendsPath": "./sing-boxextensions",
"extendsDir": "./sing-boxextensions",
"binDir": "./sing-box/bin",
"consoleDir": "sing-box-console",
" BinDir: bin",
"consoleDir: console",
" BinDir: bin",
"consoleDir: console"
}
常见配置项
主界面
#sing-box-main .shortcut-key {
position: fixed;
top: 5%;
left: 5%;
transform: translate(-5%, -5%);
color: #666;
z-index: 1;
}
编程界面
<div class="sing-box-main">
<div class="sing-box-main .project-instance">
<div class="sing-box-button" onclick="openWindow()">打开当前项目</div>
<div class="sing-box-button" onclick="closeWindow()">关闭当前项目</div>
<div class="sing-box-button" onclick="toggleRunning()">切换运行状态</div>
<div class="sing-box-button" onclick="toggleBuild()">切换Build状态</div>
<div class="sing-box-button" onclick="toggleWarning()">切换警告状态</div>
<div class="sing-box-button" onclick="toggleError()">切换错误状态</div>
<div class="sing-box-button" onclick="toggleWarningFeedback()">切换警告提示信息</div>
</div>
<div class="sing-box-main .toolbar">
<button class="sing-box-button" onclick="showProjectHistory()">查看项目历史</button>
<button class="sing-box-button" onclick="toggleAllRuns()">切换所有运行状态</button>
<button class="sing-box-button" onclick="toggleBuildOnly()">切换build-only状态</button>
</div>
</div>
配置说明
- 主界面:包含快捷键提示、代码编辑器、工具条等,代码编辑器右侧有一个红色的代码块,显示当前代码行。
- 编程界面:显示当前项目实例,包括代码行和注释,工具条包含跳转到项目、关闭当前项目等按钮。
- 项目路径:指定项目所在的路径,用于高级配置。
- 工具条:提供常用工具如关闭项目、切换运行状态等。
- 项目实例:显示当前运行的项目实例,包括代码行和注释。
注意事项
- 路径配置:确保项目路径和配置文件路径一致。
- 安装路径:检查安装路径是否正确,确保脚本可以正常运行。
- 语言支持:检查语言支持,确保代码和注释符合当前语言的语法。
希望这个配置文件对你有帮助!如果需要进一步的帮助,请随时告诉我!

@版权声明
转载原创文章请注明转载自蘑菇加速器官网-2026稳定高速网络加速器|官方首页|轻松翻墙|魔法上网,网站地址:https://wap.mogujiasuq.com.cn/