-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make command args same as C version, fix log timestamp and set socket… #116
Conversation
pymumu
commented
Apr 12, 2023
- 修改命令行参数,默认为run,保持和c版本一致。
- 修改log打印,输出正确的时间戳。
- socket增加reuse选项。
Linux下命令行都是 比如sshd,dnsmasq等,都是这样。这些也是可以用systemd来设置成service服务。 对于Caveats是否可以修改去掉run。 |
这是只是 c 语言才这样吧?缩写是 先前是考虑过完全采用 c 的启动命令的,但是考虑到还要继续加子命令,例如提供跨平台的 flush 系统的 dns、以及 service 管理,如果全堆在默认那,看命令行 help 就不容易理解了,以子命令的方式划分就更简单易懂了。所以计划是采用兼容的方式,不过就个人而言不是很紧急的事,没有急着兼容。 |
这里一点是,默认不带任何参数,应该是要能启动提供服务的。 如果加了run参数,用户就必须先看帮助,才知道怎么启动服务。 |
Rust 版是没有直接 daemon 后台运行的,我看有些麻烦(类库: daemonize),就没打算搞了,其实 systemd、openwrt 的procd、macos 的 launch 都是可以直接 foregroud 运行的。等 UI 出来,其实后台服务都没必要了,直接套个 tauri,首次使用也是 UI 指引,window 桌面右下角,菜单就能直接调整。 |
提交了兼容 C 版参数的 PR #117 |
|