tobychui / zoraxy

A general purpose HTTP reverse proxy and forwarding tool. Now written in Go!
https://zoraxy.aroz.org
GNU Affero General Public License v3.0
3.11k stars 188 forks source link

[ENHANCEMENTS] Storing configuration data in a separate file. #26

Closed PassiveLemon closed 1 year ago

PassiveLemon commented 1 year ago

Is your feature request related to a problem? Please describe. Currently, Zoraxy is a self-contained binary executable. This poses a problem for Docker hosting because trying to update to a newer version would result in data loss, or at the very least, way more complicated actions to store that data than would be realistically feasible. Having to set your proxy's, virtual dirs, etc for every update would be a huge hassle, especially if this project suddenly blows up and there are a lot more users and features. Basically, the self-containment is not very good for reproducibility and may cause bigger headaches down the line.

Describe the solution you'd like Write out the current configuration to a file, (json, yaml, etc).

Describe alternatives you've considered https://github.com/tobychui/zoraxy/issues/14 Suggests a backup/restore feature which may be useful for some situations, but not so much in this case.

tobychui commented 1 year ago

@PassiveLemon good suggestion! Currently all config files are stored inside its separated folders and sys.db, but I think I can integrate them all into one sub-folder in later release.

Morethanevil commented 1 year ago

Maybe this could be combined with an Import / Export Feature. If all configuration is stored inside a file, this would make backup and restore easy

tobychui commented 1 year ago

Feature added in latest commit, will be available from next release onward.