Browse Source

Init at 2020-06-11 09:50

zry 3 years ago
parent
commit
f890dde683
59 changed files with 363 additions and 0 deletions
  1. 2 0
      .idea/.gitignore
  2. 8 0
      .idea/HypotheticalSwitch.iml
  3. 5 0
      .idea/inspectionProfiles/profiles_settings.xml
  4. 6 0
      .idea/misc.xml
  5. 8 0
      .idea/modules.xml
  6. 6 0
      .idea/vcs.xml
  7. 63 0
      backend/main.go
  8. 30 0
      backend/mangekyo_user_handler.go
  9. 55 0
      backend/validator.go
  10. 3 0
      dist_windows_test_env/.gitignore
  11. 60 0
      dist_windows_test_env/config.yaml
  12. 1 0
      dist_windows_test_env/debug.bat
  13. 18 0
      dist_windows_test_env/failure.html
  14. 1 0
      dist_windows_test_env/run.bat
  15. 0 0
      dist_windows_test_env/www/css/chunk-vendors.adac0faf.css
  16. BIN
      dist_windows_test_env/www/favicon.ico
  17. BIN
      dist_windows_test_env/www/fonts/Roboto-Black.313a6563.woff
  18. BIN
      dist_windows_test_env/www/fonts/Roboto-Black.59eb3601.woff2
  19. BIN
      dist_windows_test_env/www/fonts/Roboto-BlackItalic.cc2fadc3.woff
  20. BIN
      dist_windows_test_env/www/fonts/Roboto-BlackItalic.f75569f8.woff2
  21. BIN
      dist_windows_test_env/www/fonts/Roboto-Bold.50d75e48.woff
  22. BIN
      dist_windows_test_env/www/fonts/Roboto-Bold.b52fac2b.woff2
  23. BIN
      dist_windows_test_env/www/fonts/Roboto-BoldItalic.4fe0f73c.woff
  24. BIN
      dist_windows_test_env/www/fonts/Roboto-BoldItalic.94008e69.woff2
  25. BIN
      dist_windows_test_env/www/fonts/Roboto-Light.c73eb1ce.woff
  26. BIN
      dist_windows_test_env/www/fonts/Roboto-Light.d26871e8.woff2
  27. BIN
      dist_windows_test_env/www/fonts/Roboto-LightItalic.13efe6cb.woff
  28. BIN
      dist_windows_test_env/www/fonts/Roboto-LightItalic.e8eaae90.woff2
  29. BIN
      dist_windows_test_env/www/fonts/Roboto-Medium.1d659482.woff
  30. BIN
      dist_windows_test_env/www/fonts/Roboto-Medium.90d16760.woff2
  31. BIN
      dist_windows_test_env/www/fonts/Roboto-MediumItalic.13ec0eb5.woff2
  32. BIN
      dist_windows_test_env/www/fonts/Roboto-MediumItalic.83e114c3.woff
  33. BIN
      dist_windows_test_env/www/fonts/Roboto-Regular.35b07eb2.woff
  34. BIN
      dist_windows_test_env/www/fonts/Roboto-Regular.73f0a88b.woff2
  35. BIN
      dist_windows_test_env/www/fonts/Roboto-RegularItalic.4357beb8.woff2
  36. BIN
      dist_windows_test_env/www/fonts/Roboto-RegularItalic.f5902d5e.woff
  37. BIN
      dist_windows_test_env/www/fonts/Roboto-Thin.ad538a69.woff2
  38. BIN
      dist_windows_test_env/www/fonts/Roboto-Thin.d3b47375.woff
  39. BIN
      dist_windows_test_env/www/fonts/Roboto-ThinItalic.5b4a33e1.woff2
  40. BIN
      dist_windows_test_env/www/fonts/Roboto-ThinItalic.8a96edbb.woff
  41. BIN
      dist_windows_test_env/www/fonts/materialdesignicons-webfont.541e65fb.eot
  42. BIN
      dist_windows_test_env/www/fonts/materialdesignicons-webfont.c61b9c12.woff2
  43. BIN
      dist_windows_test_env/www/fonts/materialdesignicons-webfont.fc03f7f1.ttf
  44. BIN
      dist_windows_test_env/www/fonts/materialdesignicons-webfont.ff13d121.woff
  45. 1 0
      dist_windows_test_env/www/index.html
  46. 0 0
      dist_windows_test_env/www/js/app.7d34fd85.js
  47. 0 0
      dist_windows_test_env/www/js/app.7d34fd85.js.map
  48. 0 0
      dist_windows_test_env/www/js/app.c41045b0.js
  49. 0 0
      dist_windows_test_env/www/js/app.c41045b0.js.map
  50. 2 0
      dist_windows_test_env/www/js/chunk-2d22493e.46962cb8.js
  51. 0 0
      dist_windows_test_env/www/js/chunk-2d22493e.46962cb8.js.map
  52. 2 0
      dist_windows_test_env/www/js/chunk-2d22493e.de48d3f1.js
  53. 0 0
      dist_windows_test_env/www/js/chunk-2d22493e.de48d3f1.js.map
  54. 0 0
      dist_windows_test_env/www/js/chunk-vendors.47e76cb7.js
  55. 0 0
      dist_windows_test_env/www/js/chunk-vendors.47e76cb7.js.map
  56. 0 0
      dist_windows_test_env/www/js/chunk-vendors.bac2a1e3.js
  57. 0 0
      dist_windows_test_env/www/js/chunk-vendors.bac2a1e3.js.map
  58. 3 0
      dist_windows_test_env/www/sysConfig.json
  59. 89 0
      dist_windows_test_env/zdwsi.frontend.config.yaml

