删除了对应 proxy 字段、新增 proxyConfig 以后的更新
This commit is contained in:
@@ -1,8 +1,4 @@
|
|||||||
{
|
{
|
||||||
"proxyType" : "DIRECT",
|
|
||||||
"proxyHost" : null,
|
|
||||||
"proxyPort" : null,
|
|
||||||
"ignoreHttpsVerification" : false,
|
|
||||||
"isAnonymous" : false,
|
"isAnonymous" : false,
|
||||||
"username" : "emy1730978",
|
"username" : "emy1730978",
|
||||||
"password" : "ubVa0vNmD+JJC4171eLYUw==",
|
"password" : "ubVa0vNmD+JJC4171eLYUw==",
|
||||||
|
|||||||
6
conf/system/proxy.json
Normal file
6
conf/system/proxy.json
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"proxyType" : "DIRECT",
|
||||||
|
"proxyHost" : "",
|
||||||
|
"proxyPort" : 0,
|
||||||
|
"ignoreHttpsVerification" : true
|
||||||
|
}
|
||||||
@@ -46,26 +46,6 @@ import quant.rich.emoney.util.TextUtils;
|
|||||||
@ConfigInfo(field = "emoneyRequest", name = "益盟请求设置", initDefault = true)
|
@ConfigInfo(field = "emoneyRequest", name = "益盟请求设置", initDefault = true)
|
||||||
public class EmoneyRequestConfig implements IConfig<EmoneyRequestConfig> {
|
public class EmoneyRequestConfig implements IConfig<EmoneyRequestConfig> {
|
||||||
|
|
||||||
/**
|
|
||||||
* 代理类型
|
|
||||||
*/
|
|
||||||
private Proxy.Type proxyType = Proxy.Type.DIRECT;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 代理主机
|
|
||||||
*/
|
|
||||||
private String proxyHost;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 代理端口
|
|
||||||
*/
|
|
||||||
private Integer proxyPort;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 是否忽略 HTTPS 证书校验
|
|
||||||
*/
|
|
||||||
private Boolean ignoreHttpsVerification = false;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否匿名登录
|
* 是否匿名登录
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -13,6 +13,23 @@
|
|||||||
益盟操盘手请求头配置,请小心更改。部分参数需要通过模拟的 APP 版本抓包确认。
|
益盟操盘手请求头配置,请小心更改。部分参数需要通过模拟的 APP 版本抓包确认。
|
||||||
</blockquote>
|
</blockquote>
|
||||||
<div class="layui-form" id="editCommentForm" lay-filter="editCommentForm">
|
<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" style="margin-top: 20px;">
|
||||||
<legend>鉴权配置</legend>
|
<legend>鉴权配置</legend>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|||||||
131
src/main/resources/webpage/admin/v1/config/proxy/index.html
Normal file
131
src/main/resources/webpage/admin/v1/config/proxy/index.html
Normal file
@@ -0,0 +1,131 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en" xmlns:th="http://www.thymeleaf.org">
|
||||||
|
<head th:replace="~{admin/v1/include::head}">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<ul th:replace="~{admin/v1/include::nav}"></ul>
|
||||||
|
|
||||||
|
<div class="manage-body">
|
||||||
|
<div>
|
||||||
|
<h1 class="manage-title"><b>代理设置</b></h1>
|
||||||
|
</div>
|
||||||
|
<div class="layui-form" id="editCommentForm" lay-filter="editCommentForm">
|
||||||
|
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<label class="layui-form-label">代理类型</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<select name="proxyType" lay-filter="proxyType">
|
||||||
|
<option value="DIRECT" th:selected="${@proxyConfig.proxyType == ProxyTypeEnum.DIRECT}">无</option>
|
||||||
|
<option value="HTTP" th:selected="${@proxyConfig.proxyType == ProxyTypeEnum.HTTP}">Http(s)</option>
|
||||||
|
<option value="SOCKS" th:selected="${@proxyConfig.proxyType == ProxyTypeEnum.SOCKS}">Socks</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<label class="layui-form-label">代理地址</label>
|
||||||
|
<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>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<label class="layui-form-label">忽略 HTTPS 证书校验<span>*</span></label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<input type="checkbox" lay-skin="switch" lay-text="ON|OFF"
|
||||||
|
lay-filter="isAnonymous"
|
||||||
|
th:value="${@proxyConfig.ignoreHttpsVerification}"
|
||||||
|
th:checked="${@proxyConfig.ignoreHttpsVerification}"
|
||||||
|
name="ignoreHttpsVerification" lay-verify="required"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="bottom-anchor-before"></div>
|
||||||
|
<div class="layui-form-item submit-toolbar submit-fixed">
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<button class="layui-btn" lay-submit lay-filter="submit">提交</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="bottom-anchor-after"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div th:replace="~{admin/v1/include::feet}"></div>
|
||||||
|
<th:block th:replace="~{admin/v1/include::head-script}"></th:block>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
const toolbar = document.querySelector('.submit-toolbar');
|
||||||
|
const anchorBefore = document.querySelector('.bottom-anchor-before');
|
||||||
|
const anchor = document.querySelector('.bottom-anchor-after');
|
||||||
|
|
||||||
|
const observer = new IntersectionObserver(
|
||||||
|
([entry]) => {
|
||||||
|
if (entry.isIntersecting) {
|
||||||
|
toolbar.classList.remove('submit-fixed');
|
||||||
|
toolbar.classList.add('submit-static');
|
||||||
|
anchorBefore.classList.remove('submit-fixed');
|
||||||
|
anchorBefore.classList.add('submit-static');
|
||||||
|
|
||||||
|
} else {
|
||||||
|
toolbar.classList.remove('submit-static');
|
||||||
|
toolbar.classList.add('submit-fixed');
|
||||||
|
anchorBefore.classList.remove('submit-static');
|
||||||
|
anchorBefore.classList.add('submit-fixed');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ threshold: 0.01 }
|
||||||
|
);
|
||||||
|
|
||||||
|
observer.observe(anchor);
|
||||||
|
|
||||||
|
layui.use(['form'], function(){
|
||||||
|
var form = layui.form;
|
||||||
|
document.querySelectorAll('[lay-skin="switch"]').forEach(check => {
|
||||||
|
form.on(`switch(${check.getAttribute('lay-filter')})`, (data) => {
|
||||||
|
var el = data.elem;
|
||||||
|
el.value = !!el.checked;
|
||||||
|
});
|
||||||
|
})
|
||||||
|
form.on('submit(submit)', function(data){
|
||||||
|
var field = data.field;
|
||||||
|
document.querySelectorAll('input[lay-skin="switch"]').forEach(checkbox => {
|
||||||
|
field[checkbox.getAttribute('name')] = checkbox.getAttribute('value') == 'true'
|
||||||
|
});
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
url: location.href,
|
||||||
|
data: JSON.stringify(field),
|
||||||
|
contentType: 'application/json',
|
||||||
|
method: 'POST',
|
||||||
|
success: function (result) {
|
||||||
|
Dog.success({
|
||||||
|
onClose: () => location.reload()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
error: function (res) {
|
||||||
|
var r = res.responseJSON;
|
||||||
|
Dog.error({
|
||||||
|
msg: r && r.data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
form.render();
|
||||||
|
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
@@ -50,6 +50,7 @@
|
|||||||
<a href="javascript:;">设置</a>
|
<a href="javascript:;">设置</a>
|
||||||
<dl class="layui-nav-child">
|
<dl class="layui-nav-child">
|
||||||
<dd><a th:href="@{/admin/v1/config/emoneyRequest}">请求头设置</a></dd>
|
<dd><a th:href="@{/admin/v1/config/emoneyRequest}">请求头设置</a></dd>
|
||||||
|
<dd><a th:href="@{/admin/v1/config/proxy}">代理设置</a></dd>
|
||||||
</dl>
|
</dl>
|
||||||
</li>
|
</li>
|
||||||
<li class="layui-nav-item" style="float:right;margin-right: 1px;" lay-unselect="">
|
<li class="layui-nav-item" style="float:right;margin-right: 1px;" lay-unselect="">
|
||||||
|
|||||||
Reference in New Issue
Block a user