Mercurial > libervia-backend
comparison libervia/backend/plugins/plugin_misc_ip.py @ 4270:0d7bb4df2343
Reformatted code base using black.
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 19 Jun 2024 18:44:57 +0200 |
parents | b86912d3fd33 |
children |
comparison
equal
deleted
inserted
replaced
4269:64a85ce8be70 | 4270:0d7bb4df2343 |
---|---|
56 C.PI_HANDLER: "yes", | 56 C.PI_HANDLER: "yes", |
57 C.PI_DESCRIPTION: _("""This plugin help to discover our external IP address."""), | 57 C.PI_DESCRIPTION: _("""This plugin help to discover our external IP address."""), |
58 } | 58 } |
59 | 59 |
60 # TODO: GET_IP_PAGE should be configurable in sat.conf | 60 # TODO: GET_IP_PAGE should be configurable in sat.conf |
61 GET_IP_PAGE = ( | 61 GET_IP_PAGE = "http://salut-a-toi.org/whereami/" # This page must only return external IP of the requester |
62 "http://salut-a-toi.org/whereami/" | |
63 ) # This page must only return external IP of the requester | |
64 GET_IP_LABEL = D_("Allow external get IP") | 62 GET_IP_LABEL = D_("Allow external get IP") |
65 GET_IP_CATEGORY = "General" | 63 GET_IP_CATEGORY = "General" |
66 GET_IP_NAME = "allow_get_ip" | 64 GET_IP_NAME = "allow_get_ip" |
67 GET_IP_CONFIRM_TITLE = D_("Confirm external site request") | 65 GET_IP_CONFIRM_TITLE = D_("Confirm external site request") |
68 GET_IP_CONFIRM = D_( | 66 GET_IP_CONFIRM = D_( |
73 IP address is an identifier to locate you on Internet (similar to a phone number). | 71 IP address is an identifier to locate you on Internet (similar to a phone number). |
74 | 72 |
75 Do you agree to do this request ? | 73 Do you agree to do this request ? |
76 """ | 74 """ |
77 ).format( | 75 ).format( |
78 page=GET_IP_PAGE, domain=urllib.parse.urlparse(GET_IP_PAGE).netloc, app_name=C.APP_NAME | 76 page=GET_IP_PAGE, |
77 domain=urllib.parse.urlparse(GET_IP_PAGE).netloc, | |
78 app_name=C.APP_NAME, | |
79 ) | 79 ) |
80 NS_IP_CHECK = "urn:xmpp:sic:1" | 80 NS_IP_CHECK = "urn:xmpp:sic:1" |
81 | 81 |
82 PARAMS = """ | 82 PARAMS = """ |
83 <params> | 83 <params> |