+ 2 - 0
.idea/.gitignore

@@ -0,0 +1,2 @@
+# Default ignored files
+/workspace.xml

+ 8 - 0
.idea/HypotheticalSwitch.iml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="WEB_MODULE" version="4">
+  <component name="NewModuleRootManager">
+    <content url="file://$MODULE_DIR$" />
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+  </component>
+</module>

+ 5 - 0
.idea/inspectionProfiles/profiles_settings.xml

@@ -0,0 +1,5 @@
+<component name="InspectionProjectProfileManager">
+  <settings>
+    <option name="PROJECT_PROFILE" />
+  </settings>
+</component>

+ 6 - 0
.idea/misc.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="JavaScriptSettings">
+    <option name="languageLevel" value="ES6" />
+  </component>
+</project>

+ 8 - 0
.idea/modules.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ProjectModuleManager">
+    <modules>
+      <module fileurl="file://$PROJECT_DIR$/.idea/HypotheticalSwitch.iml" filepath="$PROJECT_DIR$/.idea/HypotheticalSwitch.iml" />
+    </modules>
+  </component>
+</project>

+ 6 - 0
.idea/vcs.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="VcsDirectoryMappings">
+    <mapping directory="$PROJECT_DIR$" vcs="Git" />
+  </component>
+</project>

+ 63 - 0
backend/main.go

