xddxdd / bird-lg-go

BIRD looking glass in Go, for better maintainability, easier deployment & smaller memory footprint
GNU General Public License v3.0
141 stars 27 forks source link

[Feature request] Please add config file support #52

Closed CoelacanthusHex closed 2 years ago

CoelacanthusHex commented 2 years ago

Now we only support passing configuration through command line parameters or environment variables, which is inconvenient to use. For example, a common usage method is to write a systemd service to run proxy and lg. Whether it is passed through the command line or through environment variables, the node server needs to be hard-coded in the service, which is inconvenient to use scripts for batch or automated deployment.

jlu5 commented 2 years ago

If you're using systemd, a simple option is to use EnvironmentFile, which reads in a newline-separated list of key=value parameters.

xddxdd commented 2 years ago

Sorry for responding late, for some reason I never got the notification of this issue.

Config file support has been added.