-
-
Notifications
You must be signed in to change notification settings - Fork 33.3k
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 proxy support for telegram_bot #8717
Conversation
New optional config parameters `proxy_url` and `proxy_params` (a dict) ```yaml telegram_bot: platform: polling api_key: !secret telegram_bot_api_key allowed_chat_ids: - !secret telegram_bot_chatid proxy_url: socks5://proxy_ip:proxy_port proxy_params: username: my-username password: my-secret-password ```
@@ -85,6 +87,8 @@ | |||
vol.Required(CONF_ALLOWED_CHAT_IDS): | |||
vol.All(cv.ensure_list, [vol.Coerce(int)]), | |||
vol.Optional(ATTR_PARSER, default=PARSER_MD): cv.string, | |||
vol.Optional(ATTR_PROXY_URL): cv.string, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason to prefix configuration constants with ATTR_
instead than CONF_
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, my bad. I'll change it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me 🐦
* Add proxy support for telegram_bot New optional config parameters `proxy_url` and `proxy_params` (a dict) ```yaml telegram_bot: platform: polling api_key: !secret telegram_bot_api_key allowed_chat_ids: - !secret telegram_bot_chatid proxy_url: socks5://proxy_ip:proxy_port proxy_params: username: my-username password: my-secret-password ``` * change `ATTR_` for `CONF_` for config params
Description:
This feature was requested by a forum user about a month ago (and then also requested privately to my email !!). I did this minimal change for the user and it seems that works ok, but I can't say because I'm not behind a proxy.
The config is done with new optional parameters
proxy_url
andproxy_params
(a dict).If approved, I'll update the doc
Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.github.io#<home-assistant.github.io PR number goes here>
Example entry for
configuration.yaml
(if applicable):Checklist:
If user exposed functionality or configuration variables are added/changed: