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

Add a simple whitelist to config #55

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wolffshots
Copy link

This pull request primarily introduces a new feature to the stream_server component, which adds support for an IP address whitelist. This enhancement allows users to specify which IP addresses are permitted to connect to the stream server, providing an additional layer of security.

Let me know if you would like this to be included and I can update the docs to be a bit more unified. All good if you'd rather close the PR though.

Key changes include:

Documentation Updates:

  • Updated README.md to reflect the new whitelist feature and provide configuration examples. [1] [2]

Feature Implementation:

  • Added a new configuration option CONF_WHITELIST to the stream_server component in components/stream_server/__init__.py. [1] [2]
  • Modified the to_code function to handle the new whitelist configuration.

Code Enhancements:

  • Implemented the whitelist logic in components/stream_server/stream_server.cpp:
    • Added methods to check if an IP is whitelisted and to log the whitelist. [1] [2]
    • Updated the accept, flush, and write methods to enforce the whitelist. [1] [2] [3]

Header File Updates:

  • Updated components/stream_server/stream_server.h to declare the new whitelist-related methods and member variables. [1] [2]

sub-commits:

feat: implement a whitelist to the config

feat: add a whitelist to the stream server

chore: update how we get yaml ip into cpp

chore: add debug for whitelist contents

chore: add log whitelist function to try format

chore: remove c str

chore: manually split for generated code

chore: use ESP_LOGCONFIG for logging ip

chore: add print to init

chore: add esphome namespace back to ip calls

chore: call str on ip

chore: add dummy ip to check on log

chore: use ipaddress in init

doc: update readme with newer whitelist set up

sub-commits:

    feat: implement a whitelist to the config

    feat: add a whitelist to the stream server

    chore: update how we get yaml ip into cpp

    chore: add debug for whitelist contents

    chore: add log whitelist function to try format

    chore: remove c str

    chore: manually split for generated code

    chore: use ESP_LOGCONFIG for logging ip

    chore: add print to init

    chore: add esphome namespace back to ip calls

    chore: call str on ip

    chore: add dummy ip to check on log

    chore: use ipaddress in init

    doc: update readme with newer whitelist set up
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.

1 participant