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

json文件中多实例运行配置 #924

Open
omaidb opened this issue Jun 30, 2023 · 4 comments
Open

json文件中多实例运行配置 #924

omaidb opened this issue Jun 30, 2023 · 4 comments

Comments

@omaidb
Copy link

omaidb commented Jun 30, 2023

首先,非常感谢大佬开发了这么棒的产品,复活垃圾网络。这点真的非常赞。
我使用json文件作为配置文件,然后使用kcp-server -c server.json 和kcptun-client -c clinet.json 来运行实例。
然后写一个systemd的service文件来实现开机自动启动。
这非常适合单实例的运行。
当我有多个实例要运行时,我发这不是一件方便的事情。
我在想,可否在同一个json(或其他格式)配置文件中,配置多个实例同时运行。

@xtaci
Copy link
Owner

xtaci commented Jun 30, 2023

可以是可以,相当于client读取多个json,并fork出各个instance,其实就用一个脚本完成启动就可以。
我只是觉得意义不大。

@omaidb
Copy link
Author

omaidb commented Jun 30, 2023

有一个realm项目的配置文件realm.toml的配置示例:

[[endpoints]]
listen = "0.0.0.0:5000"
remote = "1.2.3.4:443"

[[endpoints]]
# listen = "0.0.0.0:26000"
remote = "10.187.71.5:8000"

@omaidb
Copy link
Author

omaidb commented Jun 30, 2023

可以是可以,相当于client读取多个json,并fork出各个instance,其实就用一个脚本完成启动就可以。 我只是觉得意义不大。

哦,好吧,我看看怎么搞,我用supervisor来实现吧,不用systemctl了

@xtaci
Copy link
Owner

xtaci commented Jun 30, 2023

就是说,如果在能保持兼容性的情况下,比如说,by default是.json,-toml xxx.toml,那么,可以做一个toml这种section extension。但是我觉得,可能在repo/kcptun/launcher,做个这种比较好。

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

No branches or pull requests

2 participants