Skip to content

Commit 51d4e18

Browse files
committed
update
1 parent a75f648 commit 51d4e18

File tree

2 files changed

+2
-73
lines changed

2 files changed

+2
-73
lines changed

plugins/doh/init.d/doh.service.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Type=simple
99
User=www
1010
Group=www
1111
WorkingDirectory={$SERVER_PATH}/doh
12-
ExecStart={$SERVER_PATH}/doh/doh web
12+
ExecStart={$SERVER_PATH}/doh/doh-proxy --config {$SERVER_PATH}/config.toml
1313
Restart=always
1414
RemainAfterExit=yes
1515
#AmbientCapabilities=CAP_NET_BIND_SERVICE

plugins/doh/js/doh.js

Lines changed: 1 addition & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -679,81 +679,10 @@ function createScriptFile(type, user, name, file) {
679679
});
680680
}
681681

682-
function projectScriptSelf(user, name){
683-
layer.open({
684-
type: 1,
685-
title: '项目('+user+'/'+name+')自定义脚本',
686-
area: '500px',
687-
content:"<div class='bt-form pd15'>\
688-
<button id='create_script' class='btn btn-success btn-sm' type='button' style='margin-right: 5px;''>添加脚本</button>\
689-
<div style='float:right;'>\
690-
<span style='line-height: 23px;'>开启自定义脚本</span>\
691-
<input class='btswitch btswitch-ios' id='open_script' type='checkbox'>\
692-
<label id='script_hook_enable' class='btswitch-btn' for='open_script' style='display: inline-flex;line-height:38px;margin-left: 4px;float: right;'></label>\
693-
</div>\
694-
<div id='gogs_self_table' class='divtable' style='margin-top:5px;'>\
695-
<table class='table table-hover'>\
696-
<thead><tr><th style='width:100px;'>脚本文件名</th><th>状态</th><th>操作</th></tr></thead>\
697-
<tbody></tbody>\
698-
</table>\
699-
<div class='dataTables_paginate paging_bootstrap pagination' style='margin-top:0px;'>\
700-
<ul class='page'><div class='gogs_page'></div></ul>\
701-
</div>\
702-
</div>\
703-
</div>",
704-
success:function(){
705-
projectScriptSelfRender(user, name);
706-
707-
$('#create_script').click(function(){
708-
createScriptFile(0, user, name);
709-
});
710-
711-
$('#script_hook_enable').click(function(){
712-
var enable = $('#open_script').prop('checked');
713-
var enable_option = '0';
714-
if (!enable){
715-
enable_option = '1';
716-
}
717-
gogsPost('project_script_self_enable', {'user':user,'name':name,'enable':enable_option}, function(data){
718-
var data = $.parseJSON(data.data);
719-
showMsg(data.msg ,function(){
720-
projectScriptSelfRender(user, name);
721-
},{icon:data.status?1:2,shade: [0.3, '#000']},2000);
722-
});
723-
724-
});
725-
}
726-
});
727-
}
728-
729-
function getRsaPublic(){
730-
gogsPost('get_rsa_public', {}, function(data){
731-
var rdata = $.parseJSON(data.data);
732-
var con = '<div class="tab-con">\
733-
<div class="myKeyCon ptb15">\
734-
<textarea style="margin:0px;width:580px;height:110px;outline:none;" spellcheck="false">'+rdata.mw+'</textarea>\
735-
</div>\
736-
<ul class="help-info-text c7 pull-left"></ul>\
737-
</div>'
738-
layer.open({
739-
type: 1,
740-
area: "600px",
741-
title: '本机公钥',
742-
closeBtn: 2,
743-
shift: 5,
744-
shadeClose: false,
745-
content:con
746-
});
747-
});
748-
}
749-
750682
function dohRead(){
751683

752684
var readme = '<ul class="help-info-text c7">';
753-
readme += '<li>默认使用MySQL,第一个启动加载各种配置,并修改成正确的数据库配置</li>';
754-
readme += '<li>邮件端口使用456,gitea仅支持使用STARTTLS的SMTP协议</li>';
755-
readme += '<li>项目【加载脚本】后,会自动同步到wwwroot目录下</li>';
756-
readme += '<li><a href="#" onclick="getRsaPublic();">点击查看本机公钥</></li>';
685+
readme += '<li>DNS</li>';
757686
readme += '</ul>';
758687

759688
$('.soft-man-con').html(readme);

0 commit comments

Comments
 (0)