-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathoptions.html
More file actions
277 lines (243 loc) · 11.7 KB
/
options.html
File metadata and controls
277 lines (243 loc) · 11.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>X-Proxy Options</title>
<link rel="stylesheet" href="options.css">
</head>
<body>
<div class="container">
<!-- Header -->
<header class="header" role="banner">
<div class="header-content">
<div class="logo">
<img src="./icons/icon-48.png" alt="X-Proxy" />
<h1>X-Proxy Settings</h1>
</div>
</div>
</header>
<!-- Main Content -->
<div class="main-content">
<!-- Sidebar Navigation -->
<nav class="sidebar" role="navigation" aria-label="Main navigation">
<ul class="nav-list" role="list">
<li class="nav-item active" data-section="profiles" role="listitem" tabindex="0" aria-label="Proxy Profiles section" aria-current="page">
<span class="icon" aria-hidden="true">👤</span>
<span>Proxy Profiles</span>
</li>
<li class="nav-item" data-section="about" role="listitem" tabindex="0" aria-label="About section">
<span class="icon" aria-hidden="true">ℹ️</span>
<span>About</span>
</li>
</ul>
</nav>
<!-- Content Area -->
<main class="content" role="main">
<!-- Profiles Section -->
<section id="profiles-section" class="section active">
<h2>Proxy Profiles</h2>
<div class="section-header">
<p class="section-description">Manage your proxy server configurations</p>
<div class="section-header-actions">
<button id="importProfilesBtn" class="btn btn-secondary">Import</button>
<button id="exportProfilesBtn" class="btn btn-secondary">Export</button>
<button id="addProfileBtn" class="btn btn-primary" aria-label="Add new proxy profile">
Add Profile
</button>
</div>
</div>
<div id="profilesList" class="profiles-list">
<!-- Profiles will be dynamically added here -->
</div>
</section>
<!-- About Section -->
<section id="about-section" class="section">
<h2>About X-Proxy</h2>
<div class="about-content">
<div class="about-logo">
<img src="./icons/icon-128.png" alt="X-Proxy">
</div>
<div class="about-info">
<h3>X-Proxy v1.6.1</h3>
<p>A modern proxy switcher for Chrome with HTTP(S), SOCKS5, and PAC support</p>
<div class="about-details">
<h4>Features:</h4>
<ul>
<li>✓ Multiple proxy profiles</li>
<li>✓ SOCKS5 & HTTP(S) proxy support</li>
<li>✓ PAC (Auto-Config) file support</li>
<li>✓ Color-coded toolbar icon per profile</li>
<li>✓ Dark mode support</li>
<li>✓ System proxy integration</li>
<li>✓ Simple profile management</li>
<li>✓ Import/Export profiles</li>
<li>✓ Proxy authentication (username/password)</li>
</ul>
</div>
<div class="about-links">
<a href="https://github.com/helebest/x-proxy" target="_blank" class="link">
<span class="icon">🔗</span> GitHub Repository
</a>
<a href="#" id="reportBugBtn" class="link">
<span class="icon">🐛</span> Report a Bug
</a>
<a href="#" id="requestFeatureBtn" class="link">
<span class="icon">💡</span> Request Feature
</a>
</div>
</div>
</div>
</section>
</main>
</div>
<!-- Footer -->
<footer class="footer" role="contentinfo">
<div class="footer-content">
<span class="status" id="saveStatus"></span>
<button id="saveAllBtn" class="btn btn-primary" aria-label="Save all configuration changes">Save All Changes</button>
</div>
</footer>
</div>
<!-- Profile Modal -->
<div id="profileModal" class="modal">
<div class="modal-content">
<div class="modal-header">
<h3 id="profileModalTitle">Add Proxy Profile</h3>
<button class="modal-close" id="closeProfileModal">×</button>
</div>
<div class="modal-body">
<form id="profileForm">
<div class="form-group">
<label for="profileName">Profile Name *</label>
<input type="text" id="profileName" class="form-input" required>
</div>
<div class="form-group">
<label for="profileColor">Profile Color</label>
<div class="color-palette">
<input type="radio" name="profileColor" id="color-blue" value="#007AFF" checked>
<label for="color-blue" class="color-option" style="background-color: #007AFF"></label>
<input type="radio" name="profileColor" id="color-green" value="#4CAF50">
<label for="color-green" class="color-option" style="background-color: #4CAF50"></label>
<input type="radio" name="profileColor" id="color-red" value="#F44336">
<label for="color-red" class="color-option" style="background-color: #F44336"></label>
<input type="radio" name="profileColor" id="color-orange" value="#FF9800">
<label for="color-orange" class="color-option" style="background-color: #FF9800"></label>
<input type="radio" name="profileColor" id="color-purple" value="#9C27B0">
<label for="color-purple" class="color-option" style="background-color: #9C27B0"></label>
<input type="radio" name="profileColor" id="color-teal" value="#009688">
<label for="color-teal" class="color-option" style="background-color: #009688"></label>
<input type="radio" name="profileColor" id="color-yellow" value="#FFC107">
<label for="color-yellow" class="color-option" style="background-color: #FFC107"></label>
<input type="radio" name="profileColor" id="color-gray" value="#607D8B">
<label for="color-gray" class="color-option" style="background-color: #607D8B"></label>
</div>
</div>
<div class="form-group">
<label for="proxyType">Proxy Type *</label>
<select id="proxyType" class="form-select" required>
<option value="http">HTTP/HTTPS</option>
<option value="socks5">SOCKS5</option>
<option value="pac">PAC (Auto-Config)</option>
</select>
</div>
<div id="proxyDetails" class="proxy-details">
<div class="form-group">
<label for="proxyHost">Host *</label>
<input type="text" id="proxyHost" class="form-input" placeholder="proxy.example.com" required>
</div>
<div class="form-group">
<label for="proxyPort">Port *</label>
<input type="number" id="proxyPort" class="form-input" placeholder="8080" required>
</div>
</div>
<div id="pacDetails" style="display: none;">
<div class="form-group">
<label for="pacUrl">PAC URL or File Path *</label>
<input type="text" id="pacUrl" class="form-input"
placeholder="http://example.com/proxy.pac or C:\data\proxy.pac">
<div class="form-help">Supports HTTP/HTTPS URLs and local file paths</div>
</div>
</div>
<!-- Authentication (Optional) -->
<div id="authSection" class="form-section">
<div class="form-section-header">
<h4>Authentication (Optional)</h4>
</div>
<div class="form-group">
<label for="proxyUsername">Username</label>
<input type="text" id="proxyUsername" class="form-input"
placeholder="Leave empty if not required" autocomplete="off">
</div>
<div class="form-group">
<div class="password-label-row">
<label for="proxyPassword">Password</label>
<button type="button" id="togglePassword" class="password-toggle">
<svg id="eyeIcon" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"></path>
<circle cx="12" cy="12" r="3"></circle>
</svg>
<svg id="eyeOffIcon" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" style="display:none">
<path d="M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94"></path>
<path d="M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19"></path>
<line x1="1" y1="1" x2="23" y2="23"></line>
</svg>
<span id="toggleText">Show</span>
</button>
</div>
<input type="password" id="proxyPassword" class="form-input"
placeholder="Leave empty if not required" autocomplete="off">
</div>
</div>
<!-- Domain Routing Rules Section -->
<div id="routingSection" class="form-section">
<div class="form-section-header">
<h4>Domain Routing Rules</h4>
<label class="switch">
<input type="checkbox" id="enableRoutingRules">
<span class="slider"></span>
</label>
</div>
<div id="routingRulesPanel" style="display: none;">
<!-- Mode Selection Radio Buttons -->
<div class="form-group routing-mode-group">
<label class="routing-mode-label">Routing Mode</label>
<div class="routing-mode-options">
<label class="radio-option">
<input type="radio" name="routingMode" id="routingModeWhitelist" value="whitelist" checked>
<span class="radio-checkmark"></span>
<span class="radio-text">Whitelist</span>
</label>
<label class="radio-option">
<input type="radio" name="routingMode" id="routingModeBlacklist" value="blacklist">
<span class="radio-checkmark"></span>
<span class="radio-text">Blacklist</span>
</label>
</div>
</div>
<div class="form-group">
<label id="domainListLabel">Whitelist Domains (only these sites use proxy)</label>
<textarea
id="domainListTextarea"
class="form-textarea"
rows="6"
placeholder="Enter one domain per line:
*.google.com
github.com
*.youtube.com"></textarea>
<div class="form-help">Supports wildcards: *.example.com matches all subdomains</div>
</div>
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button class="btn btn-secondary" id="cancelProfileBtn">Cancel</button>
<button class="btn btn-primary" id="saveProfileBtn">Save Profile</button>
</div>
</div>
</div>
<input type="file" id="importFileInput" accept=".json" style="display: none;">
<script src="options.js" type="module"></script>
</body>
</html>