61 lines
3.1 KiB
HTML
61 lines
3.1 KiB
HTML
{% extends "base.html" %}
|
|
{% block content %}
|
|
<div class="stack">
|
|
<div>
|
|
<h1>Profiles</h1>
|
|
<p class="muted">管理客户端模板,并跳转到规则和预览页。</p>
|
|
</div>
|
|
|
|
<div class="card">
|
|
<h2>New / Edit Profile</h2>
|
|
<form method="post" action="/admin/profiles" class="stack">
|
|
<div class="grid-2">
|
|
<div><label>Key</label><input name="key" required placeholder="mihomo"></div>
|
|
<div><label>Title</label><input name="title" required></div>
|
|
<div><label>Provider Interval</label><input name="provider_interval" value="21600"></div>
|
|
<div><label>Rule Interval</label><input name="rule_interval" value="86400"></div>
|
|
<div><label>Test URL</label><input name="test_url" value="https://www.gstatic.com/generate_204"></div>
|
|
<div><label>Test Interval</label><input name="test_interval" value="300"></div>
|
|
<div><label>Main Policy</label><input name="main_policy" value="🚀 节点选择"></div>
|
|
<div><label>Source Policy</label><input name="source_policy" value="☁️ 机场选择"></div>
|
|
<div><label>Mixed Auto Policy</label><input name="mixed_auto_policy" value="♻️ 自动选择"></div>
|
|
<div><label>Manual Policy</label><input name="manual_policy" value="🚀 手动切换"></div>
|
|
<div><label>Direct Policy</label><input name="direct_policy" value="DIRECT"></div>
|
|
<div><label>Mode</label><input name="mode" value="rule"></div>
|
|
<div><label>Mixed Port</label><input name="mixed_port" value="7890"></div>
|
|
<div><label>Socks Port</label><input name="socks_port" value="7891"></div>
|
|
<div><label>Log Level</label><input name="log_level" value="info"></div>
|
|
</div>
|
|
<label class="inline"><input type="checkbox" name="allow_lan" checked style="width:auto"> Allow LAN</label>
|
|
<label class="inline"><input type="checkbox" name="ipv6" checked style="width:auto"> IPv6</label>
|
|
<div class="actions"><button type="submit">Save Profile</button></div>
|
|
</form>
|
|
</div>
|
|
|
|
<div class="stack">
|
|
{% for profile in profiles %}
|
|
<div class="card">
|
|
<div class="actions" style="justify-content:space-between; align-items:center;">
|
|
<div>
|
|
<h2 style="margin-bottom:4px;">{{ profile.key }}</h2>
|
|
<div class="muted">{{ profile.title }}</div>
|
|
</div>
|
|
<div class="actions">
|
|
<a class="button secondary" href="/admin/profiles/{{ profile.key }}/sources">Sources</a>
|
|
<a class="button secondary" href="/admin/profiles/{{ profile.key }}/groups">Groups</a>
|
|
<a class="button secondary" href="/admin/profiles/{{ profile.key }}/rules">Rules</a>
|
|
<a class="button" href="/admin/profiles/{{ profile.key }}/preview">Preview</a>
|
|
</div>
|
|
</div>
|
|
<div class="grid-2" style="margin-top:14px;">
|
|
<div><strong>Main:</strong> {{ profile.main_policy }}</div>
|
|
<div><strong>Source:</strong> {{ profile.source_policy }}</div>
|
|
<div><strong>Test URL:</strong> <span class="muted">{{ profile.test_url }}</span></div>
|
|
<div><strong>Mode:</strong> {{ profile.mode }}</div>
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|