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

Configuration file support #241

Open
dtcyganok opened this issue Sep 9, 2024 · 3 comments
Open

Configuration file support #241

dtcyganok opened this issue Sep 9, 2024 · 3 comments
Labels

Comments

@dtcyganok
Copy link

dtcyganok commented Sep 9, 2024

Description

It would be nice to have an ability to control the SpoofDPI behavior (all of the CLI options) via config file. Usually it's quite an expected feature and a lot of CLI apps have such a feature.

@gray1717
Copy link

  • it would also be nice to be able to run the application in daemon mode

@Ledorub
Copy link
Collaborator

Ledorub commented Sep 12, 2024

We can create a config file of the following format:

proxy:
    addr: "127.0.0.1"
    port: 8080
    connection:
        timeout: 1
        https:
            window-size: 0
    system-proxy: false
    patterns:
        - "example.com"
dns:
    addr: "8.8.8.8"
    port: 53
    enable-doh: false
    ip-v4-only: false
output:
    silent: false
    debug: false

and specify the path to it via -config-file option.

Source Precedence
Defaults 0
File 1
Flags 2

@xvzc

@dtcyganok
Copy link
Author

dtcyganok commented Sep 12, 2024

@Ledorub that's nice! I'd also suggest to read the config file by default instead of using option -config-file. It'd be way more conventional. And it would be nice to have the global/system and the local/user config files on linux systems.

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

No branches or pull requests

3 participants