update 2025-01-28 20:37:17
This commit is contained in:
parent
0aaf4fca41
commit
fbcb4a52db
|
@ -3,7 +3,7 @@
|
|||
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;700&family=Noto+Serif+SC:wght@400;700&display=swap');
|
||||
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&family=Roboto:wght@400;700&family=Cinzel+Decorative:wght@700;900&display=swap');
|
||||
|
||||
[data-bs-theme=transparent] {
|
||||
[data-bs-theme='transparent'] {
|
||||
color-scheme: dark;
|
||||
--bs-primary: #0ceda2;
|
||||
--bs-secondary: #00ffff;
|
||||
|
@ -17,6 +17,10 @@
|
|||
--bs-btn-warning-bg: #ffc107;
|
||||
--bs-btn-pink-bg: #f82af2;
|
||||
--bs-btn-danger-bg: #dc3545;
|
||||
--bs-controlr-bg: #0eaf3e;
|
||||
--bs-check-bg: #0eaf3e;
|
||||
--bs-label-bg: #0eaf3e;
|
||||
--bs-line-bg: #f515f9;
|
||||
|
||||
--bs-primary-border-subtle: #1815d1;
|
||||
--bs-tertiary: #46e1ec;
|
||||
|
@ -37,118 +41,12 @@
|
|||
--bs-heading-letter-spacing: 0.05em;
|
||||
--bs-heading-text-transform: uppercase;
|
||||
|
||||
--bs-shadow-light: 0 4px 8px rgba(255, 0, 124, 0.4);
|
||||
--bs-shadow-medium: 0 8px 16px rgba(0, 255, 133, 0.3);
|
||||
--bs-shadow-heavy: 0 12px 24px rgba(125, 95, 255, 0.5);
|
||||
|
||||
--bs-btn-color: #fff;
|
||||
--bs-btn-hover-color: #fff;
|
||||
--bs-btn-active-color: #fff;
|
||||
--bs-btn-disabled-color: #fff;
|
||||
--bs-body-font-family: 'Avant Garde', Avantgarde, 'Century Gothic', CenturyGothic, AppleGothic, sans-serif;
|
||||
}
|
||||
#snow-container {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
pointer-events: none;
|
||||
z-index: 9999;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.snowflake {
|
||||
position: absolute;
|
||||
top: -10px;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
background-color: white;
|
||||
border-radius: 50%;
|
||||
animation: fall linear infinite;
|
||||
}
|
||||
|
||||
@keyframes fall {
|
||||
0% {
|
||||
transform: translateY(0) rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
transform: translateY(100vh) rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
.snowflake:nth-child(1) {
|
||||
animation-duration: 8s;
|
||||
animation-delay: -2s;
|
||||
left: 10%;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
}
|
||||
|
||||
.snowflake:nth-child(2) {
|
||||
animation-duration: 10s;
|
||||
animation-delay: -3s;
|
||||
left: 20%;
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
}
|
||||
|
||||
.snowflake:nth-child(3) {
|
||||
animation-duration: 12s;
|
||||
animation-delay: -1s;
|
||||
left: 30%;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
}
|
||||
|
||||
.snowflake:nth-child(4) {
|
||||
animation-duration: 9s;
|
||||
animation-delay: -5s;
|
||||
left: 40%;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
}
|
||||
|
||||
.snowflake:nth-child(5) {
|
||||
animation-duration: 11s;
|
||||
animation-delay: -4s;
|
||||
left: 50%;
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
}
|
||||
|
||||
.snowflake:nth-child(6) {
|
||||
animation-duration: 7s;
|
||||
animation-delay: -6s;
|
||||
left: 60%;
|
||||
width: 9px;
|
||||
height: 9px;
|
||||
}
|
||||
|
||||
.snowflake:nth-child(7) {
|
||||
animation-duration: 8s;
|
||||
animation-delay: -7s;
|
||||
left: 70%;
|
||||
width: 11px;
|
||||
height: 11px;
|
||||
}
|
||||
|
||||
.snowflake:nth-child(8) {
|
||||
animation-duration: 10s;
|
||||
animation-delay: -8s;
|
||||
left: 80%;
|
||||
width: 13px;
|
||||
height: 13px;
|
||||
}
|
||||
|
||||
.snowflake:nth-child(9) {
|
||||
animation-duration: 6s;
|
||||
animation-delay: -9s;
|
||||
left: 90%;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
}
|
||||
|
||||
|
||||
body {
|
||||
background-color: var(--bs-body-bg);
|
||||
|
@ -179,13 +77,37 @@
|
|||
}
|
||||
|
||||
#lineColumnDisplay, #charCountDisplay {
|
||||
color: white !important;
|
||||
color: var(--bs-line-bg) !important;
|
||||
}
|
||||
|
||||
label[for="newPath"], label[for="permissions"], .form-text {
|
||||
color: white !important;
|
||||
}
|
||||
|
||||
.form-label {
|
||||
color: var(--bs-check-bg)
|
||||
}
|
||||
|
||||
.form-check-label {
|
||||
color: var(--bs-check-bg)
|
||||
}
|
||||
|
||||
label {
|
||||
color: var(--bs-label-bg)
|
||||
}
|
||||
|
||||
.form-control {
|
||||
color: var(--bs-controlr-bg)
|
||||
}
|
||||
|
||||
form .form-control {
|
||||
color: var(--bs-controlr-bg) !important;
|
||||
}
|
||||
|
||||
.card .card-body pre {
|
||||
color: var(--log-text-color) !important;
|
||||
}
|
||||
|
||||
.close {
|
||||
color: white !important;
|
||||
}
|
||||
|
@ -200,12 +122,6 @@
|
|||
color: #FF00FF;
|
||||
}
|
||||
|
||||
#plugin_log,
|
||||
#bin_logs,
|
||||
#singbox_log {
|
||||
color: var(--log-text-color);
|
||||
}
|
||||
|
||||
.detail-label {
|
||||
color: #FF00FF !important;
|
||||
}
|
||||
|
@ -356,7 +272,7 @@
|
|||
|
||||
.container-bg {
|
||||
border-radius: 12px;
|
||||
box-shadow: var(--bs-shadow-medium);
|
||||
box-shadow: none;
|
||||
padding: 2rem;
|
||||
margin-top: 2rem;
|
||||
margin-bottom: 2rem;
|
||||
|
@ -377,6 +293,34 @@
|
|||
border: none !important;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
border-radius: 4px;
|
||||
transition: background 0.3s ease;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb:hover {
|
||||
background: rgba(0, 0, 0, 0.7);
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-track {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.scrollable-container {
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.scrollable-container:hover {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
button, .btn-warning, .btn-info, .card, .modal-content { transition: transform 0.2s ease, box-shadow 0.2s ease; }
|
||||
button:active, .btn-warning:active, .btn-info:active, .card:active, .modal-content:active { transform: translateY(-6px); box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2); }
|
||||
button:hover, .btn-warning:hover, .btn-info:hover, .card:hover, .modal-content:hover { transform: translateY(-6px); box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1); }
|
||||
|
|
|
@ -652,7 +652,23 @@ $razordVersion = getRazordVersion();
|
|||
<input type="color" class="form-control" name="primaryBorderSubtle" id="primaryBorderSubtle" value="#1815d1">
|
||||
</div>
|
||||
<div class="col-md-6 mb-3">
|
||||
<label for="placeholderColor" class="form-label">输入框文本色</label>
|
||||
<label for="checkColor" class="form-label">主标题文本色 1</label>
|
||||
<input type="color" class="form-control" name="checkColor" id="checkColor" value="#0eaf3e">
|
||||
</div>
|
||||
<div class="col-md-6 mb-3">
|
||||
<label for="labelColor" class="form-label">主标题文本色 2</label>
|
||||
<input type="color" class="form-control" name="labelColor" id="labelColor" value="#0eaf3e">
|
||||
</div>
|
||||
<div class="col-md-6 mb-3">
|
||||
<label for="lineColor" class="form-label">行数文本色</label>
|
||||
<input type="color" class="form-control" name="lineColor" id="lineColor" value="#f515f9">
|
||||
</div>
|
||||
<div class="col-md-6 mb-3">
|
||||
<label for="controlColor" class="form-label">输入框文本色 1</label>
|
||||
<input type="color" class="form-control" name="controlColor" id="controlColor" value="#0eaf3e">
|
||||
</div>
|
||||
<div class="col-md-6 mb-3">
|
||||
<label for="placeholderColor" class="form-label">输入框文本色 2</label>
|
||||
<input type="color" class="form-control" name="placeholderColor" id="placeholderColor" value="#f82af2">
|
||||
</div>
|
||||
<div class="col-md-6 mb-3">
|
||||
|
@ -724,6 +740,11 @@ $razordVersion = getRazordVersion();
|
|||
<input type="color" class="form-control" name="heading6Color" id="heading6Color" value="#00ffff">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 mb-3">
|
||||
<label for="themeName" class="form-label">自定义主题名称</label>
|
||||
<input type="text" class="form-control" name="themeName" id="themeName" value="transparent">
|
||||
</div>
|
||||
|
||||
<div class="mb-3 form-check">
|
||||
<input type="checkbox" class="form-check-input" id="useBackgroundImage" name="useBackgroundImage">
|
||||
<label class="form-check-label" for="useBackgroundImage">使用自定义背景图片</label>
|
||||
|
@ -744,7 +765,7 @@ $razordVersion = getRazordVersion();
|
|||
</div>
|
||||
<div class="d-flex flex-wrap justify-content-center align-items-center mb-3 gap-2">
|
||||
<button type="submit" class="btn btn-primary">保存主题</button>
|
||||
<button type="button" class="btn btn-success" id="resetButton">恢复默认值</button>
|
||||
<button type="button" class="btn btn-success" id="resetButton" title="按 Ctrl + Shift + C 恢复默认值">恢复默认值</button>
|
||||
<button type="button" class="btn btn-info" id="exportButton">立即备份</button>
|
||||
<button type="button" class="btn btn-warning" id="restoreButton">恢复备份</button>
|
||||
<input type="file" id="importButton" class="form-control" accept="application/json" style="display: none;">
|
||||
|
@ -948,6 +969,10 @@ function formatSize($size) {
|
|||
document.getElementById('infoBgSubtle').value = '#23407e';
|
||||
document.getElementById('selectColor').value = '#23407e';
|
||||
document.getElementById('tertiaryColor').value = '#46e1ec';
|
||||
document.getElementById('controlColor').value = '#0eaf3e';
|
||||
document.getElementById('checkColor').value = '#0eaf3e';
|
||||
document.getElementById('labelColor').value = '#0eaf3e';
|
||||
document.getElementById('lineColor').value = '#f515f9';
|
||||
document.getElementById('tertiaryRgbColor').value = '#1e90ff';
|
||||
document.getElementById('heading1Color').value = '#21e4f2';
|
||||
document.getElementById('heading2Color').value = '#65f1fb';
|
||||
|
@ -979,6 +1004,10 @@ function formatSize($size) {
|
|||
bodyColor: document.getElementById('bodyColor').value,
|
||||
tertiaryColor: document.getElementById('tertiaryColor').value,
|
||||
tertiaryRgbColor: document.getElementById('tertiaryRgbColor').value,
|
||||
controlColor: document.getElementById('controlColor').value,
|
||||
checkColor: document.getElementById('checkColor').value,
|
||||
labelColor: document.getElementById('labelColor').value,
|
||||
lineColor: document.getElementById('lineColor').value,
|
||||
heading1Color: document.getElementById('heading1Color').value,
|
||||
heading2Color: document.getElementById('heading2Color').value,
|
||||
heading3Color: document.getElementById('heading3Color').value,
|
||||
|
@ -1022,6 +1051,10 @@ function formatSize($size) {
|
|||
document.getElementById('bodyColor').value = settings.bodyColor;
|
||||
document.getElementById('tertiaryColor').value = settings.tertiaryColor;
|
||||
document.getElementById('tertiaryRgbColor').value = settings.tertiaryRgbColor;
|
||||
document.getElementById('controlColor').value = settings.controlColor;
|
||||
document.getElementById('checkColor').value = settings.checkColor;
|
||||
document.getElementById('labelColor').value = settings.labelColor;
|
||||
document.getElementById('lineColor').value = settings.lineColor;
|
||||
document.getElementById('heading1Color').value = settings.heading1Color;
|
||||
document.getElementById('heading2Color').value = settings.heading2Color;
|
||||
document.getElementById('heading3Color').value = settings.heading3Color;
|
||||
|
@ -1052,6 +1085,10 @@ function formatSize($size) {
|
|||
localStorage.setItem('bodyColor', settings.bodyColor);
|
||||
localStorage.setItem('tertiaryColor', settings.tertiaryColor);
|
||||
localStorage.setItem('tertiaryRgbColor', settings.tertiaryRgbColor);
|
||||
localStorage.setItem('controlColor', settings.controlColor);
|
||||
localStorage.setItem('checkColor', settings.checkColor);
|
||||
localStorage.setItem('labelColor', settings.labelColor);
|
||||
localStorage.setItem('lineColor', settings.lineColor);
|
||||
localStorage.setItem('heading1Color', settings.heading1Color);
|
||||
localStorage.setItem('heading2Color', settings.heading2Color);
|
||||
localStorage.setItem('heading3Color', settings.heading3Color);
|
||||
|
|
|
@ -24,6 +24,18 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
|||
$warningColor = $_POST['warningColor'] ?? '#ffc107';
|
||||
$pinkColor = $_POST['pinkColor'] ?? '#f82af2';
|
||||
$dangerColor = $_POST['dangerColor'] ?? '#dc3545';
|
||||
$controlColor = $_POST['controlColor'] ?? '#0eaf3e';
|
||||
$checkColor = $_POST['checkColor'] ?? '#0eaf3e';
|
||||
$labelColor = $_POST['labelColor'] ?? '#0eaf3e';
|
||||
$lineColor = $_POST['lineColor'] ?? '#f515f9';
|
||||
$themeName = isset($_POST['themeName']) ? $_POST['themeName'] : 'transparent';
|
||||
|
||||
$themeName = preg_replace('/[^a-zA-Z]/', '', $themeName);
|
||||
if (empty($themeName)) {
|
||||
$themeName = 'transparent';
|
||||
}
|
||||
|
||||
$themeFileName = $themeName . '.css';
|
||||
|
||||
$uploadedImagePath = '';
|
||||
if (isset($_FILES['imageFile']) && $_FILES['imageFile']['error'] === UPLOAD_ERR_OK) {
|
||||
|
@ -43,7 +55,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
|||
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;700&family=Noto+Serif+SC:wght@400;700&display=swap');
|
||||
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&family=Roboto:wght@400;700&family=Cinzel+Decorative:wght@700;900&display=swap');
|
||||
|
||||
[data-bs-theme=transparent] {
|
||||
[data-bs-theme='$themeName'] {
|
||||
color-scheme: dark;
|
||||
--bs-primary: $primaryColor;
|
||||
--bs-secondary: $secondaryColor;
|
||||
|
@ -57,6 +69,10 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
|||
--bs-btn-warning-bg: $warningColor;
|
||||
--bs-btn-pink-bg: $pinkColor;
|
||||
--bs-btn-danger-bg: $dangerColor;
|
||||
--bs-controlr-bg: $controlColor;
|
||||
--bs-check-bg: $checkColor;
|
||||
--bs-label-bg: $labelColor;
|
||||
--bs-line-bg: $lineColor;
|
||||
|
||||
--bs-primary-border-subtle: $primaryBorderSubtle;
|
||||
--bs-tertiary: $tertiaryColor;
|
||||
|
@ -77,10 +93,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
|||
--bs-heading-letter-spacing: 0.05em;
|
||||
--bs-heading-text-transform: uppercase;
|
||||
|
||||
--bs-shadow-light: 0 4px 8px rgba(255, 0, 124, 0.4);
|
||||
--bs-shadow-medium: 0 8px 16px rgba(0, 255, 133, 0.3);
|
||||
--bs-shadow-heavy: 0 12px 24px rgba(125, 95, 255, 0.5);
|
||||
|
||||
--bs-btn-color: #fff;
|
||||
--bs-btn-hover-color: #fff;
|
||||
--bs-btn-active-color: #fff;
|
||||
|
@ -117,7 +129,31 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
|||
}
|
||||
|
||||
#lineColumnDisplay, #charCountDisplay {
|
||||
color: white !important;
|
||||
color: var(--bs-line-bg) !important;
|
||||
}
|
||||
|
||||
.form-label {
|
||||
color: var(--bs-check-bg)
|
||||
}
|
||||
|
||||
.form-check-label {
|
||||
color: var(--bs-check-bg)
|
||||
}
|
||||
|
||||
label {
|
||||
color: var(--bs-label-bg)
|
||||
}
|
||||
|
||||
.form-control {
|
||||
color: var(--bs-controlr-bg)
|
||||
}
|
||||
|
||||
form .form-control {
|
||||
color: var(--bs-controlr-bg) !important;
|
||||
}
|
||||
|
||||
.card .card-body pre {
|
||||
color: var(--log-text-color) !important;
|
||||
}
|
||||
|
||||
.close {
|
||||
|
@ -134,12 +170,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
|||
color: #FF00FF;
|
||||
}
|
||||
|
||||
#plugin_log,
|
||||
#bin_logs,
|
||||
#singbox_log {
|
||||
color: var(--log-text-color);
|
||||
}
|
||||
|
||||
.detail-label {
|
||||
color: #FF00FF !important;
|
||||
}
|
||||
|
@ -290,7 +320,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
|||
|
||||
.container-bg {
|
||||
border-radius: 12px;
|
||||
box-shadow: var(--bs-shadow-medium);
|
||||
box-shadow: none;
|
||||
padding: 2rem;
|
||||
margin-top: 2rem;
|
||||
margin-bottom: 2rem;
|
||||
|
@ -365,7 +395,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
|||
.container-sm.container-bg.callout a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 2px; background-color: var(--bs-primary); transform: scaleX(0); transition: transform var(--bs-transition-speed); }
|
||||
.container-sm.container-bg.callout a:hover, .container-sm.container-bg.callout a:focus, .container-sm.container-bg.callout a.active { color: var(--bs-secondary); } .container-sm.container-bg.callout a:hover::after, .container-sm.container-bg.callout a:focus::after, .container-sm.container-bg.callout a.active::after { transform: scaleX(1); }
|
||||
|
||||
.royal-style { font-family: 'Cinzel Decorative', cursive; font-weight: 900; font-size: 80px; color: var(--bs-primary); text-shadow: 2px 2px 4px rgba(142, 68, 173, 0.7); letter-spacing: 4px; text-align: center; margin-top: 20px; }
|
||||
.royal-style { font-family: 'Cinzel Decorative', cursive; font-weight: 900; font-size: 80px; letter-spacing: 4px; text-align: center; margin-top: 20px; }
|
||||
.royal-style:hover { transform: skew(-5deg); }
|
||||
@media (max-width: 991.98px) { .container-sm.container-bg.callout { flex-direction: column; align-items: center; } .container-sm.container-bg.callout a { margin: 0.5rem 0; } }
|
||||
h1 { color: var(--bs-heading-1); font-size: 2.5rem; }
|
||||
|
@ -379,7 +409,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
|||
.text-3d:hover { transform: rotateY(15deg) rotateX(15deg); text-shadow: 3px 3px 1px rgba(0, 0, 0, 0.3), 4px 4px 2px rgba(0, 0, 0, 0.25), 5px 5px 3px rgba(0, 0, 0, 0.2); }
|
||||
.card { border-radius: 12px; overflow: hidden; box-shadow: var(--bs-shadow-medium); }
|
||||
.card-header { background-color: var(--bs-primary); color: #fff; }
|
||||
.royal-style { font-family: 'Cinzel Decorative', cursive; font-weight: 900; font-size: 80px; color: var(--bs-primary); text-shadow: 2px 2px 4px rgba(142, 68, 173, 0.7), 0 0 20px rgba(142, 68, 173, 0.3); letter-spacing: 4px; text-align: center; margin-top: 20px; transition: all var(-- bs-transition-speed); }
|
||||
.royal-style { font-family: 'Cinzel Decorative', cursive; font-weight: 900; font-size: 80px; letter-spacing: 4px; text-align: center; margin-top: 20px; transition: all var(-- bs-transition-speed); }
|
||||
.royal-style:hover { transform: skew(-5deg); text-shadow: 3px 3px 6px rgba(0,0,0,0.2); }
|
||||
@media (max-width: 991.98px) {
|
||||
.container-sm.container-bg.callout {
|
||||
|
@ -467,10 +497,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
|||
font-family: 'Cinzel Decorative', cursive;
|
||||
font-weight: 900;
|
||||
font-size: 80px;
|
||||
color: var(--bs-primary);
|
||||
text-shadow:
|
||||
2px 2px 4px rgba(142, 68, 173, 0.7),
|
||||
0 0 20px rgba(142, 68, 173, 0.3);
|
||||
letter-spacing: 4px;
|
||||
text-align: center;
|
||||
margin-top: 20px;
|
||||
|
@ -577,10 +603,10 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
|||
}
|
||||
";
|
||||
|
||||
$filePath = $_SERVER['DOCUMENT_ROOT'] . '/nekobox/assets/theme/transparent.css';
|
||||
$filePath = $_SERVER['DOCUMENT_ROOT'] . '/nekobox/assets/theme/' . $themeFileName;
|
||||
file_put_contents($filePath, $cssContent);
|
||||
echo "<script>
|
||||
alert('自定义主题已更新,名称为 transparent.css !');
|
||||
alert('自定义主题已更新,名称为 $themeName.css !');
|
||||
window.location.href = 'settings.php';
|
||||
</script>";
|
||||
} else {
|
||||
|
|
|
@ -1076,6 +1076,7 @@ o:depends({type = "v2ray", v2ray_protocol = "vless", transport = "splithttp"})
|
|||
o:depends({type = "v2ray", v2ray_protocol = "vless", transport = "h2"})
|
||||
o:depends({type = "v2ray", v2ray_protocol = "vless", transport = "quic"})
|
||||
o:depends({type = "v2ray", v2ray_protocol = "vless", transport = "grpc"})
|
||||
o:depends({type = "v2ray", v2ray_protocol = "vmess"})
|
||||
o:depends({type = "v2ray", v2ray_protocol = "trojan"})
|
||||
o:depends({type = "v2ray", v2ray_protocol = "shadowsocks"})
|
||||
o:depends({type = "v2ray", v2ray_protocol = "socks"})
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
-%>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
window.addEventListener('load',function(){
|
||||
window.addEventListener('load', function () {
|
||||
const doms = document.getElementsByClassName('pingtime');
|
||||
const ports = document.getElementsByClassName("socket-connected");
|
||||
const transports = document.getElementsByClassName("transport");
|
||||
|
@ -17,7 +17,7 @@
|
|||
const transport = transports[index];
|
||||
const wsPath = wsPaths[index];
|
||||
const tls = tlss[index];
|
||||
if (!dom) res()
|
||||
if (!dom) res();
|
||||
port.innerHTML = '<font style=\"color:#0072c3\">connect</font>';
|
||||
XHR.get('<%=luci.dispatcher.build_url("admin/services/shadowsocksr/ping")%>', {
|
||||
index,
|
||||
|
@ -34,7 +34,7 @@
|
|||
if (result.ping < 200) col = '#ff7700';
|
||||
if (result.ping < 100) col = '#249400';
|
||||
}
|
||||
dom.innerHTML = `<font style=\"color:${col}\">${(result.ping ? result.ping : "--") + " ms"}</font>`
|
||||
dom.innerHTML = `<font style=\"color:${col}\">${(result.ping ? result.ping : "--") + " ms"}</font>`;
|
||||
if (result.socket) {
|
||||
port.innerHTML = '<font style=\"color:#249400\">ok</font>';
|
||||
} else {
|
||||
|
@ -42,19 +42,19 @@
|
|||
}
|
||||
res();
|
||||
});
|
||||
})
|
||||
}
|
||||
});
|
||||
};
|
||||
let task = -1;
|
||||
const thread = () => {
|
||||
task = task + 1
|
||||
task = task + 1;
|
||||
if (doms[task]) {
|
||||
xhr(task).then(thread);
|
||||
}
|
||||
}
|
||||
};
|
||||
for (let i = 0; i < 20; i++) {
|
||||
thread()
|
||||
thread();
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
function cbi_row_drop(fromId, toId, store, isToBottom) {
|
||||
var fromNode = document.getElementById(fromId);
|
||||
|
@ -85,6 +85,7 @@
|
|||
if (input) input.value = ids.join(" ");
|
||||
return false;
|
||||
}
|
||||
|
||||
// set tr draggable
|
||||
function enableDragForTable(table_selecter, store) {
|
||||
var trs = document.querySelectorAll(table_selecter + " tr");
|
||||
|
@ -137,9 +138,11 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// enable
|
||||
enableDragForTable(
|
||||
"#cbi-shadowsocksr-servers table",
|
||||
"cbi.sts.shadowsocksr.servers"
|
||||
);
|
||||
//]]>
|
||||
</script>
|
||||
|
|
|
@ -310,7 +310,7 @@ end
|
|||
} or nil,
|
||||
sockopt = {
|
||||
mark = 250,
|
||||
tcpFastOpen = (server.tcpfastOpen == "1") and true or false, -- XHTTP Tcp Fast Open
|
||||
tcpFastOpen = ((server.transport == "xhttp" and server.tcpfastopen == "1") and true or false) or (server.transport ~= "xhttp") and nil, -- XHTTP Tcp Fast Open
|
||||
tcpMptcp = (server.mptcp == "1") and true or nil, -- MPTCP
|
||||
Penetrate = (server.mptcp == "1") and true or nil, -- Penetrate MPTCP
|
||||
tcpcongestion = server.custom_tcpcongestion, -- 连接服务器节点的 TCP 拥塞控制算法
|
||||
|
@ -350,7 +350,7 @@ if xray_fragment.fragment ~= "0" or (xray_fragment.noise ~= "0" and xray_noise.e
|
|||
streamSettings = {
|
||||
sockopt = {
|
||||
mark = 250,
|
||||
tcpFastOpen = (server.tcpfastOpen == "1") and true or false, -- XHTTP Tcp Fast Open
|
||||
tcpFastOpen = ((server.transport == "xhttp" and server.tcpfastopen == "1") and true or false) or (server.transport ~= "xhttp") and nil, -- XHTTP Tcp Fast Open
|
||||
tcpMptcp = (server.mptcp == "1") and true or nil, -- MPTCP
|
||||
Penetrate = (server.mptcp == "1") and true or nil, -- Penetrate MPTCP
|
||||
tcpcongestion = server.custom_tcpcongestion -- 连接服务器节点的 TCP 拥塞控制算法
|
||||
|
|
Loading…
Reference in New Issue