126 lines
4.0 KiB
HTML
126 lines
4.0 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="zh">
|
||
<head>
|
||
<meta charset="UTF-8" />
|
||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||
<title>Proxy Switcher</title>
|
||
<link rel="stylesheet" href="popup.css" />
|
||
</head>
|
||
<body>
|
||
<div class="popup">
|
||
<header class="header">
|
||
<div class="title">
|
||
<span class="logo" aria-hidden="true"></span>
|
||
<h1>Proxy Switcher</h1>
|
||
</div>
|
||
</header>
|
||
|
||
<main class="main">
|
||
<section class="panel" role="region" aria-label="代理设置">
|
||
<label class="field">
|
||
<span class="field-label">代理配置</span>
|
||
<div class="row">
|
||
<div class="select">
|
||
<select id="profileSelect"></select>
|
||
|
||
<svg
|
||
class="chevron"
|
||
viewBox="0 0 24 24"
|
||
width="14"
|
||
height="14"
|
||
aria-hidden="true"
|
||
>
|
||
<path
|
||
d="M6 9l6 6 6-6"
|
||
stroke="currentColor"
|
||
stroke-width="2"
|
||
fill="none"
|
||
stroke-linecap="round"
|
||
stroke-linejoin="round"
|
||
/>
|
||
</svg>
|
||
</div>
|
||
<button id="applyBtn" class="text-btn">应用</button>
|
||
</div>
|
||
</label>
|
||
|
||
<!-- <div class="row">
|
||
<button id="resetBtn" class="text-btn" title="恢复默认配置">
|
||
重置配置
|
||
</button>
|
||
</div> -->
|
||
|
||
<div id="pacBlock" style="display: none">
|
||
<div class="row">
|
||
<input
|
||
id="pacUrl"
|
||
type="text"
|
||
placeholder="PAC URL,如 https://example.com/proxy.pac"
|
||
/>
|
||
<button id="savePac" class="text-btn">保存</button>
|
||
</div>
|
||
<div class="hint">当选择 PAC 模式时,可填写 PAC 文件地址。</div>
|
||
</div>
|
||
|
||
<div id="customBlock" style="display: none">
|
||
<div class="row">
|
||
<label class="field-label" style="min-width: 40px">协议</label>
|
||
<div class="select">
|
||
<select id="customScheme">
|
||
<option value="http">HTTP</option>
|
||
<option value="https">HTTPS</option>
|
||
<option value="socks5">SOCKS5</option>
|
||
<option value="socks4">SOCKS4</option>
|
||
</select>
|
||
<svg
|
||
class="chevron"
|
||
viewBox="0 0 24 24"
|
||
width="14"
|
||
height="14"
|
||
aria-hidden="true"
|
||
>
|
||
<path
|
||
d="M6 9l6 6 6-6"
|
||
stroke="currentColor"
|
||
stroke-width="2"
|
||
fill="none"
|
||
stroke-linecap="round"
|
||
stroke-linejoin="round"
|
||
/>
|
||
</svg>
|
||
</div>
|
||
</div>
|
||
<div class="row">
|
||
<input
|
||
id="customHost"
|
||
type="text"
|
||
placeholder="代理地址,如 127.0.0.1"
|
||
/>
|
||
<input
|
||
id="customPort"
|
||
type="number"
|
||
min="0"
|
||
max="65535"
|
||
placeholder="端口,如 7890"
|
||
/>
|
||
</div>
|
||
<div class="row">
|
||
<input
|
||
id="customBypass"
|
||
type="text"
|
||
placeholder="不走代理(逗号分隔),如 localhost, 127.0.0.1"
|
||
/>
|
||
<button id="saveCustom" class="text-btn">保存</button>
|
||
</div>
|
||
<!-- <div class="hint">
|
||
“自定义代理”会保存到本地,点击“应用”即可立即启用。
|
||
</div> -->
|
||
</div>
|
||
</section>
|
||
</main>
|
||
</div>
|
||
|
||
<script src="popup.js"></script>
|
||
</body>
|
||
</html>
|