{% macro tg_proxy_btn(d) -%}
<div class="btn-group">
    {% set hexuuid=hconfigs[ConfigEnum.shared_secret].replace("-","") %}
    <a href="tg://proxy?server={{d.domain}}&amp;port=443&amp;secret=ee{{hexuuid}}{{hconfigs[ConfigEnum.telegram_fakedomain].encode('utf-8').hex()}}" class="btn btn-primary orig-link">{{_("user.home.telegram.clickbtn")}}
        <span class="badge ltr badge-info">{{d.alias or d.domain}}</span></a>
</div>
{%- endmacro -%}


{{_('user.home.telegram.description',link="") }}

{% for d in domains: %}
{% if d.mode =='direct' or d.mode =='relay' %}
{{tg_proxy_btn(d)}}
{% endif %}
{% endfor %}