@@ -0,0 +1,63 @@
+package main
+
+import (
+	"fmt"
+	"git.swzry.com/zry/go-hhc-cli/hhc_mangekyo"
+	"git.swzry.com/zry/go-hhc-cli/hhc_telws"
+	"github.com/gin-gonic/gin"
+	"github.com/gorilla/websocket"
+	"github.com/tjfoc/gmsm/sm2"
+	"net/http"
+	"os"
+	"time"
+)
+
+var ListenAddress string
+
+var TestSM2KeyPair *sm2.PrivateKey
+
+var upGrader = websocket.Upgrader{
+	CheckOrigin: func(r *http.Request) bool {
+		return true
+	},
+}
+
+func main() {
+	//runtime.Breakpoint()
+	ListenAddress = os.Getenv("listen")
+	if ListenAddress == "" {
+		fmt.Println("No environment variable 'listen', use default value ':9090'")
+		ListenAddress = ":9090"
+	}
+	k, err := sm2.GenerateKey()
+	if err != nil {
+		fmt.Println("Failed Generate SM2 Key:", err)
+		return
+	}
+	TestSM2KeyPair = k
+	r := gin.Default()
+	r.GET("/api/app-config.satori", appConfig)
+	telwsGrp := r.Group("/api/telws/")
+	muh := NewMUH()
+	mhf := hhc_mangekyo.NewMangekyoHandlerFactory(muh)
+	cbh := hhc_telws.NewCliBackendHandler(telwsGrp, mhf)
+	err = cbh.InitSecure(time.Minute * 10)
+	if err != nil {
+		fmt.Println("Failed Init Telws Handler:", err)
+		return
+	}
+	sah := hhc_telws.NewTelwsAuthSimpleAAA()
+	sah.SimpleAAAAddSimple("admin", "114514", 4)
+	cbh.AddAuthHandler(sah)
+	r.Run(ListenAddress)
+}
+
+func appConfig(ctx *gin.Context) {
+	ctx.JSON(200, gin.H{
+		"title":              "Hypothetical Swtich",
+		"appBarColor":        "#1c2c61",
+		"telwsUrl":           "/api/telws/",
+		"projectName":        "Hypothetical Switch",
+		"projectDescription": "A hypothetical switch CLI interface for HHC_CLI demo.",
+	})
+}

+ 30 - 0
backend/mangekyo_user_handler.go

@@ -0,0 +1,30 @@
+package main
+
+import (
+	"fmt"
+	"git.swzry.com/zry/go-hhc-cli/hhc_mangekyo"
+	"git.swzry.com/zry/go-hhc-cli/hhc_telws"
+	"git.swzry.com/zry/go-hhc-cli/hhccli"
+)
+
+type MUH struct {
+}
+
+func NewMUH() *MUH {
+	muh := &MUH{}
+	return muh
+}
+
+func (mhu *MUH) GetDefaultPromptString(ctx *hhc_telws.TelwsSessionContext) string {
+	return fmt.Sprintf("<%s@MangekyoHHCTest>", ctx.GetUsername())
+}
+func (mhu *MUH) GetDefaultTitle(ctx *hhc_telws.TelwsSessionContext) string {
+	return fmt.Sprintf("%s@MangekyoHHCTest - UserView", ctx.GetUsername())
+}
+func (mhu *MUH) GetCustomViewPortalCommands() []hhc_mangekyo.MangekyoCustomViewPortalCommandDefine {
+	mcvpcds := make([]hhc_mangekyo.MangekyoCustomViewPortalCommandDefine, 0)
+	return mcvpcds
+}
+func (mhu *MUH) NewSession(ctx *hhc_telws.TelwsSessionContext, cli *hhccli.TerminalInteractive) error {
+	return nil
+}

+ 55 - 0
backend/validator.go

@@ -0,0 +1,55 @@
+package main
+
+import (
+	"net"
+	"strconv"
+)
+
+func VLoopbackInf(t string) bool {
+	i, e := strconv.Atoi(t)
+	if e != nil {
+		return false
+	}
+	if i < 0 || i > 7 {
+		return false
+	}
+	return true
+}
+
+func VSubnetLen(t string) bool {
+	i, e := strconv.Atoi(t)
+	if e != nil {
+		return false
+	}
+	if i < 1 || i > 31 {
+		return false
+	}
+	return true
+}
+
+func VMTU(t string) bool {
+	i, e := strconv.Atoi(t)
+	if e != nil {
+		return false
+	}
+	if i < 128 || i > 1500 {
+		return false
+	}
+	return true
+}
+
+func VVlanInf(t string) bool {
+	i, e := strconv.Atoi(t)
+	if e != nil {
+		return false
+	}
+	if i < 0 || i > 4095 {
+		return false
+	}
+	return true
+}
+
+func VIPAddress(t string) bool {
+	_, err := net.ResolveIPAddr("ip", t)
+	return err == nil
+}

