mirror of
https://github.com/ehang-io/nps.git
synced 2025-09-02 03:16:53 +00:00
健康检查
This commit is contained in:
@@ -26,8 +26,8 @@ func (s *BaseController) Prepare() {
|
||||
// param 2 is timestamp (It's limited to 20 seconds.)
|
||||
md5Key := s.GetString("auth_key")
|
||||
timestamp := s.GetIntNoErr("timestamp")
|
||||
configKey := beego.AppConfig.String("authKey")
|
||||
if !(time.Now().Unix()-int64(timestamp) < 20 && time.Now().Unix()-int64(timestamp) > 0 && crypt.Md5(configKey+strconv.Itoa(timestamp)) == md5Key) {
|
||||
configKey := beego.AppConfig.String("auth_key")
|
||||
if !(time.Now().Unix()-int64(timestamp) <= 20 && time.Now().Unix()-int64(timestamp) >= 0 && crypt.Md5(configKey+strconv.Itoa(timestamp)) == md5Key) {
|
||||
if s.GetSession("auth") != true {
|
||||
s.Redirect("/login/index", 302)
|
||||
}
|
||||
|
@@ -38,9 +38,11 @@
|
||||
<div class="form-group" id="target">
|
||||
<label class="col-sm-2 control-label">target of Intranet(ip:port)</label>
|
||||
<div class="col-sm-10">
|
||||
<input class="form-control" type="text" name="target"
|
||||
placeholder="such as 10.1.50.203:22 ">
|
||||
<span class="help-block m-b-none">can only fill in ports if it is local machine proxy</span>
|
||||
<textarea class="form-control" name="target" rows="4" placeholder="10.1.50.203:22
|
||||
10.1.50.202:22"></textarea>
|
||||
<span class="help-block m-b-none">can only fill in ports if it is local machine proxy, only tcp supports load balancing
|
||||
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@@ -39,10 +39,11 @@
|
||||
<div class="form-group" id="target">
|
||||
<label class="col-sm-2 control-label">target of Intranet(ip:port)</label>
|
||||
<div class="col-sm-10">
|
||||
<input value="{{.t.Target}}" class="form-control" type="text" name="target"
|
||||
placeholder="such as 10.1.50.203:22 ">
|
||||
<span class="help-block m-b-none">can only fill in ports if it is local machine proxy</span>
|
||||
</div>
|
||||
<textarea class="form-control" name="target" rows="4" placeholder="10.1.50.203:22
|
||||
10.1.50.202:22">{{.t.Target}}</textarea>
|
||||
<span class="help-block m-b-none">can only fill in ports if it is local machine proxy, only tcp supports load balancing
|
||||
|
||||
</span> </div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" id="client_id">
|
||||
|
@@ -120,4 +120,15 @@
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<script>
|
||||
// googleTranslateElementInit()
|
||||
//
|
||||
// function googleTranslateElementInit() {
|
||||
// new google.translate.TranslateElement({
|
||||
// layout: google.translate.TranslateElement.InlineLayout.HORIZONTAL
|
||||
// }, 'wrapper');
|
||||
// }
|
||||
</script>
|
||||
{{/*<script src="http://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>*/}}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user