修改代理 IP 获取设置,新增 GeoLite 本地归属地查询,修正 devtools 配置导致 ByteBuddy 重定义方法类
ClassLoader 不一致,进一步导致重定义方法内无法获取到自定义规则的问题
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
logging.level:
|
||||
'[quant.rich]': debug
|
||||
'[org.springframework.security]': info
|
||||
'[org.springframework.boot.devtools.restart]': debug
|
||||
|
||||
spring:
|
||||
cache:
|
||||
@@ -17,7 +18,9 @@ spring:
|
||||
use-key-prefix: true
|
||||
devtools:
|
||||
restart:
|
||||
enabled: true
|
||||
additional-exclude: '**/*.html'
|
||||
additional-paths: lib/
|
||||
jackson:
|
||||
date-format: yyyy-MM-dd HH:mm:ss
|
||||
time-zone: Asia/Shanghai
|
||||
|
||||
@@ -5,7 +5,7 @@ body {
|
||||
position: fixed;
|
||||
z-index: 999;
|
||||
width: 100%;
|
||||
box-shadow: 0 0px 20px 0 rgb(158 158 158 / 86%);
|
||||
/*box-shadow: 0 0px 20px 0 rgb(158 158 158 / 86%);*/
|
||||
}
|
||||
.main-nav+* {
|
||||
padding-top: 80px;
|
||||
@@ -19,6 +19,38 @@ body {
|
||||
.layui-nav .layui-badge{
|
||||
position: relative
|
||||
}
|
||||
.nav-user-info>.layui-nav-img {
|
||||
transition: ease-in-out .4s;
|
||||
z-index: 1;
|
||||
position: relative;
|
||||
opacity: 0.9;
|
||||
}
|
||||
.nav-user-info:hover>.layui-nav-img {
|
||||
opacity: 1;
|
||||
}
|
||||
.nav-user-info::before {
|
||||
transition: ease-in-out .4s;
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 16px;
|
||||
width: 30px; height: 30px;
|
||||
border-radius: 50%;
|
||||
filter: blur(6px);
|
||||
background: conic-gradient(
|
||||
from 0deg,
|
||||
#ff0080, #ff8c00, #ffff00, #00ff80,
|
||||
#00f6ff, #8000ff, #ff0080
|
||||
);
|
||||
z-index: 0;
|
||||
animation: spin 4s linear infinite;
|
||||
}
|
||||
.nav-user-info:hover::before {
|
||||
filter: blur(10px) brightness(1.5);
|
||||
}
|
||||
@keyframes spin {
|
||||
0% { transform: rotate(0deg); }
|
||||
100% { transform: rotate(360deg); }
|
||||
}
|
||||
.manage-body {
|
||||
padding: 80px 18% 0
|
||||
}
|
||||
@@ -333,7 +365,13 @@ ul.start-list span {
|
||||
border: none;
|
||||
padding: 0
|
||||
}
|
||||
|
||||
.layui-nav {
|
||||
background-color: rgb(241 241 241 / 60%);
|
||||
backdrop-filter: blur(4.2px);
|
||||
}
|
||||
.layui-nav .layui-nav-item a {
|
||||
color: black !important;
|
||||
}
|
||||
/* 覆盖样式:blockquote */
|
||||
blockquote.layui-elem-quote {
|
||||
border-radius: 5px;
|
||||
@@ -395,4 +433,13 @@ blockquote.layui-elem-quote {
|
||||
}
|
||||
.bottom-anchor-before.submit-fixed {
|
||||
height: 54px
|
||||
}
|
||||
fieldset>legend {
|
||||
font-weight: 500
|
||||
}
|
||||
fieldset>legend:before {
|
||||
content: '#';
|
||||
font-weight: bold;
|
||||
margin-right: .25em;
|
||||
color: rgb(22, 183, 119)
|
||||
}
|
||||
@@ -13,24 +13,7 @@
|
||||
益盟操盘手请求头配置,请小心更改。部分参数需要通过模拟的 APP 版本抓包确认。
|
||||
</blockquote>
|
||||
<div class="layui-form" id="editCommentForm" lay-filter="editCommentForm">
|
||||
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
|
||||
<legend>代理配置</legend>
|
||||
</fieldset>
|
||||
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">单行选择框</label>
|
||||
<div class="layui-input-block">
|
||||
<select name="proxyType" lay-filter="proxyType">
|
||||
<option value=""></option>
|
||||
<option value="DIRECT">无</option>
|
||||
<option value="HTTP" selected>阅读</option>
|
||||
<option value="SOCKET">游戏</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
|
||||
<fieldset class="layui-elem-field layui-field-title">
|
||||
<legend>鉴权配置</legend>
|
||||
</fieldset>
|
||||
<div class="layui-form-item">
|
||||
@@ -67,7 +50,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
|
||||
<fieldset class="layui-elem-field layui-field-title">
|
||||
<legend>应用配置</legend>
|
||||
</fieldset>
|
||||
<div class="layui-form-item">
|
||||
@@ -79,7 +62,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">Emoney Version<span>*</span></label>
|
||||
<label class="layui-form-label">应用版本号<span>*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input class="layui-input" th:value="${@emoneyRequestConfig.emoneyVersion}" name="emoneyVersion" lay-verify="required"/>
|
||||
<div class="layui-form-mid layui-word-aux">默认 5.8.1
|
||||
@@ -95,7 +78,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
|
||||
<fieldset class="layui-elem-field layui-field-title">
|
||||
<legend>设备配置</legend>
|
||||
</fieldset>
|
||||
|
||||
@@ -113,7 +96,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">Device Name<span>*</span></label>
|
||||
<label class="layui-form-label">设备名称<span>*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input class="layui-input" th:value="${@emoneyRequestConfig.deviceName}" name="deviceName" lay-verify="required"/>
|
||||
<div class="layui-form-mid layui-word-aux">对应 build.prop 中 Build.MODEL,用于
|
||||
@@ -126,7 +109,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">Fingerprint<span>*</span></label>
|
||||
<label class="layui-form-label">指纹<span>*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input class="layui-input" th:value="${@emoneyRequestConfig.fingerprint}" name="fingerprint" lay-verify="required"/>
|
||||
<div class="layui-form-mid layui-word-aux">对应 build.prop 中 Build.FINGERPRINT,用于
|
||||
@@ -139,19 +122,19 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">Software Type<span>*</span></label>
|
||||
<label class="layui-form-label">软件类型<span>*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input class="layui-input" th:value="${@emoneyRequestConfig.softwareType}" name="softwareType" lay-verify="required"/>
|
||||
<div class="layui-form-mid layui-word-aux">用于
|
||||
<ul>
|
||||
<li>益盟登录接口 <code><i>softwareType</i> = <b>softwareType</b></code></li>
|
||||
</ul>
|
||||
一般和设备有关,需要更改请<a href="javascript:refreshDeviceInfo()">刷新</a>
|
||||
Mobile 或 Pad,一般和设备有关,需要更改请<a href="javascript:refreshDeviceInfo()">刷新</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">Chrome Version<span>*</span></label>
|
||||
<label class="layui-form-label">Chrome<br>版本号<span>*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input class="layui-input" th:value="${@emoneyRequestConfig.chromeVersion}" name="chromeVersion" lay-verify="required"/>
|
||||
<div class="layui-form-mid layui-word-aux">用于 WebView User-Agent,需要更改请<a href="javascript:refreshChromeVersion()">刷新</a>
|
||||
|
||||
@@ -27,17 +27,13 @@
|
||||
<div class="layui-input-block">
|
||||
<input class="layui-input" autocomplete="off"
|
||||
th:value="${@proxyConfig.proxyHost}" name="proxyHost"/>
|
||||
<div class="layui-form-mid layui-word-aux">代理地址
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">代理端口</label>
|
||||
<div class="layui-input-block">
|
||||
<input class="layui-input" autocomplete="off" type="number" min="0" max="65535"
|
||||
th:value="${@proxyConfig.proxyPort}" name="proxyPort" lay-verify="number|ge:0|le:65535"/>
|
||||
<div class="layui-form-mid layui-word-aux">非匿名登录时的密码
|
||||
</div>
|
||||
<input class="layui-input" autocomplete="off" type="number" min="1" max="65535"
|
||||
th:value="${@proxyConfig.proxyPort}" name="proxyPort" lay-verify="number|gt:0|le:65535"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -50,10 +46,13 @@
|
||||
th:checked="${@proxyConfig.ignoreHttpsVerification}"
|
||||
name="ignoreHttpsVerification" lay-verify="required"/>
|
||||
</div>
|
||||
<div class="layui-form-mid layui-word-aux">
|
||||
出于安全考虑,当且仅当使用 Fiddler/BurpSuite 调试时才建议启用
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="bottom-anchor-before"></div>
|
||||
<div class="layui-form-item submit-toolbar submit-fixed">
|
||||
<div class="layui-form-item submit-toolbar submit-fixed" style="display: none">
|
||||
<div class="layui-input-block">
|
||||
<button class="layui-btn" lay-submit lay-filter="submit">提交</button>
|
||||
</div>
|
||||
@@ -72,6 +71,9 @@
|
||||
|
||||
const observer = new IntersectionObserver(
|
||||
([entry]) => {
|
||||
if (toolbar.style.display == 'none') {
|
||||
toolbar.style.display = '';
|
||||
}
|
||||
if (entry.isIntersecting) {
|
||||
toolbar.classList.remove('submit-fixed');
|
||||
toolbar.classList.add('submit-static');
|
||||
@@ -103,7 +105,7 @@
|
||||
document.querySelectorAll('input[lay-skin="switch"]').forEach(checkbox => {
|
||||
field[checkbox.getAttribute('name')] = checkbox.getAttribute('value') == 'true'
|
||||
});
|
||||
|
||||
const load = layui.layer.load(2);
|
||||
$.ajax({
|
||||
url: location.href,
|
||||
data: JSON.stringify(field),
|
||||
@@ -119,6 +121,9 @@
|
||||
Dog.error({
|
||||
msg: r && r.data,
|
||||
})
|
||||
},
|
||||
complete: function () {
|
||||
layer.close(load);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -54,8 +54,8 @@
|
||||
</dl>
|
||||
</li>
|
||||
<li class="layui-nav-item" style="float:right;margin-right: 1px;" lay-unselect="">
|
||||
<a href="javascript:;" class="nav-last">
|
||||
<img id="adminUserGravatar" th:src="@{/img/emograb_avatar.png}" loading="lazy" referrerpolicy="same-origin" class="layui-nav-img" />
|
||||
<a href="javascript:;" class="nav-last nav-user-info" >
|
||||
<img id="adminUserGravatar" th:src="@{/img/dog-avatar.webp}" loading="lazy" referrerpolicy="same-origin" class="layui-nav-img" />
|
||||
<span id="adminUserNickname">[[${@platformConfig.username}]]</span>
|
||||
</a>
|
||||
<dl class="layui-nav-child">
|
||||
@@ -70,7 +70,7 @@
|
||||
<input type="hidden" name="id"/>
|
||||
<label class="layui-form-label">用户昵称<span>*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" lay-verify="required" name="nickname" placeholder="" autocomplete="off" class="layui-input"/>
|
||||
<input type="text" lay-verify="required" name="username" placeholder="" autocomplete="off" class="layui-input"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
@@ -79,12 +79,6 @@
|
||||
<input type="text" lay-verify="required" name="email" placeholder="" autocomplete="off" class="layui-input"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">网站</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="site" placeholder="" autocomplete="off" class="layui-input"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item" id="old-pass">
|
||||
<label class="layui-form-label">旧密码</label>
|
||||
<div class="layui-input-block">
|
||||
@@ -115,6 +109,37 @@
|
||||
<script th:src="@{/admin/v1/static/js/dog.js}"></script>
|
||||
|
||||
<script>
|
||||
|
||||
let refreshTimer = null;
|
||||
|
||||
async function refreshIpThroughProxy() {
|
||||
try {
|
||||
let res = await (await fetch('/admin/v1/config/proxy/refreshIpThroughProxy')).json();
|
||||
if (res.ok) {
|
||||
let ip = res.data.string || '获取代理 IP 失败';
|
||||
document.getElementById('ipThroughProxy').textContent = ip;
|
||||
}
|
||||
} catch (e) {
|
||||
console.error('刷新失败:', e);
|
||||
}
|
||||
}
|
||||
|
||||
function startAutoRefreshIp() {
|
||||
if (refreshTimer) return; // 避免重复计时
|
||||
const loop = async () => {
|
||||
await refreshIpThroughProxy();
|
||||
refreshTimer = setTimeout(loop, 20000);
|
||||
};
|
||||
loop();
|
||||
}
|
||||
|
||||
function manualRefreshIp() {
|
||||
refreshIpThroughProxy(); // 不再触发 setTimeout
|
||||
}
|
||||
|
||||
// 初始启动定时刷新
|
||||
startAutoRefreshIp();
|
||||
|
||||
layui.use(function () {
|
||||
var element = layui.element, form = layui.form, layer = layui.layer;
|
||||
element.on('nav(demo)', function (elem) {
|
||||
@@ -122,9 +147,9 @@
|
||||
});
|
||||
$('.change-user-info').on('click', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
|
||||
$.ajax({
|
||||
url: '/admin/v1/getCurrentUserInfo',
|
||||
url: '/admin/v1/getUserInfo',
|
||||
success: function (r) {
|
||||
layui.layer.open({
|
||||
type: 1,
|
||||
@@ -137,9 +162,8 @@
|
||||
content: $('#editUser').html(),
|
||||
success: function (layero, layerIndex) {
|
||||
var el = $(layero), o = el.find('#old-pass'), n = el.find('#new-pass');
|
||||
el.find('[name="nickname"]').val(r.data.nickname);
|
||||
el.find('[name="username"]').val(r.data.username);
|
||||
el.find('[name="email"]').val(r.data.email);
|
||||
el.find('[name="site"]').val(r.data.site);
|
||||
el.on('input propertychange', '#new-pass input', function () {
|
||||
var that = $(this);
|
||||
if (that.val()) {
|
||||
@@ -163,7 +187,7 @@
|
||||
data.field['newPassword'] = sha3_224(data.field.newPassword);
|
||||
}
|
||||
$.ajax({
|
||||
url: '/admin/v1/setCurrentUserInfo',
|
||||
url: '/admin/v1/changeUserInfo',
|
||||
method: 'POST',
|
||||
data: data.field,
|
||||
success: function (r) {
|
||||
@@ -173,8 +197,8 @@
|
||||
icon: 1,
|
||||
time: 1000
|
||||
});
|
||||
$('#adminUserNickname').text(r.data.nickname);
|
||||
$('#adminUserGravatar').attr('src', r.data.avatarUrl);
|
||||
$('#adminUserNickname').text(r.data.username);
|
||||
//$('#adminUserGravatar').attr('src', r.data.avatarUrl);
|
||||
},
|
||||
error: function (res) {
|
||||
var r = res.responseJSON;
|
||||
@@ -197,6 +221,10 @@
|
||||
</script>
|
||||
</th:block>
|
||||
<div th:fragment="feet" class="layui-trans layadmin-user-login-footer">
|
||||
<a id="ipThroughProxy" href="javascript:manualRefreshIp()" title="立即刷新">
|
||||
[[${@proxyConfig.ipInfo == null ? '当前 IP 信息:加载中...' :
|
||||
@proxyConfig.ipInfo.string}]]
|
||||
</a><br>
|
||||
Driven by Latte<br />
|
||||
©2025-[[${#dates.format(new java.util.Date().getTime(),'yyyy')}]]
|
||||
<a href="#">Latte</a>
|
||||
|
||||
Reference in New Issue
Block a user