+ 3 - 0
dist_windows_test_env/.gitignore

@@ -0,0 +1,3 @@
+logs
+
+*.log

+ 60 - 0
dist_windows_test_env/config.yaml

@@ -0,0 +1,60 @@
+# config for frontend
+frontend:
+  # 'true' for enable frontend startup, 'false' for disable.
+  enable: true
+  # absolute path to the frontend executable file
+  entry: "zDWSIFrontend_WindowsTestEnv.exe"
+  # config for logger of frontend startup shell
+  shell_log:
+    # absolute path to shell log (log rotating will append infix into filename)
+    file: "logs/frontend.shell.log"
+    # max size per log file (MegaBytes)
+    max_size: 16
+    # max days for rotating
+    max_age: 30
+    # max backups for rotating remain
+    max_backups: 50
+    # 'true' for using local time for rotating
+    use_local_time: true
+    # 'true' for compress rotating history into zip files
+    compress_history: true
+  # listening address
+  # (will set environment variable 'listen' when startup frontend)
+  listen: ":18082"
+  # root path for frontend
+  # (will set environment variable 'wwwroot' when startup frontend)
+  wwwroot: "www/"
+  # config for backend reverse proxy
+  backend_proxy:
+    # backend forward prefix
+    # (will set environment variable 'backend_prefix' when startup frontend)
+    # e.g. : if using default frontend program, set this with 'api'
+    # the URL under http://hostname:port/api/ will be forwarding to backend
+    prefix: "api"
+    # backend forward target
+    # (will set environment variable 'backend_target' when startup frontend)
+    target: "http://localhost:19093/"
+
+# config for backend
+backend:
+  # 'true' for enable backend startup, 'false' for disable.
+  enable: true
+  # absolute path to the backend executable file
+  entry: "backend/LocalTest.exe"
+  # listening address
+  # (will set environment variable 'listen' when startup backend)
+  listen: ":19093"
+  # config for logger of backend startup shell
+  shell_log":
+    # absolute path to shell log (log rotating will append infix into filename)
+    file: "logs/backend.shell.log"
+    # max size per log file (MegaBytes)
+    max_size: 16
+    # max days for rotating
+    max_age: 30
+    # max backups for rotating remain
+    max_backups: 50
+    # 'true' for using local time for rotating
+    use_local_time: true
+    # 'true' for compress rotating history into zip files
+    compress_history: true

+ 1 - 0
dist_windows_test_env/debug.bat

@@ -0,0 +1 @@
+.\zDWSILauncher_WindowsTestEnv.exe -d -l :7827

+ 18 - 0
dist_windows_test_env/failure.html

@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+    <head>
+        <meta charset=utf-8>
+        <meta http-equiv=X-UA-Compatible content="IE=edge">
+        <meta name=viewport content="width=device-width,initial-scale=1">
+        <title>zDWSI Failure</title>
+    </head>
+    <body>
+        <h1>zDWSI Failure</h1>
+        <h2>Please contact web admin.</h2>
+        <hr />
+        <h6>
+            <a href="http://git.swzry.com/zry/zDWSI/" target="_blank">zDWSI</a>
+            - ZRY Docker Web Service Infrastructure - Version: 1.0
+        </h6>
+    </body>
+</html>

+ 1 - 0
dist_windows_test_env/run.bat

@@ -0,0 +1 @@
+zDWSILauncher_WindowsTestEnv.exe

File diff suppressed because it is too large
+ 0 - 0
dist_windows_test_env/www/css/chunk-vendors.adac0faf.css


BIN
dist_windows_test_env/www/favicon.ico


