Skip to content
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

建议配置文件可以给目录或者*.ini一类的方式 #2232

Closed
jonozw opened this issue Feb 3, 2021 · 10 comments · Fixed by #2421
Closed

建议配置文件可以给目录或者*.ini一类的方式 #2232

jonozw opened this issue Feb 3, 2021 · 10 comments · Fixed by #2421
Labels

Comments

@jonozw
Copy link

jonozw commented Feb 3, 2021

The solution you want

当前的配置文件是单文件ini, 命令行是frpc -c config.ini
但是实际使用中会经常增删设置, 而主配置不变, 这样每次修改配置文件很麻烦. 一不小心改错了还得debug.

是否能将配置调整成v2ray那样的 exec -confdir config_dir
或者类似nginx那样主配置文件里可以写一句
include /single.conf/*.ini

Alternatives considered

How to implement this function

N/A
Application scenarios of this function

startup

@fatedier
Copy link
Owner

fatedier commented Feb 5, 2021

Good idea

@fatedier fatedier added the todo label Feb 5, 2021
@zsinba
Copy link

zsinba commented Feb 5, 2021

顺便提一下:
修改配置文件,期望能热加载.
像 nginx -t ; 检查通过后, nginx -s reload这样热加载.
或像srs那样 , killall -1 srs 热加载.

@fatedier
Copy link
Owner

fatedier commented Feb 5, 2021

@zsinba ./frpc -c ./frpc.ini reload

@zsinba
Copy link

zsinba commented Feb 5, 2021

哎呦我靠,有这个命令?

@zsinba
Copy link

zsinba commented Feb 5, 2021

frps可以吗?

@zsinba
Copy link

zsinba commented Feb 5, 2021

image

的确有.谢谢老板.

@dudebing99
Copy link

The solution you want

当前的配置文件是单文件ini, 命令行是frpc -c config.ini
但是实际使用中会经常增删设置, 而主配置不变, 这样每次修改配置文件很麻烦. 一不小心改错了还得debug.

是否能将配置调整成v2ray那样的 exec -confdir config_dir
或者类似nginx那样主配置文件里可以写一句
include /single.conf/*.ini

Alternatives considered

How to implement this function

N/A
Application scenarios of this function

startup

单个配置文件足够简洁了,而且完全能够覆盖你的场景吧?
frpc -c config-dev.ini
frp -c config-prod.ini

@fatedier
Copy link
Owner

@dudebing99 这个功能已经在开发中了,作为可选的能力,某些场景下可能要根据不同的用途对 proxy 的配置进行分类,分别管理,批量删除等等。

@jonozw
Copy link
Author

jonozw commented May 13, 2021

如果个人用, 的确自己配置几个文件切换就好了.

如果在公司, 哪怕小公司商用, 配置文件管理就需要了

The solution you want
当前的配置文件是单文件ini, 命令行是frpc -c config.ini
但是实际使用中会经常增删设置, 而主配置不变, 这样每次修改配置文件很麻烦. 一不小心改错了还得debug.
是否能将配置调整成v2ray那样的 exec -confdir config_dir
或者类似nginx那样主配置文件里可以写一句
include /single.conf/*.ini
Alternatives considered
How to implement this function
N/A
Application scenarios of this function
startup

单个配置文件足够简洁了,而且完全能够覆盖你的场景吧?
frpc -c config-dev.ini
frp -c config-prod.ini

如果个人用, 的确自己配置几个文件切换就好了.

如果在公司, 哪怕小公司商用, 配置文件管理就需要了

@dudebing99
Copy link

我觉得,配置文件管理方式跟应用场景大小没有啥关系,跟软件本身的功能特点有关。frp 目前的配置文件看起来是通过不同的 section 来支持不同的模块,对标 frp,nginx 这种配置文件方式是为了更好地支持多个相同的 section (例如,多个 http/server)。

不过,期待看到这个新功能,或许确实会带来我没理解到的便捷之处。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants