mirror of
https://github.com/shadow1ng/fscan.git
synced 2026-09-22 03:10:42 +08:00
feat: Web 版独立入口 + SQLite 持久化存储
- 拆分 main.go 为 main_cli.go 和 main_web.go,Web 版不再包含 CLI 参数解析 - Web 版直接启动 HTTP 服务,通过 -port/-lang 控制,无需 -web flag - 结果存储从内存 map 替换为 SQLite(modernc.org/sqlite,纯 Go 零 CGO) - 数据库文件 ~/.fscan/results.db,进程重启后结果不丢失 - 修复结果分布面板跟随 tab 筛选联动的问题
This commit is contained in:
+4
-15
@@ -2,19 +2,8 @@
|
||||
|
||||
package common
|
||||
|
||||
import (
|
||||
"flag"
|
||||
// WebMode Web版本始终为true
|
||||
const WebMode = true
|
||||
|
||||
"github.com/shadow1ng/fscan/common/i18n"
|
||||
)
|
||||
|
||||
// WebMode 表示是否启动Web管理界面
|
||||
var WebMode bool
|
||||
|
||||
// WebPort Web服务器端口
|
||||
var WebPort int
|
||||
|
||||
func init() {
|
||||
flag.BoolVar(&WebMode, "web", false, i18n.GetText("flag_web_mode"))
|
||||
flag.IntVar(&WebPort, "webport", 10240, i18n.GetText("flag_web_port"))
|
||||
}
|
||||
// WebPort 不再使用,端口由 main_web.go 的 -port 参数控制
|
||||
var WebPort = 0
|
||||
|
||||
Reference in New Issue
Block a user