BIN
dist_windows_test_env/www/fonts/Roboto-Black.313a6563.woff


BIN
dist_windows_test_env/www/fonts/Roboto-Black.59eb3601.woff2


BIN
dist_windows_test_env/www/fonts/Roboto-BlackItalic.cc2fadc3.woff


BIN
dist_windows_test_env/www/fonts/Roboto-BlackItalic.f75569f8.woff2


BIN
dist_windows_test_env/www/fonts/Roboto-Bold.50d75e48.woff


BIN
dist_windows_test_env/www/fonts/Roboto-Bold.b52fac2b.woff2


BIN
dist_windows_test_env/www/fonts/Roboto-BoldItalic.4fe0f73c.woff


BIN
dist_windows_test_env/www/fonts/Roboto-BoldItalic.94008e69.woff2


BIN
dist_windows_test_env/www/fonts/Roboto-Light.c73eb1ce.woff


BIN
dist_windows_test_env/www/fonts/Roboto-Light.d26871e8.woff2


BIN
dist_windows_test_env/www/fonts/Roboto-LightItalic.13efe6cb.woff


BIN
dist_windows_test_env/www/fonts/Roboto-LightItalic.e8eaae90.woff2


BIN
dist_windows_test_env/www/fonts/Roboto-Medium.1d659482.woff


BIN
dist_windows_test_env/www/fonts/Roboto-Medium.90d16760.woff2


BIN
dist_windows_test_env/www/fonts/Roboto-MediumItalic.13ec0eb5.woff2


BIN
dist_windows_test_env/www/fonts/Roboto-MediumItalic.83e114c3.woff


BIN
dist_windows_test_env/www/fonts/Roboto-Regular.35b07eb2.woff


BIN
dist_windows_test_env/www/fonts/Roboto-Regular.73f0a88b.woff2


BIN
dist_windows_test_env/www/fonts/Roboto-RegularItalic.4357beb8.woff2


BIN
dist_windows_test_env/www/fonts/Roboto-RegularItalic.f5902d5e.woff


BIN
dist_windows_test_env/www/fonts/Roboto-Thin.ad538a69.woff2


BIN
dist_windows_test_env/www/fonts/Roboto-Thin.d3b47375.woff


BIN
dist_windows_test_env/www/fonts/Roboto-ThinItalic.5b4a33e1.woff2


BIN
dist_windows_test_env/www/fonts/Roboto-ThinItalic.8a96edbb.woff


BIN
dist_windows_test_env/www/fonts/materialdesignicons-webfont.541e65fb.eot


BIN
dist_windows_test_env/www/fonts/materialdesignicons-webfont.c61b9c12.woff2


BIN
dist_windows_test_env/www/fonts/materialdesignicons-webfont.fc03f7f1.ttf


BIN
dist_windows_test_env/www/fonts/materialdesignicons-webfont.ff13d121.woff


+ 1 - 0
dist_windows_test_env/www/index.html

@@ -0,0 +1 @@
+<!DOCTYPE html><html lang=zh-Hans><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=/favicon.ico><title>telws-common-frontend</title><link href=/js/chunk-2d22493e.46962cb8.js rel=prefetch><link href=/css/chunk-vendors.adac0faf.css rel=preload as=style><link href=/js/app.c41045b0.js rel=preload as=script><link href=/js/chunk-vendors.bac2a1e3.js rel=preload as=script><link href=/css/chunk-vendors.adac0faf.css rel=stylesheet></head><body><noscript><strong>We're sorry but telws-common-frontend doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=/js/chunk-vendors.bac2a1e3.js></script><script src=/js/app.c41045b0.js></script></body></html>

File diff suppressed because it is too large
+ 0 - 0
dist_windows_test_env/www/js/app.7d34fd85.js


File diff suppressed because it is too large
+ 0 - 0
dist_windows_test_env/www/js/app.7d34fd85.js.map


