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

Adding [allow|deny]_addresses settings to yaml config file #237

Merged
merged 1 commit into from
Nov 4, 2024

Conversation

eastebry
Copy link
Contributor

Pretty straightforward - adding the allow/deny command line arguments to the config loader so they can be included in a yaml configuration. This allows you to have a yaml config that looks like this:


ip: "127.0.0.1"
port: 8888

deny_ranges:
  - 93.0.0.0/8 

allow_addresses:
  - 93.184.215.14

allow_ranges:
  - 192.168.0.0/16

deny_addresses:
  - 192.168.1.5

I also opened a separate issue (#236) when playing around with this configuration, and discovering that the allow/deny configurations don't work as I would expect. This doesn't make a difference for this PR though.

Copy link
Collaborator

@jjiang-stripe jjiang-stripe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems pretty reasonable to me! It's nice to be able to apply these settings via a YAML config instead of only CLI

@coveralls
Copy link

Pull Request Test Coverage Report for Build 11412454683

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 0 of 8 (0.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.2%) to 54.353%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/smokescreen/config_loader.go 0 8 0.0%
Totals Coverage Status
Change from base Build 11384028862: -0.2%
Covered Lines: 1436
Relevant Lines: 2642

💛 - Coveralls

@jjiang-stripe jjiang-stripe merged commit 1c315f8 into stripe:master Nov 4, 2024
5 checks passed
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

Successfully merging this pull request may close these issues.

3 participants