1.0.0
Wydanie WGTools-Extended / release (push) Failing after 16s

This commit is contained in:
asminme committed 2026-10-30 00:35:08 +01:00
1 parent f5bdd7e21c
commit affe28ad71
110 files changed
+52936 -14

No files matched your search

+506
View File
@@ -0,0 +1,506 @@
{% extends "base.html" %}
{% block content %}
<section class="page-head page-head-actions">
<div>
<h1 data-i18n="clients.title">{{ tr('clients.title') }}</h1>
<p data-i18n="clients.subtitle">{{ tr('clients.subtitle') }}</p>
</div>
<div class="page-action-row">
{% if request.state.access.role == 'admin' %}<button class="btn" id="manage-groups-button" data-i18n="groups.manage">{{ tr('groups.manage') }}</button>{% endif %}
<button class="btn primary" id="add-client-button" data-i18n="clients.add">{{ tr('clients.add') }}</button>
</div>
</section>
<section class="card">
<div class="card-head"><div><h2>Przekierowania portów</h2><p>Wybierz dostępny adres publiczny i adres klienta tej sieci.</p></div></div>
<form id="extended-forward-form" class="settings-form-pad">
<div class="setup-grid">
<label><span>Publiczny adres IPv4</span><select id="extended-forward-public" required></select></label>
<label><span>Port publiczny</span><input id="extended-forward-public-port" type="number" min="1" max="65535" required></label>
<label><span>Adres IPv4 klienta</span><input id="extended-forward-target" placeholder="10.0.2.2" maxlength="15" required></label>
<label><span>Port klienta</span><input id="extended-forward-target-port" type="number" min="1" max="65535" required></label>
<label><span>Protokół</span><select id="extended-forward-protocol"><option value="tcp">TCP</option><option value="udp">UDP</option><option value="both">TCP i UDP</option></select></label>
</div>
<button class="btn primary" type="submit">Dodaj przekierowanie</button>
<div id="extended-forward-status" class="operation-status" hidden></div>
</form>
<div id="extended-forward-list" class="settings-form-pad"></div>
</section>
<section class="card">
<div class="card-head">
<div>
<h2 data-i18n="clients.peers">{{ tr('clients.peers') }}</h2>
<p data-i18n="clients.peers_subtitle">{{ tr('clients.peers_subtitle') }}</p>
</div>
<div class="client-table-tools">
<div class="quick-search-wrap">
<input id="client-quick-search" class="quick-search-input" type="search" autocomplete="off" placeholder="{{ tr('clients.quick_search') }}" aria-label="{{ tr('clients.quick_search') }}">
<button class="quick-search-clear" id="client-quick-search-clear" type="button" aria-label="{{ tr('clients.quick_search_clear') }}" data-tooltip="{{ tr('clients.quick_search_clear') }}" hidden>×</button>
</div>
<button class="btn" id="refresh-button" data-i18n="common.refresh">{{ tr('common.refresh') }}</button>
</div>
</div>
<div class="table-wrap client-table-wrap">
<table class="client-table">
<colgroup>
<col class="client-col-name">
<col class="client-col-group">
<col class="client-col-address">
<col class="client-col-remote">
<col class="client-col-keepalive">
<col class="client-col-status">
<col class="client-col-handshake">
<col class="client-col-traffic">
<col class="client-col-actions">
</colgroup>
<thead>
<tr>
<th data-i18n="clients.name">{{ tr('clients.name') }}</th>
<th data-i18n="groups.group">{{ tr('groups.group') }}</th>
<th data-i18n="clients.address">{{ tr('clients.address') }}</th>
<th data-i18n="clients.remote_networks">{{ tr('clients.remote_networks') }}</th>
<th data-i18n="clients.keepalive">{{ tr('clients.keepalive') }}</th>
<th data-i18n="clients.status">{{ tr('clients.status') }}</th>
<th data-i18n="clients.handshake">{{ tr('clients.handshake') }}</th>
<th>RX / TX</th>
<th data-i18n="clients.actions">{{ tr('clients.actions') }}</th>
</tr>
</thead>
<tbody id="client-body"><tr><td colspan="9" class="empty">{{ tr('common.loading') }}</td></tr></tbody>
</table>
</div>
</section>
<div class="modal-backdrop" id="client-editor-modal" hidden>
<div class="modal-card modal-wide client-editor-card" role="dialog" aria-modal="true" aria-labelledby="client-editor-title">
<div class="modal-head">
<div>
<h2 id="client-editor-title" data-i18n="clients.create_title">{{ tr('clients.create_title') }}</h2>
<p id="client-editor-subtitle" data-i18n="clients.create_subtitle">{{ tr('clients.create_subtitle') }}</p>
</div>
<button class="icon-btn" type="button" data-modal-close="client-editor-modal" aria-label="{{ tr('common.close') }}" data-tooltip="{{ tr('common.close') }}">×</button>
</div>
<form id="client-editor-form" class="client-editor-form-shell" novalidate>
<div class="client-editor-tabs" role="tablist" aria-label="Client settings">
<button type="button" class="client-editor-tab active" id="client-tab-button-basic" data-client-tab="basic" role="tab" aria-selected="true" aria-controls="client-tab-basic" data-i18n="clients.tab_basic">{{ tr('clients.tab_basic') }}</button>
<button type="button" class="client-editor-tab" id="client-tab-button-policy" data-client-tab="policy" role="tab" aria-selected="false" aria-controls="client-tab-policy" data-i18n="clients.tab_policy">{{ tr('clients.tab_policy') }}</button>
<button type="button" class="client-editor-tab" id="client-tab-button-config" data-client-tab="config" role="tab" aria-selected="false" aria-controls="client-tab-config" data-i18n="clients.tab_config">{{ tr('clients.tab_config') }}</button>
<button type="button" class="client-editor-tab" id="client-tab-button-security" data-client-tab="security" role="tab" aria-selected="false" aria-controls="client-tab-security" data-i18n="clients.tab_security">{{ tr('clients.tab_security') }}</button>
</div>
<div class="modal-body client-editor-body">
<section class="client-tab-panel" id="client-tab-basic" data-client-tab-panel="basic" role="tabpanel" aria-labelledby="client-tab-button-basic">
<div class="setup-section-title" data-i18n="clients.basic_details">{{ tr('clients.basic_details') }}</div>
<div class="setup-grid">
<label>
<span data-i18n="clients.name">{{ tr('clients.name') }}</span>
<input id="client-name" maxlength="64" placeholder="Peer name" required>
</label>
<label>
<span data-i18n="clients.type">{{ tr('clients.type') }}</span>
<select id="client-type">
<option value="client" data-i18n="clients.client">{{ tr('clients.client') }}</option>
{% if request.state.access.role == 'admin' %}<option value="site_to_site" data-i18n="clients.site_to_site">{{ tr('clients.site_to_site') }}</option>{% endif %}
</select>
</label>
<label>
<span data-i18n="clients.address">{{ tr('clients.address') }}</span>
<input id="client-vpn-address" class="mono" placeholder="10.0.0.10/32" required>
<small data-i18n="clients.address_hint">{{ tr('clients.address_hint') }}</small>
</label>
<label id="client-group-field">
<span data-i18n="groups.group">{{ tr('groups.group') }}</span>
<select id="client-group"></select>
<small data-i18n="groups.client_group_hint">{{ tr('groups.client_group_hint') }}</small>
</label>
</div>
<label class="field-block section-space-small" id="client-remote-networks-field" hidden>
<span data-i18n="clients.remote_networks">{{ tr('clients.remote_networks') }}</span>
<textarea id="client-remote-networks" class="mono controlled-textarea" rows="3" placeholder="192.168.60.0/24"></textarea>
<small data-i18n="clients.remote_hint">{{ tr('clients.remote_hint') }}</small>
</label>
<div id="client-basic-managed-fields">
<div class="setup-section-title section-space" data-i18n="clients.basic_connection">{{ tr('clients.basic_connection') }}</div>
<div class="setup-grid">
<label>
<span data-i18n="clients.server_host">{{ tr('clients.server_host') }}</span>
<div class="input-action-wrap">
<input id="client-server-host" class="mono" list="client-endpoint-history" autocomplete="off" placeholder="vpn.example.com" required>
<button class="input-action-button" type="button" id="client-use-panel-host" aria-label="{{ tr('clients.use_panel_host') }}" data-tooltip="{{ tr('clients.use_panel_host') }}">🌐</button>
</div>
<datalist id="client-endpoint-history"></datalist>
<small data-i18n="clients.server_host_hint">{{ tr('clients.server_host_hint') }}</small>
</label>
<label>
<span data-i18n="clients.server_port">{{ tr('clients.server_port') }}</span>
<input id="client-server-port" class="mono" type="number" min="1" max="65535" readonly>
<small data-i18n="clients.server_port_hint">{{ tr('clients.server_port_hint') }}</small>
</label>
</div>
</div>
<div class="inline-note warn-note" id="unmanaged-client-note" hidden data-i18n="clients.unmanaged_note">{{ tr('clients.unmanaged_note') }}</div>
</section>
<section class="client-tab-panel" id="client-tab-policy" data-client-tab-panel="policy" role="tabpanel" aria-labelledby="client-tab-button-policy" hidden>
<div id="client-group-policy-section" hidden>
<div class="setup-section-title" data-i18n="groups.access_policy">{{ tr('groups.access_policy') }}</div>
<div class="setup-grid">
<label>
<span data-i18n="groups.policy_mode">{{ tr('groups.policy_mode') }}</span>
<select id="client-policy-mode">
<option value="inherit" data-i18n="groups.policy_inherit">{{ tr('groups.policy_inherit') }}</option>
<option value="custom" data-i18n="groups.policy_custom">{{ tr('groups.policy_custom') }}</option>
</select>
<small data-i18n="groups.policy_mode_hint">{{ tr('groups.policy_mode_hint') }}</small>
</label>
<div></div>
<label>
<span data-i18n="groups.internet_access">{{ tr('groups.internet_access') }}</span>
<select id="client-internet-access"></select>
</label>
<label>
<span data-i18n="groups.local_access">{{ tr('groups.local_access') }}</span>
<select id="client-local-access"></select>
</label>
</div>
<div class="setup-grid section-space-small">
<label>
<span id="client-policy-allow-label" data-i18n="groups.additional_allowed">{{ tr('groups.additional_allowed') }}</span>
<input id="client-policy-allow" class="mono" placeholder="192.168.50.115, 203.0.113.0/24">
<small data-i18n="groups.policy_addresses_hint">{{ tr('groups.policy_addresses_hint') }}</small>
</label>
<label>
<span id="client-policy-deny-label" data-i18n="groups.additional_blocked">{{ tr('groups.additional_blocked') }}</span>
<input id="client-policy-deny" class="mono" placeholder="192.168.50.200">
<small data-i18n="groups.policy_addresses_hint">{{ tr('groups.policy_addresses_hint') }}</small>
</label>
</div>
<div class="policy-preview section-space-small">
<div class="policy-preview-title" data-i18n="groups.effective_policy">{{ tr('groups.effective_policy') }}</div>
<div id="client-policy-preview"></div>
</div>
</div>
</section>
<section class="client-tab-panel" id="client-tab-config" data-client-tab-panel="config" role="tabpanel" aria-labelledby="client-tab-button-config" hidden>
<div id="client-config-fields">
<div id="client-relay-connection-section" hidden>
<div class="setup-section-title" data-i18n="clients.connection_path">{{ tr('clients.connection_path') }}</div>
<div class="setup-grid section-space-small">
<label>
<span data-i18n="clients.connection_via">{{ tr('clients.connection_via') }}</span>
<select id="client-connection-mode">
<option value="direct" data-i18n="clients.connection_direct">{{ tr('clients.connection_direct') }}</option>
<option value="relay" data-i18n="clients.connection_relay">{{ tr('clients.connection_relay') }}</option>
</select>
<small data-i18n="clients.connection_via_hint">{{ tr('clients.connection_via_hint') }}</small>
</label>
<label id="client-relay-vps-field" hidden>
<span data-i18n="clients.relay_vps">{{ tr('clients.relay_vps') }}</span>
<select id="client-relay-vps"></select>
<small data-i18n="clients.relay_vps_hint">{{ tr('clients.relay_vps_hint') }}</small>
</label>
</div>
<div class="inline-note" id="client-relay-endpoint-note" hidden></div>
</div>
<div class="setup-section-title" data-i18n="clients.generated_config">{{ tr('clients.generated_config') }}</div>
<div class="policy-preview group-config-mode" id="client-group-defaults-wrap" hidden>
<div class="policy-preview-title" data-i18n="groups.client_config_source">{{ tr('groups.client_config_source') }}</div>
<label class="choice-row"><input type="checkbox" id="client-config-override"> <span data-i18n="groups.override_client_config">{{ tr('groups.override_client_config') }}</span></label>
<small data-i18n="groups.override_client_config_hint">{{ tr('groups.override_client_config_hint') }}</small>
<div class="inline-note warn-note" id="client-group-config-warning" hidden data-i18n="groups.config_differs">{{ tr('groups.config_differs') }}</div>
<button type="button" class="btn small section-space-small" id="apply-group-defaults-button" hidden data-i18n="groups.apply_current_template">{{ tr('groups.apply_current_template') }}</button>
</div>
<div class="setup-grid section-space-small">
<label>
<span data-i18n="groups.traffic_through_vpn">{{ tr('groups.traffic_through_vpn') }}</span>
<select id="client-route-preset">
<option value="full" data-i18n="clients.route_full">{{ tr('clients.route_full') }}</option>
<option value="full_except_local" data-i18n="clients.route_full_except_local">{{ tr('clients.route_full_except_local') }}</option>
<option value="vpn_lan" data-i18n="clients.route_vpn_lan">{{ tr('clients.route_vpn_lan') }}</option>
<option value="vpn" data-i18n="clients.route_vpn">{{ tr('clients.route_vpn') }}</option>
<option value="custom" data-i18n="clients.route_custom">{{ tr('clients.route_custom') }}</option>
</select>
</label>
<label>
<span data-i18n="clients.dns">{{ tr('clients.dns') }}</span>
<input id="client-dns" class="mono" placeholder="192.168.50.1">
<small data-i18n="clients.dns_hint">{{ tr('clients.dns_hint') }}</small>
</label>
<label>
<span data-i18n="clients.keepalive">{{ tr('clients.keepalive') }}</span>
<input id="client-keepalive" type="number" min="0" max="65535" value="25">
<small data-i18n="clients.keepalive_hint">{{ tr('clients.keepalive_hint') }}</small>
</label>
</div>
<label class="field-block section-space-small" id="client-local-access-exceptions-field" hidden>
<span data-i18n="clients.local_access_exceptions">{{ tr('clients.local_access_exceptions') }}</span>
<input id="client-local-access-exceptions" class="mono" placeholder="192.168.50.10, 192.168.50.20">
<small data-i18n="clients.local_access_exceptions_hint">{{ tr('clients.local_access_exceptions_hint') }}</small>
</label>
<label class="field-block section-space-small">
<span data-i18n="clients.client_allowed_ips">{{ tr('clients.client_allowed_ips') }}</span>
<textarea id="client-allowed-ips" class="mono controlled-textarea" rows="3" placeholder="0.0.0.0/0" required></textarea>
<small data-i18n="clients.route_hint">{{ tr('clients.route_hint') }}</small>
</label>
<div class="route-reference section-space-small" id="client-protected-networks-reference" hidden>
<span data-i18n="clients.protected_networks_reference">{{ tr('clients.protected_networks_reference') }}</span>
<div class="route-reference-list mono" id="client-protected-networks-list"></div>
<small data-i18n="clients.protected_networks_reference_hint">{{ tr('clients.protected_networks_reference_hint') }}</small>
</div>
</div>
</section>
<section class="client-tab-panel" id="client-tab-security" data-client-tab-panel="security" role="tabpanel" aria-labelledby="client-tab-button-security" hidden>
<div id="client-managed-options-section">
<div class="setup-section-title" data-i18n="clients.security_access">{{ tr('clients.security_access') }}</div>
<div class="setup-grid">
<div class="field-button-wrap">
<span data-i18n="clients.psk">{{ tr('clients.psk') }}</span>
<label class="choice-row compact-choice"><input type="checkbox" id="client-use-psk" checked> <span data-i18n="clients.psk_enable">{{ tr('clients.psk_enable') }}</span></label>
<small data-i18n="clients.psk_hint">{{ tr('clients.psk_hint') }}</small>
</div>
<label>
<span data-i18n="clients.expiration">{{ tr('clients.expiration') }}</span>
<select id="client-expiry-preset">
<option value="never" data-i18n="clients.expire_never">{{ tr('clients.expire_never') }}</option>
<option value="1h" data-i18n="clients.expire_1h">{{ tr('clients.expire_1h') }}</option>
<option value="3h" data-i18n="clients.expire_3h">{{ tr('clients.expire_3h') }}</option>
<option value="6h" data-i18n="clients.expire_6h">{{ tr('clients.expire_6h') }}</option>
<option value="1d" data-i18n="clients.expire_1d">{{ tr('clients.expire_1d') }}</option>
<option value="custom" data-i18n="clients.expire_custom">{{ tr('clients.expire_custom') }}</option>
</select>
<small data-i18n="clients.expiration_hint">{{ tr('clients.expiration_hint') }}</small>
</label>
<label id="client-expiry-custom-field" hidden>
<span data-i18n="clients.expiration_datetime">{{ tr('clients.expiration_datetime') }}</span>
<input id="client-expiry-custom" type="datetime-local">
<small data-i18n="clients.expiration_datetime_hint">{{ tr('clients.expiration_datetime_hint') }}</small>
</label>
<div class="field-button-wrap" id="client-expiry-action-field" hidden>
<span data-i18n="clients.expiration_action">{{ tr('clients.expiration_action') }}</span>
<label class="choice-row compact-choice"><input type="checkbox" id="client-expiry-delete" checked> <span data-i18n="clients.expiration_delete">{{ tr('clients.expiration_delete') }}</span></label>
<small data-i18n="clients.expiration_action_hint">{{ tr('clients.expiration_action_hint') }}</small>
</div>
<div class="inline-note warn-note" id="client-expired-disabled-note" hidden data-i18n="clients.expired_disabled_hint">{{ tr('clients.expired_disabled_hint') }}</div>
<div class="field-button-wrap span-2" id="client-peer-isolation-field">
<span data-i18n="clients.peer_isolation">{{ tr('clients.peer_isolation') }}</span>
<label class="choice-row compact-choice"><input type="checkbox" id="client-peer-isolation"> <span data-i18n="clients.peer_isolation_enable">{{ tr('clients.peer_isolation_enable') }}</span></label>
<small data-i18n="clients.peer_isolation_hint">{{ tr('clients.peer_isolation_hint') }}</small>
</div>
</div>
<div class="setup-section-title section-space" id="client-schedule-title" data-i18n="clients.schedule_title">{{ tr('clients.schedule_title') }}</div>
<div id="client-schedule-section">
<label class="choice-row schedule-enable-row"><input type="checkbox" id="client-schedule-enabled"> <span data-i18n="clients.schedule_enable">{{ tr('clients.schedule_enable') }}</span></label>
<small class="schedule-help" data-i18n="clients.schedule_hint">{{ tr('clients.schedule_hint') }}</small>
<div class="schedule-editor section-space-small" id="client-schedule-editor" hidden>
<div>
<span class="field-caption" data-i18n="clients.schedule_days">{{ tr('clients.schedule_days') }}</span>
<div class="schedule-days">
<label><input type="checkbox" data-schedule-day="0" checked><span data-i18n="clients.day_mon">{{ tr('clients.day_mon') }}</span></label>
<label><input type="checkbox" data-schedule-day="1" checked><span data-i18n="clients.day_tue">{{ tr('clients.day_tue') }}</span></label>
<label><input type="checkbox" data-schedule-day="2" checked><span data-i18n="clients.day_wed">{{ tr('clients.day_wed') }}</span></label>
<label><input type="checkbox" data-schedule-day="3" checked><span data-i18n="clients.day_thu">{{ tr('clients.day_thu') }}</span></label>
<label><input type="checkbox" data-schedule-day="4" checked><span data-i18n="clients.day_fri">{{ tr('clients.day_fri') }}</span></label>
<label><input type="checkbox" data-schedule-day="5"><span data-i18n="clients.day_sat">{{ tr('clients.day_sat') }}</span></label>
<label><input type="checkbox" data-schedule-day="6"><span data-i18n="clients.day_sun">{{ tr('clients.day_sun') }}</span></label>
</div>
</div>
<div class="schedule-time-grid">
<label>
<span data-i18n="clients.schedule_from">{{ tr('clients.schedule_from') }}</span>
<input id="client-schedule-start" type="time" value="08:00">
</label>
<label>
<span data-i18n="clients.schedule_to">{{ tr('clients.schedule_to') }}</span>
<input id="client-schedule-end" type="time" value="19:00">
</label>
</div>
<small data-i18n="clients.schedule_timezone_hint">{{ tr('clients.schedule_timezone_hint') }}</small>
</div>
<div class="inline-note warn-note" id="client-schedule-disabled-note" hidden data-i18n="clients.schedule_disabled_hint">{{ tr('clients.schedule_disabled_hint') }}</div>
</div>
<div class="setup-grid section-space">
<div class="field-button-wrap span-2" id="client-rotate-credentials-wrap" hidden>
<span data-i18n="clients.credentials_rotate">{{ tr('clients.credentials_rotate') }}</span>
<button type="button" class="btn" id="rotate-credentials-button" data-i18n="clients.credentials_rotate_button">{{ tr('clients.credentials_rotate_button') }}</button>
<small data-i18n="clients.credentials_rotate_hint">{{ tr('clients.credentials_rotate_hint') }}</small>
</div>
</div>
</div>
</section>
</div>
<div class="client-editor-status-wrap">
<div class="operation-status" id="client-editor-status" hidden></div>
</div>
<div class="modal-actions">
<button type="button" class="btn" data-modal-close="client-editor-modal" data-i18n="common.cancel">{{ tr('common.cancel') }}</button>
<button type="submit" class="btn primary" id="save-client-button" data-i18n="common.save">{{ tr('common.save') }}</button>
</div>
</form>
</div>
</div>
<div class="modal-backdrop" id="groups-modal" hidden>
<div class="modal-card modal-wide" role="dialog" aria-modal="true" aria-labelledby="groups-title">
<div class="modal-head">
<div>
<h2 id="groups-title" data-i18n="groups.title">{{ tr('groups.title') }}</h2>
<p data-i18n="groups.subtitle">{{ tr('groups.subtitle') }}</p>
</div>
<button class="icon-btn" type="button" data-modal-close="groups-modal" aria-label="{{ tr('common.close') }}">×</button>
</div>
<div class="modal-body">
<div id="groups-list" class="group-list"></div>
</div>
<div class="modal-actions">
<button type="button" class="btn" data-modal-close="groups-modal" data-i18n="common.close">{{ tr('common.close') }}</button>
<button type="button" class="btn primary" id="create-group-button" data-i18n="groups.create">{{ tr('groups.create') }}</button>
</div>
</div>
</div>
<div class="modal-backdrop" id="group-editor-modal" hidden>
<div class="modal-card modal-wide" role="dialog" aria-modal="true" aria-labelledby="group-editor-title">
<div class="modal-head">
<div>
<h2 id="group-editor-title" data-i18n="groups.create_title">{{ tr('groups.create_title') }}</h2>
<p data-i18n="groups.editor_subtitle">{{ tr('groups.editor_subtitle') }}</p>
</div>
<button class="icon-btn" type="button" data-modal-close="group-editor-modal" aria-label="{{ tr('common.close') }}">×</button>
</div>
<form id="group-editor-form">
<div class="modal-body">
<div class="setup-section-title" data-i18n="groups.basic">{{ tr('groups.basic') }}</div>
<div class="setup-grid">
<label>
<span data-i18n="groups.name">{{ tr('groups.name') }}</span>
<input id="group-name" maxlength="64" required placeholder="Contractors">
</label>
<label>
<span data-i18n="groups.description">{{ tr('groups.description') }}</span>
<input id="group-description" maxlength="240" placeholder="Temporary staff and contractors">
</label>
</div>
<div class="setup-section-title section-space" data-i18n="groups.access_policy">{{ tr('groups.access_policy') }}</div>
<div class="setup-grid">
<label>
<span data-i18n="groups.internet_access">{{ tr('groups.internet_access') }}</span>
<select id="group-internet-access">
<option value="allow" data-i18n="groups.allow">{{ tr('groups.allow') }}</option>
<option value="block" data-i18n="groups.block">{{ tr('groups.block') }}</option>
</select>
</label>
<label>
<span data-i18n="groups.local_access">{{ tr('groups.local_access') }}</span>
<select id="group-local-access">
<option value="allow" data-i18n="groups.allow">{{ tr('groups.allow') }}</option>
<option value="block" data-i18n="groups.block">{{ tr('groups.block') }}</option>
</select>
</label>
<label>
<span data-i18n="groups.allowed_addresses">{{ tr('groups.allowed_addresses') }}</span>
<input id="group-policy-allow" class="mono" placeholder="192.168.50.115">
<small data-i18n="groups.policy_addresses_hint">{{ tr('groups.policy_addresses_hint') }}</small>
</label>
<label>
<span data-i18n="groups.blocked_addresses">{{ tr('groups.blocked_addresses') }}</span>
<input id="group-policy-deny" class="mono" placeholder="192.168.50.200">
<small data-i18n="groups.policy_addresses_hint">{{ tr('groups.policy_addresses_hint') }}</small>
</label>
</div>
<div class="setup-section-title section-space" data-i18n="groups.new_client_defaults">{{ tr('groups.new_client_defaults') }}</div>
<div class="setup-grid">
<label>
<span data-i18n="groups.traffic_through_vpn">{{ tr('groups.traffic_through_vpn') }}</span>
<select id="group-route-preset">
<option value="full" data-i18n="clients.route_full">{{ tr('clients.route_full') }}</option>
<option value="full_except_local" data-i18n="clients.route_full_except_local">{{ tr('clients.route_full_except_local') }}</option>
<option value="vpn_lan" data-i18n="clients.route_vpn_lan">{{ tr('clients.route_vpn_lan') }}</option>
<option value="vpn" data-i18n="clients.route_vpn">{{ tr('clients.route_vpn') }}</option>
<option value="custom" data-i18n="clients.route_custom">{{ tr('clients.route_custom') }}</option>
</select>
</label>
<label>
<span data-i18n="clients.dns">{{ tr('clients.dns') }}</span>
<input id="group-dns" class="mono" placeholder="192.168.50.1">
</label>
<label>
<span data-i18n="clients.keepalive">{{ tr('clients.keepalive') }}</span>
<input id="group-keepalive" type="number" min="0" max="65535" value="25">
</label>
</div>
<label class="field-block section-space-small">
<span data-i18n="clients.client_allowed_ips">{{ tr('clients.client_allowed_ips') }}</span>
<textarea id="group-allowed-ips" class="mono controlled-textarea" rows="3" required></textarea>
<small data-i18n="groups.defaults_hint">{{ tr('groups.defaults_hint') }}</small>
</label>
<div class="operation-status" id="group-editor-status" hidden></div>
</div>
<div class="modal-actions">
<button type="button" class="btn" data-modal-close="group-editor-modal" data-i18n="common.cancel">{{ tr('common.cancel') }}</button>
<button type="submit" class="btn primary" id="save-group-button" data-i18n="common.save">{{ tr('common.save') }}</button>
</div>
</form>
</div>
</div>
<div class="modal-backdrop" id="group-delete-modal" hidden>
<div class="modal-card" role="dialog" aria-modal="true" aria-labelledby="group-delete-title">
<div class="modal-head">
<div>
<h2 id="group-delete-title" data-i18n="groups.delete_title">{{ tr('groups.delete_title') }}</h2>
<p id="group-delete-text"></p>
</div>
<button class="icon-btn" type="button" data-modal-close="group-delete-modal" aria-label="{{ tr('common.close') }}">×</button>
</div>
<div class="modal-body" id="group-delete-options">
<label class="choice-row"><input type="radio" name="group-delete-mode" value="unassign" checked> <span data-i18n="groups.delete_unassign">{{ tr('groups.delete_unassign') }}</span></label>
<label class="choice-row"><input type="radio" name="group-delete-mode" value="move"> <span data-i18n="groups.delete_move">{{ tr('groups.delete_move') }}</span></label>
<select id="group-delete-target"></select>
<div class="operation-status" id="group-delete-status" hidden></div>
</div>
<div class="modal-actions">
<button type="button" class="btn" data-modal-close="group-delete-modal" data-i18n="common.cancel">{{ tr('common.cancel') }}</button>
<button type="button" class="btn danger" id="confirm-delete-group-button" data-i18n="common.delete">{{ tr('common.delete') }}</button>
</div>
</div>
</div>
<div class="modal-backdrop" id="client-config-modal" hidden>
<div class="modal-card config-modal" role="dialog" aria-modal="true" aria-labelledby="client-config-title">
<div class="modal-head">
<div>
<h2 id="client-config-title" data-i18n="clients.config_title">{{ tr('clients.config_title') }}</h2>
<p data-i18n="clients.config_private_warning">{{ tr('clients.config_private_warning') }}</p>
</div>
<button class="icon-btn" type="button" data-modal-close="client-config-modal" aria-label="{{ tr('common.close') }}" data-tooltip="{{ tr('common.close') }}">×</button>
</div>
<div class="config-layout">
<div>
<textarea id="client-config-text" class="config-text mono" readonly></textarea>
<div class="config-buttons">
<button class="btn" type="button" id="copy-config-button" data-i18n="clients.copy_config">{{ tr('clients.copy_config') }}</button>
<button class="btn primary" type="button" id="download-config-button" data-i18n="clients.download_config">{{ tr('clients.download_config') }}</button>
</div>
</div>
<div class="qr-panel">
<div id="client-qr-loading" class="muted" data-i18n="clients.qr_loading">{{ tr('clients.qr_loading') }}</div>
<img id="client-qr-image" alt="WireGuard QR code" hidden>
</div>
</div>
</div>
</div>
{% endblock %}