File diff suppressed because it is too large
+ 0 - 0
dist_windows_test_env/www/js/app.c41045b0.js


File diff suppressed because it is too large
+ 0 - 0
dist_windows_test_env/www/js/app.c41045b0.js.map


+ 2 - 0
dist_windows_test_env/www/js/chunk-2d22493e.46962cb8.js

@@ -0,0 +1,2 @@
+(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d22493e"],{e173:function(t,e,l){"use strict";l.r(e);var n=function(){var t=this,e=t.$createElement,l=t._self._c||e;return l("telws-view",{attrs:{"default-url":t.telwsUrl,"disable-url":""}})},o=[],r=l("5530"),c=l("2f62"),s={computed:Object(r["a"])(Object(r["a"])({},Object(c["b"])(["getTelwsUrl"])),{},{telwsUrl:function(){return window.location.protocol+"//"+window.location.host+this.getTelwsUrl()}})},u=s,w=l("2877"),a=Object(w["a"])(u,n,o,!1,null,null,null);e["default"]=a.exports}}]);
+//# sourceMappingURL=chunk-2d22493e.46962cb8.js.map

File diff suppressed because it is too large
+ 0 - 0
dist_windows_test_env/www/js/chunk-2d22493e.46962cb8.js.map


+ 2 - 0
dist_windows_test_env/www/js/chunk-2d22493e.de48d3f1.js

@@ -0,0 +1,2 @@
+(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d22493e"],{e173:function(t,e,l){"use strict";l.r(e);var n=function(){var t=this,e=t.$createElement,l=t._self._c||e;return l("telws-view",{attrs:{"default-url":t.telwsUrl,"disable-url":""}})},o=[],r=l("5530"),c=l("2f62"),s={computed:Object(r["a"])(Object(r["a"])({},Object(c["b"])(["getTelwsUrl"])),{},{telwsUrl:function(){return window.location.protocol+"//"+window.location.host+this.getTelwsUrl()}})},u=s,w=l("2877"),a=Object(w["a"])(u,n,o,!1,null,null,null);e["default"]=a.exports}}]);
+//# sourceMappingURL=chunk-2d22493e.de48d3f1.js.map

File diff suppressed because it is too large
+ 0 - 0
dist_windows_test_env/www/js/chunk-2d22493e.de48d3f1.js.map


File diff suppressed because it is too large
+ 0 - 0
dist_windows_test_env/www/js/chunk-vendors.47e76cb7.js


File diff suppressed because it is too large
+ 0 - 0
dist_windows_test_env/www/js/chunk-vendors.47e76cb7.js.map


File diff suppressed because it is too large
+ 0 - 0
dist_windows_test_env/www/js/chunk-vendors.bac2a1e3.js


File diff suppressed because it is too large
+ 0 - 0
dist_windows_test_env/www/js/chunk-vendors.bac2a1e3.js.map


+ 3 - 0
dist_windows_test_env/www/sysConfig.json

@@ -0,0 +1,3 @@
+{
+    "infoUrl": "/api/app-config.satori"
+}

+ 89 - 0
dist_windows_test_env/zdwsi.frontend.config.yaml

@@ -0,0 +1,89 @@
+# common config
+common:
+  # 'true' for enable global debug mode, 'false' for production environment
+  debug: true
+  # 'true' for redirect to 'redirect_url' when file not found, 'false' to return 404 message.
+  redirect_when_404: true
+  # when 'redirect_when_404' is 'true', it will redirect to this url when file not found.
+  redirect_url: "/"
+  # 'true' for enable backend reverse proxy, 'false' for disable.
+  backend_proxy_enable: true
+  # 'true' for enable gzip compression
+  enable_gzip: true
+  # 'true' for enable vue history mode support
+  vue_history_mode: true
+# config for log
+log:
+  # 'true' for enable access log, 'false' for disable access log
+  access_log_enable: true
+  # config for log rolling
+  rolling_log_config:
+    # config for error log rolling
+    error_log:
+      # absolute path to log (log rotating will append infix into filename)
+      file: "/data/logs/frontend.err.log"
+      # max size per log file (MegaBytes)
+      max_size: 16
+      # max days for rotating
+      max_age: 30
+      # max backups for rotating remain
+      max_backups: 50
+      # 'true' for using local time for rotating
+      use_local_time: true
+      # 'true' for compress rotating history into zip files
+      compress_history: true
+    # config for access log rolling
+    access_log:
+      # absolute path to log (log rotating will append infix into filename)
+      file: "/data/logs/frontend.access.log"
+      # max size per log file (MegaBytes)
+      max_size: 16
+      # max days for rotating
+      max_age: 30
+      # max backups for rotating remain
+      max_backups: 50
+      # 'true' for using local time for rotating
+      use_local_time: true
+      # 'true' for compress rotating history into zip files
+      compress_history: true
+  # detail config for access log
+  error_log_config:
+    # the log emitting level, the message which level below this will be emitted
+    # optional value: 'DEBUG', 'INFO', 'WARN', 'ERROR', 'PANIC', 'FATAL'
+    # all level option below should be one of these values
+    output_level: "INFO"
+    # format string for log. this formation using YAGTF.
+    # Reference: http://git.swzry.com/zry/YAGTF
+    # Expanded Tags: <level>, <unit>, <msg>
+    # Example: "![<y>-<mon>-<d> <h24>:<min>:<s>.<us> <tz> <tzA>] <lt><level><gt> {<unit>} <msg><br>"
+    log_format: "![<y>-<mon>-<d> <h24>:<min>:<s>.<us> <tz> <tzA>] <lt><level><gt> {<unit>} <msg><br>"
+    # 'true' for use UTC time in log, 'false' for use local timezone.
+    use_utc: false
+  # detail config for access log
+  access_log_config:
+    # the log emitting level, the message which level below this will be emitted
+    # optional value: 'DEBUG', 'INFO', 'WARN', 'ERROR', 'PANIC', 'FATAL'
+    # all level option below should be one of these values
+    output_level: "INFO"
+    # level for HTTP 200
+    success_level: "INFO"
+    # level for HTTP 404
+    not_found_level: "WARN"
+    # level for HTTP 403
+    forbidden_level: "WARN"
+    # level for HTTP 502/503
+    gateway_error_level: "ERROR"
+    # level for HTTP 500
+    internal_error_level: "ERROR"
+    # level for Other HTTP Status Code
+    other_status_level: "INFO"
+    # format string for log. this formation using YAGTF.
+    # Reference: http://git.swzry.com/zry/YAGTF
+    # Expanded Tags: <level>, <url>, <status>
+    # Example: "!{<q>time<q>: <q><y>-<mon>-<d> <h24>:<min>:<s>.<us> <tz> <tzA><q>, <q>level<q>: <q><level><q>, <q>method<q>: <q><method><q>, <q>status<q>: <status>, <q>client_ip<q>: <q><cip><q>, <q>url<q>: <q><url><q>}<br>"
+    # Output example for this example: {"time": "2019-09-19 11:45:14.191981000 +0800 CST", "level": "INFO", "method": "GET", "status": 200, "client_ip": "127.0.0.1", "url": "/"}
+    log_format: "!{<q>time<q>: <q><y>-<mon>-<d> <h24>:<min>:<s>.<us> <tz> <tzA><q>, <q>level<q>: <q><level><q>, <q>method<q>: <q><method><q>, <q>status<q>: <status>, <q>client_ip<q>: <q><cip><q>, <q>url<q>: <q><url><q>}<br>"
+    # 'true' for use UTC time in log, 'false' for use local timezone.
+    use_utc: false
+
+

Some files were not shown because too many files changed in this diff