├── docker ├── .gitignore ├── build.sh └── run.sh ├── web ├── public │ ├── js │ │ ├── conds │ │ │ └── ext.json │ │ ├── langs │ │ │ ├── zh-cn.css │ │ │ ├── en-us.css.map │ │ │ ├── zh-cn.js │ │ │ ├── base.js │ │ │ ├── en-us.js │ │ │ ├── en-us.less │ │ │ └── en-us.css │ │ ├── components │ │ │ ├── .gitignore │ │ │ ├── common │ │ │ │ ├── raquo.js │ │ │ │ ├── mask-warning.js │ │ │ │ ├── dot.js │ │ │ │ ├── submit-btn.js │ │ │ │ ├── message-loading.js │ │ │ │ ├── warning-message.js │ │ │ │ ├── second-menu.js │ │ │ │ ├── inner-menu.js │ │ │ │ ├── first-menu.js │ │ │ │ ├── labeled-input.js │ │ │ │ ├── not-found-box.js │ │ │ │ ├── page-box.js │ │ │ │ ├── network-addresses-view.js │ │ │ │ ├── bits-var.js │ │ │ │ ├── bytes-var.js │ │ │ │ ├── size-capacity-view.js │ │ │ │ └── more-options-angle.js │ │ │ ├── api-node │ │ │ │ └── api-node-selector.js │ │ │ ├── ns │ │ │ │ └── ns-user-selector.js │ │ │ ├── plans │ │ │ │ └── plan-user-selector.js │ │ │ ├── finance │ │ │ │ └── finance-user-selector.js │ │ │ └── server │ │ │ │ └── http-firewall-page-options-viewer.js │ │ └── pikaday.triangle.css │ ├── robots.txt │ ├── audios │ │ └── alert.ogg │ ├── images │ │ └── qq-group-qrcode.png │ ├── css │ │ ├── fonts │ │ │ ├── S6uyw4BMUTPHjx4wXiWtFCc.woff2 │ │ │ ├── S6u8w4BMUTPHjxsAXC-qNiXg7Q.woff2 │ │ │ ├── S6u9w4BMUTPHh6UVSwiPGQ3q5d0.woff2 │ │ │ ├── S6uyw4BMUTPHjxAwXiWtFCfQ7A.woff2 │ │ │ ├── S6u8w4BMUTPHjxsAUi-qNiXg7eU0.woff2 │ │ │ ├── S6u9w4BMUTPHh6UVSwaPGQ3q5d0N7w.woff2 │ │ │ ├── S6u_w4BMUTPHjxsI5wq_FQftx9897sxZ.woff2 │ │ │ └── S6u_w4BMUTPHjxsI5wq_Gwftx9897g.woff2 │ │ ├── themes │ │ │ ├── basic │ │ │ │ └── assets │ │ │ │ │ └── fonts │ │ │ │ │ ├── icons.eot │ │ │ │ │ ├── icons.ttf │ │ │ │ │ └── icons.woff │ │ │ ├── default │ │ │ │ └── assets │ │ │ │ │ ├── fonts │ │ │ │ │ ├── icons.eot │ │ │ │ │ ├── icons.otf │ │ │ │ │ ├── icons.ttf │ │ │ │ │ ├── icons.woff │ │ │ │ │ ├── icons.woff2 │ │ │ │ │ ├── brand-icons.eot │ │ │ │ │ ├── brand-icons.ttf │ │ │ │ │ ├── brand-icons.woff │ │ │ │ │ ├── brand-icons.woff2 │ │ │ │ │ ├── outline-icons.eot │ │ │ │ │ ├── outline-icons.ttf │ │ │ │ │ ├── outline-icons.woff │ │ │ │ │ └── outline-icons.woff2 │ │ │ │ │ └── images │ │ │ │ │ └── flags.png │ │ │ ├── github │ │ │ │ └── assets │ │ │ │ │ └── fonts │ │ │ │ │ ├── octicons.ttf │ │ │ │ │ ├── octicons.woff │ │ │ │ │ └── octicons-local.ttf │ │ │ └── material │ │ │ │ └── assets │ │ │ │ └── fonts │ │ │ │ ├── icons.eot │ │ │ │ ├── icons.ttf │ │ │ │ ├── icons.woff │ │ │ │ └── icons.woff2 │ │ └── sortable.css │ └── codemirror │ │ ├── addon │ │ ├── display │ │ │ └── fullscreen.css │ │ └── search │ │ │ └── matchesonscrollbar.css │ │ └── mode │ │ └── d │ │ └── test.js └── views │ └── @default │ ├── @blank.html │ ├── servers │ ├── server │ │ ├── index.css │ │ ├── index.less │ │ ├── index.css.map │ │ ├── settings │ │ │ ├── locations │ │ │ │ ├── index.css │ │ │ │ ├── index.less │ │ │ │ ├── index.css.map │ │ │ │ ├── cache │ │ │ │ │ └── index.js │ │ │ │ ├── http │ │ │ │ │ └── index.js │ │ │ │ ├── pages │ │ │ │ │ └── index.js │ │ │ │ ├── stat │ │ │ │ │ └── index.js │ │ │ │ ├── waf │ │ │ │ │ └── index.js │ │ │ │ ├── web │ │ │ │ │ └── index.js │ │ │ │ ├── webp │ │ │ │ │ └── index.js │ │ │ │ ├── accessLog │ │ │ │ │ └── index.js │ │ │ │ ├── charset │ │ │ │ │ └── index.js │ │ │ │ ├── compression │ │ │ │ │ ├── index.js │ │ │ │ │ └── gzip │ │ │ │ │ │ └── index.js │ │ │ │ ├── fastcgi │ │ │ │ │ └── index.js │ │ │ │ ├── headers │ │ │ │ │ └── index.js │ │ │ │ ├── referers │ │ │ │ │ └── index.js │ │ │ │ ├── remoteAddr │ │ │ │ │ └── index.js │ │ │ │ ├── userAgent │ │ │ │ │ └── index.js │ │ │ │ ├── websocket │ │ │ │ │ └── index.js │ │ │ │ ├── requestLimit │ │ │ │ │ └── index.js │ │ │ │ ├── reverseProxy │ │ │ │ │ ├── setting.js │ │ │ │ │ ├── scheduling.html │ │ │ │ │ └── index.js │ │ │ │ ├── @menu.html │ │ │ │ ├── access │ │ │ │ │ └── index.js │ │ │ │ ├── rewrite │ │ │ │ │ ├── index.js │ │ │ │ │ └── index.html │ │ │ │ ├── location │ │ │ │ │ └── index.js │ │ │ │ └── create.js │ │ │ ├── cache │ │ │ │ ├── index.js │ │ │ │ ├── createPopup.js │ │ │ │ └── @menu.html │ │ │ ├── common │ │ │ │ └── index.js │ │ │ ├── http │ │ │ │ └── index.js │ │ │ ├── https │ │ │ │ └── index.js │ │ │ ├── pages │ │ │ │ └── index.js │ │ │ ├── stat │ │ │ │ └── index.js │ │ │ ├── tcp │ │ │ │ └── index.js │ │ │ ├── tls │ │ │ │ └── index.js │ │ │ ├── udp │ │ │ │ └── index.js │ │ │ ├── waf │ │ │ │ ├── index.js │ │ │ │ └── ipadmin │ │ │ │ │ ├── selectProvincesPopup.css.map │ │ │ │ │ ├── selectProvincesPopup.less │ │ │ │ │ ├── countries.js │ │ │ │ │ ├── provinces.js │ │ │ │ │ ├── selectProvincesPopup.css │ │ │ │ │ └── selectCountriesPopup.css.map │ │ │ ├── web │ │ │ │ ├── index.js │ │ │ │ └── createIndex.html │ │ │ ├── webp │ │ │ │ └── index.js │ │ │ ├── accessLog │ │ │ │ └── index.js │ │ │ ├── charset │ │ │ │ └── index.js │ │ │ ├── compression │ │ │ │ ├── index.js │ │ │ │ └── gzip │ │ │ │ │ └── index.js │ │ │ ├── fastcgi │ │ │ │ ├── index.js │ │ │ │ └── index.html │ │ │ ├── referers │ │ │ │ └── index.js │ │ │ ├── remoteAddr │ │ │ │ └── index.js │ │ │ ├── traffic │ │ │ │ └── index.js │ │ │ ├── userAgent │ │ │ │ ├── index.js │ │ │ │ └── index.html │ │ │ ├── websocket │ │ │ │ └── index.js │ │ │ ├── requestLimit │ │ │ │ └── index.js │ │ │ ├── reverseProxy │ │ │ │ ├── setting.js │ │ │ │ ├── scheduling.html │ │ │ │ └── @menu.html │ │ │ ├── headers │ │ │ │ ├── createDeletePopup.js │ │ │ │ ├── createNonStandardPopup.js │ │ │ │ ├── createSetPopup.js │ │ │ │ ├── updateCORSPopup.html │ │ │ │ └── updateSetPopup.js │ │ │ ├── unix │ │ │ │ └── index.html │ │ │ ├── access │ │ │ │ ├── index.js │ │ │ │ └── index.html │ │ │ ├── redirects │ │ │ │ ├── index.js │ │ │ │ └── index.html │ │ │ └── rewrite │ │ │ │ ├── index.js │ │ │ │ ├── updatePopup.js │ │ │ │ ├── index.html │ │ │ │ └── createPopup.js │ │ ├── index.html │ │ ├── stat │ │ │ ├── clients.less │ │ │ ├── index.less │ │ │ ├── regions.less │ │ │ ├── dailyRequests.less │ │ │ ├── providers.less │ │ │ ├── hourlyRequests.less │ │ │ ├── index.css │ │ │ ├── index.css.map │ │ │ ├── clients.css │ │ │ ├── clients.css.map │ │ │ ├── regions.css │ │ │ ├── regions.css.map │ │ │ ├── providers.css │ │ │ ├── providers.css.map │ │ │ ├── dailyRequests.css │ │ │ ├── hourlyRequests.css │ │ │ ├── dailyRequests.css.map │ │ │ ├── hourlyRequests.css.map │ │ │ ├── waf.css.map │ │ │ ├── @requests_menu.html │ │ │ ├── index.html │ │ │ ├── dailyRequests.html │ │ │ ├── hourlyRequests.html │ │ │ └── @stat_menu.html │ │ ├── delete │ │ │ ├── index.less │ │ │ ├── index.css.map │ │ │ ├── index.css │ │ │ └── index.js │ │ └── log │ │ │ ├── viewPopup.less │ │ │ ├── viewPopup.css.map │ │ │ └── viewPopup.css │ ├── certs │ │ ├── acme │ │ │ ├── accounts │ │ │ │ ├── updatePopup.js │ │ │ │ └── createPopup.js │ │ │ ├── create.css.map │ │ │ ├── create.less │ │ │ ├── create.css │ │ │ └── @menu.html │ │ ├── certPopup.css.map │ │ ├── certPopup.js │ │ ├── certPopup.less │ │ ├── uploadPopup.js │ │ ├── updatePopup.js │ │ └── certPopup.css │ ├── groups │ │ ├── group │ │ │ ├── index.js │ │ │ ├── settings │ │ │ │ ├── cache │ │ │ │ │ ├── index.js │ │ │ │ │ ├── createPopup.js │ │ │ │ │ └── @menu.html │ │ │ │ ├── pages │ │ │ │ │ └── index.js │ │ │ │ ├── stat │ │ │ │ │ ├── index.js │ │ │ │ │ └── index.html │ │ │ │ ├── waf │ │ │ │ │ ├── index.js │ │ │ │ │ └── ipadmin │ │ │ │ │ │ ├── provinces.css.map │ │ │ │ │ │ ├── provinces.less │ │ │ │ │ │ ├── provinces.css │ │ │ │ │ │ ├── countries.css.map │ │ │ │ │ │ ├── countries.js │ │ │ │ │ │ ├── provinces.js │ │ │ │ │ │ ├── countries.less │ │ │ │ │ │ └── countries.css │ │ │ │ ├── web │ │ │ │ │ ├── index.js │ │ │ │ │ └── index.html │ │ │ │ ├── webp │ │ │ │ │ └── index.js │ │ │ │ ├── accessLog │ │ │ │ │ └── index.js │ │ │ │ ├── charset │ │ │ │ │ └── index.js │ │ │ │ ├── headers │ │ │ │ │ └── index.js │ │ │ │ ├── remoteAddr │ │ │ │ │ └── index.js │ │ │ │ ├── websocket │ │ │ │ │ └── index.js │ │ │ │ ├── compression │ │ │ │ │ ├── index.js │ │ │ │ │ └── gzip │ │ │ │ │ │ └── index.js │ │ │ │ ├── requestLimit │ │ │ │ │ └── index.js │ │ │ │ ├── httpReverseProxy │ │ │ │ │ ├── setting.js │ │ │ │ │ ├── @menu.html │ │ │ │ │ └── scheduling.html │ │ │ │ ├── tcpReverseProxy │ │ │ │ │ ├── setting.js │ │ │ │ │ ├── @menu.html │ │ │ │ │ └── scheduling.html │ │ │ │ └── udpReverseProxy │ │ │ │ │ ├── setting.js │ │ │ │ │ ├── @menu.html │ │ │ │ │ └── scheduling.html │ │ │ ├── update.js │ │ │ └── update.html │ │ ├── selectPopup.js │ │ └── createPopup.html │ ├── iplists │ │ ├── createPopup.less │ │ ├── update.js │ │ ├── createPopup.css │ │ ├── createPopup.css.map │ │ ├── createIPPopup.js │ │ ├── selectPopup.js │ │ └── import.js │ ├── metrics │ │ ├── charts │ │ │ ├── chart.less │ │ │ ├── chart.css │ │ │ ├── chart.css.map │ │ │ ├── createPopup.js │ │ │ ├── @chart_menu.html │ │ │ └── update.js │ │ └── update.js │ ├── components │ │ ├── waf │ │ │ ├── import.js │ │ │ ├── test.html │ │ │ ├── export.less │ │ │ ├── export.css.map │ │ │ ├── export.css │ │ │ ├── ipadmin │ │ │ │ ├── provinces.css.map │ │ │ │ ├── provinces.less │ │ │ │ ├── index.css.map │ │ │ │ ├── provinces.css │ │ │ │ ├── index.js │ │ │ │ ├── provinces.js │ │ │ │ ├── index.less │ │ │ │ └── index.css │ │ │ ├── export.js │ │ │ ├── selectPopup.js │ │ │ └── policy.js │ │ ├── cache │ │ │ ├── createPopup.js │ │ │ ├── batch │ │ │ │ ├── index.css.map │ │ │ │ ├── index.less │ │ │ │ ├── index.css │ │ │ │ ├── tasks.js │ │ │ │ └── @menu.html │ │ │ └── selectPopup.js │ │ └── log │ │ │ └── index.html │ ├── logs │ │ └── settings.js │ ├── ipbox │ │ ├── index.css.map │ │ ├── index.less │ │ └── index.css │ ├── create.css.map │ ├── @menu.html │ ├── serverNamesPopup.js │ ├── serverNamesPopup.html │ └── index.css.map │ ├── @menu.html │ ├── users │ ├── user │ │ └── .gitignore │ ├── verifyPopup.js │ ├── features.js │ ├── features.css.map │ ├── features.less │ ├── features.css │ ├── update.js │ └── user.js │ ├── recover │ └── index.less │ ├── clusters │ ├── create.less │ ├── cluster │ │ ├── node │ │ │ ├── logs.less │ │ │ ├── detail.less │ │ │ ├── settings │ │ │ │ ├── dns │ │ │ │ │ └── index.js │ │ │ │ ├── cache │ │ │ │ │ └── index.js │ │ │ │ ├── system │ │ │ │ │ └── index.js │ │ │ │ └── ddos-protection │ │ │ │ │ └── index.js │ │ │ ├── install.less │ │ │ ├── logs.css │ │ │ ├── detail.css │ │ │ ├── detail.css.map │ │ │ ├── logs.css.map │ │ │ ├── install.css.map │ │ │ ├── install.css │ │ │ ├── logs.js │ │ │ └── updateDNSPopup.js │ │ ├── createBatch.less │ │ ├── installManual.less │ │ ├── installNodes.less │ │ ├── settings │ │ │ ├── waf │ │ │ │ └── index.js │ │ │ ├── webp │ │ │ │ └── index.js │ │ │ ├── cache │ │ │ │ └── index.js │ │ │ ├── services │ │ │ │ ├── index.js │ │ │ │ └── @menu.html │ │ │ ├── message │ │ │ │ └── index.js │ │ │ ├── ddos-protection │ │ │ │ ├── index.js │ │ │ │ └── status.js │ │ │ ├── firewall-actions │ │ │ │ ├── createPopup.css │ │ │ │ └── createPopup.css.map │ │ │ ├── dns │ │ │ │ └── @menu.html │ │ │ ├── health │ │ │ │ └── index.js │ │ │ └── @menu.html │ │ ├── updateNodeSSH.js │ │ ├── delete.less │ │ ├── createBatch.css │ │ ├── installManual.css │ │ ├── installNodes.css │ │ ├── createBatch.css.map │ │ ├── delete.css.map │ │ ├── installNodes.css.map │ │ ├── installManual.css.map │ │ ├── delete.css │ │ ├── createNode.css.map │ │ ├── groups │ │ │ ├── selectPopup.js │ │ │ ├── createPopup.html │ │ │ └── updatePopup.html │ │ ├── createNode.less │ │ ├── installRemote.css.map │ │ ├── upgradeRemote.css.map │ │ ├── createBatch.js │ │ ├── createNode.css │ │ ├── installRemote.less │ │ ├── upgradeRemote.less │ │ ├── installRemote.css │ │ ├── upgradeRemote.css │ │ ├── nodes.css.map │ │ └── delete.html │ ├── grants │ │ ├── grant.less │ │ ├── grant.css.map │ │ ├── grant.css │ │ ├── updatePopup.js │ │ ├── createPopup.js │ │ ├── create.js │ │ ├── update.js │ │ ├── @menu.html │ │ ├── index.js │ │ ├── selectPopup.css.map │ │ ├── test.js │ │ └── @grant_menu.html │ ├── create.css │ ├── create.css.map │ ├── regions │ │ ├── @menu.html │ │ ├── selectPopup.js │ │ └── nodes.js │ ├── tasks │ │ ├── listPopup.css.map │ │ ├── listPopup.less │ │ └── listPopup.css │ ├── logs │ │ ├── index.css.map │ │ ├── index.less │ │ ├── index.css │ │ └── @menu.html │ ├── selectPopup.js │ ├── nodes.css.map │ ├── createNode.js │ ├── nodes.less │ ├── index.css.map │ ├── nodes.css │ ├── create.js │ ├── index.js │ └── @menu.html │ ├── db │ ├── logs.less │ ├── logs.css │ ├── logs.css.map │ ├── update.js │ ├── logs.js │ ├── node.js │ └── @menu.html │ ├── dns │ ├── index.less │ ├── domains │ │ └── routesPopup.js │ ├── index.css │ ├── index.css.map │ ├── tasks │ │ ├── listPopup.less │ │ ├── listPopup.css.map │ │ └── listPopup.css │ ├── index.js │ ├── issues │ │ └── updateNodePopup.js │ └── providers │ │ ├── createPopup.js │ │ └── updatePopup.js │ ├── settings │ ├── index.html │ ├── api │ │ └── node │ │ │ ├── logs.less │ │ │ ├── logs.css │ │ │ ├── logs.css.map │ │ │ ├── logs.js │ │ │ └── updateAddrPopup.js │ ├── backup │ │ └── index.html │ ├── upgrade │ │ └── index.html │ ├── updates │ │ ├── index.less │ │ ├── index.css │ │ └── index.css.map │ ├── login │ │ └── index.js │ ├── profile │ │ ├── index.js │ │ └── index.html │ ├── database │ │ ├── cleanSetting.js │ │ └── update.js │ ├── transfer │ │ ├── index.css.map │ │ ├── index.css │ │ └── index.less │ ├── server │ │ ├── updateHTTPPopup.js │ │ ├── updateHTTPSPopup.js │ │ └── index.js │ └── security │ │ └── index.js │ ├── admins │ ├── createPopup.js │ ├── @menu.html │ ├── update.js │ ├── admin.css.map │ ├── admin.less │ ├── update.css.map │ ├── update.less │ ├── createPopup.less │ ├── createPopup.css.map │ ├── admin.css │ ├── update.css │ ├── createPopup.css │ └── @admin_menu.html │ ├── log │ ├── settings.js │ ├── index.less │ ├── clean.js │ ├── index.css.map │ ├── index.css │ └── @menu.html │ ├── @echarts.html │ ├── index │ ├── initPassword.js │ ├── index.css.map │ ├── initPassword.css.map │ └── otp.css.map │ ├── dashboard │ ├── index.css.map │ ├── index.css │ └── index.less │ ├── ui │ ├── selectProvincesPopup.css.map │ ├── selectProvincesPopup.less │ ├── selectProvincesPopup.css │ ├── selectCountriesPopup.css.map │ ├── selectCountriesPopup.less │ └── selectCountriesPopup.css │ ├── setup │ ├── mysql │ │ └── installPopup.css.map │ └── confirm │ │ └── index.js │ ├── @datepicker.html │ └── login │ └── validate.html ├── dist └── .gitignore ├── internal ├── web │ ├── actions │ │ ├── default │ │ │ ├── users │ │ │ │ └── user │ │ │ │ │ └── .gitignore │ │ │ ├── servers │ │ │ │ ├── server │ │ │ │ │ └── settings │ │ │ │ │ │ ├── conds │ │ │ │ │ │ └── condutils │ │ │ │ │ │ │ └── utils_test.go │ │ │ │ │ │ ├── https │ │ │ │ │ │ └── index_ext.go │ │ │ │ │ │ ├── serverNames │ │ │ │ │ │ └── index_ext.go │ │ │ │ │ │ └── index_ext.go │ │ │ │ ├── certs │ │ │ │ │ ├── delete_ext.go │ │ │ │ │ ├── uploadBatchPopup_ext.go │ │ │ │ │ └── acme │ │ │ │ │ │ └── users │ │ │ │ │ │ └── selectPopup.go │ │ │ │ ├── helper.go │ │ │ │ ├── update.go │ │ │ │ ├── components │ │ │ │ │ ├── waf │ │ │ │ │ │ └── test.go │ │ │ │ │ └── log │ │ │ │ │ │ ├── index.go │ │ │ │ │ │ └── helper.go │ │ │ │ └── iplists │ │ │ │ │ └── iplistutils │ │ │ │ │ └── utils.go │ │ │ ├── clusters │ │ │ │ └── cluster │ │ │ │ │ ├── node │ │ │ │ │ ├── update_hook.go │ │ │ │ │ └── nodeutils │ │ │ │ │ │ ├── utils_ext.go │ │ │ │ │ │ └── utils_test.go │ │ │ │ │ ├── createBatch_ext.go │ │ │ │ │ ├── createNode_ext.go │ │ │ │ │ └── settings │ │ │ │ │ └── dns │ │ │ │ │ └── randomName.go │ │ │ ├── dashboard │ │ │ │ └── index_ext.go │ │ │ ├── about │ │ │ │ ├── init.go │ │ │ │ └── qq.go │ │ │ ├── nodes │ │ │ │ └── helper.go │ │ │ ├── csrf │ │ │ │ └── init.go │ │ │ ├── logout │ │ │ │ ├── init.go │ │ │ │ └── index.go │ │ │ ├── messages │ │ │ │ └── helper.go │ │ │ ├── login │ │ │ │ └── init.go │ │ │ ├── settings │ │ │ │ ├── api │ │ │ │ │ ├── helper.go │ │ │ │ │ └── node │ │ │ │ │ │ └── helper.go │ │ │ │ ├── helper.go │ │ │ │ ├── backup │ │ │ │ │ └── index.go │ │ │ │ ├── upgrade │ │ │ │ │ └── index.go │ │ │ │ ├── index.go │ │ │ │ ├── advanced.go │ │ │ │ ├── transfer │ │ │ │ │ └── index.go │ │ │ │ ├── ui │ │ │ │ │ └── index_ext.go │ │ │ │ └── lang │ │ │ │ │ └── init.go │ │ │ ├── setup │ │ │ │ ├── confirm │ │ │ │ │ ├── init.go │ │ │ │ │ └── helper.go │ │ │ │ ├── helper.go │ │ │ │ └── status.go │ │ │ ├── dns │ │ │ │ ├── helper.go │ │ │ │ └── providers │ │ │ │ │ └── provider_ext.go │ │ │ ├── log │ │ │ │ └── helper.go │ │ │ ├── index │ │ │ │ └── init.go │ │ │ ├── files │ │ │ │ └── init.go │ │ │ ├── recover │ │ │ │ ├── init.go │ │ │ │ ├── helper.go │ │ │ │ └── index.go │ │ │ └── ui │ │ │ │ └── eventLevelOptions.go │ │ └── actionutils │ │ │ ├── action_interface.go │ │ │ └── menu_item.go │ └── helpers │ │ ├── utils_none_gcc.go │ │ └── utils_gcc.go ├── configs │ ├── secret.go │ └── nodes │ │ └── node_config.go ├── waf │ └── injectionutils │ │ ├── libinjection │ │ ├── README.md │ │ └── src │ │ │ └── libinjection_xss.h │ │ ├── libinjection_sqli.c │ │ └── libinjection_xss.c ├── configloaders │ ├── locker.go │ └── admin_module_test.go ├── apps │ └── directive.go ├── ttlcache │ ├── item.go │ ├── utils.go │ ├── utils_test.go │ └── option.go ├── const │ ├── plus.go │ ├── build.go │ └── const.go ├── utils │ ├── errors.go │ ├── recover.go │ ├── sizes │ │ ├── sizes.go │ │ └── sizes_test.go │ ├── exec │ │ └── look_others.go │ ├── dateutils │ │ └── utils.go │ ├── service_test.go │ ├── service_others.go │ ├── email.go │ ├── lookup_test.go │ └── taskutils │ │ └── concurrent_test.go ├── oplogs │ └── levels.go ├── encrypt │ ├── method_utils_test.go │ ├── method.go │ └── magic_key_test.go ├── tasks │ ├── task_sync_cluster_test.go │ └── task_sync_api_nodes_test.go ├── events │ ├── events.go │ └── utils_test.go ├── goman │ └── instance.go ├── gen │ └── generate_test.go ├── errors │ └── error_test.go └── setup │ └── utils.go ├── doc ├── screenshot.png └── architect-zh.png └── .gitignore /docker/.gitignore: -------------------------------------------------------------------------------- 1 | *.zip -------------------------------------------------------------------------------- /web/public/js/conds/ext.json: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /web/public/js/langs/zh-cn.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dist/.gitignore: -------------------------------------------------------------------------------- 1 | *.zip 2 | edge-admin -------------------------------------------------------------------------------- /web/views/@default/@blank.html: -------------------------------------------------------------------------------- 1 | {$layout} -------------------------------------------------------------------------------- /web/views/@default/servers/server/index.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /web/public/js/components/.gitignore: -------------------------------------------------------------------------------- 1 | *-plus.js -------------------------------------------------------------------------------- /web/views/@default/@menu.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /web/views/@default/servers/server/index.less: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /web/views/@default/users/user/.gitignore: -------------------------------------------------------------------------------- 1 | servers.* -------------------------------------------------------------------------------- /web/views/@default/servers/server/index.css.map: -------------------------------------------------------------------------------- 1 | undefined -------------------------------------------------------------------------------- /internal/web/actions/default/users/user/.gitignore: -------------------------------------------------------------------------------- 1 | servers.go -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/locations/index.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/locations/index.less: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /web/views/@default/recover/index.less: -------------------------------------------------------------------------------- 1 | @import "@install"; 2 | 3 | -------------------------------------------------------------------------------- /internal/configs/secret.go: -------------------------------------------------------------------------------- 1 | package configs 2 | 3 | var Secret = "" 4 | -------------------------------------------------------------------------------- /web/views/@default/clusters/create.less: -------------------------------------------------------------------------------- 1 | h4 span { 2 | font-size: 0.8em; 3 | } -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/locations/index.css.map: -------------------------------------------------------------------------------- 1 | undefined -------------------------------------------------------------------------------- /web/views/@default/db/logs.less: -------------------------------------------------------------------------------- 1 | pre.log-box { 2 | margin: 0; 3 | padding: 0; 4 | } -------------------------------------------------------------------------------- /web/public/robots.txt: -------------------------------------------------------------------------------- 1 | # 2 | # robots.txt 3 | # 4 | 5 | User-agent: * 6 | Disallow: / -------------------------------------------------------------------------------- /web/views/@default/dns/index.less: -------------------------------------------------------------------------------- 1 | .italic { 2 | font-style: italic !important; 3 | } -------------------------------------------------------------------------------- /doc/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoEdgeLab/EdgeAdmin/HEAD/doc/screenshot.png -------------------------------------------------------------------------------- /web/views/@default/settings/index.html: -------------------------------------------------------------------------------- 1 | {$layout} 2 | 3 |

此功能暂未开放,敬请期待。

-------------------------------------------------------------------------------- /doc/architect-zh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoEdgeLab/EdgeAdmin/HEAD/doc/architect-zh.png -------------------------------------------------------------------------------- /web/views/@default/admins/createPopup.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.isSuper = false 3 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/certs/acme/accounts/updatePopup.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | 3 | }) -------------------------------------------------------------------------------- /web/views/@default/settings/api/node/logs.less: -------------------------------------------------------------------------------- 1 | pre.log-box { 2 | margin: 0; 3 | padding: 0; 4 | } -------------------------------------------------------------------------------- /web/views/@default/users/verifyPopup.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.result = "pass" 3 | }) -------------------------------------------------------------------------------- /web/views/@default/clusters/cluster/node/logs.less: -------------------------------------------------------------------------------- 1 | pre.log-box { 2 | margin: 0; 3 | padding: 0; 4 | } -------------------------------------------------------------------------------- /web/views/@default/settings/backup/index.html: -------------------------------------------------------------------------------- 1 | {$layout} 2 | 3 |

此功能暂未开放,敬请期待。

-------------------------------------------------------------------------------- /web/views/@default/settings/upgrade/index.html: -------------------------------------------------------------------------------- 1 | {$layout} 2 | 3 |

此功能暂未开放,敬请期待。

-------------------------------------------------------------------------------- /internal/waf/injectionutils/libinjection/README.md: -------------------------------------------------------------------------------- 1 | copy from https://github.com/libinjection/libinjection -------------------------------------------------------------------------------- /web/views/@default/dns/domains/routesPopup.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.close = NotifyPopup 3 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/groups/group/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.checkDNS = false 3 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/iplists/createPopup.less: -------------------------------------------------------------------------------- 1 | h3 { 2 | var { 3 | font-style: normal; 4 | } 5 | } -------------------------------------------------------------------------------- /internal/configloaders/locker.go: -------------------------------------------------------------------------------- 1 | package configloaders 2 | 3 | import "sync" 4 | 5 | var locker sync.Mutex 6 | -------------------------------------------------------------------------------- /web/public/audios/alert.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoEdgeLab/EdgeAdmin/HEAD/web/public/audios/alert.ogg -------------------------------------------------------------------------------- /web/views/@default/clusters/cluster/node/detail.less: -------------------------------------------------------------------------------- 1 | a.underline { 2 | border-bottom: 1px #db2828 dashed; 3 | } -------------------------------------------------------------------------------- /web/views/@default/clusters/grants/grant.less: -------------------------------------------------------------------------------- 1 | .CodeMirror-wrap pre { 2 | word-break: break-all !important; 3 | } -------------------------------------------------------------------------------- /web/views/@default/settings/updates/index.less: -------------------------------------------------------------------------------- 1 | .version-box { 2 | line-height: 1.8; 3 | color: #21ba45; 4 | } -------------------------------------------------------------------------------- /web/views/@default/log/settings.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/users/features.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/clusters/create.css: -------------------------------------------------------------------------------- 1 | h4 span { 2 | font-size: 0.8em; 3 | } 4 | /*# sourceMappingURL=create.css.map */ -------------------------------------------------------------------------------- /web/views/@default/settings/login/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *_plus.go 2 | *-plus.sh 3 | *_plus.html 4 | *_plus.js 5 | *@plus.js 6 | *_plus.less 7 | *_plus.css 8 | *_plus.css.map -------------------------------------------------------------------------------- /internal/apps/directive.go: -------------------------------------------------------------------------------- 1 | package apps 2 | 3 | type Directive struct { 4 | Arg string 5 | Callback func() 6 | } 7 | -------------------------------------------------------------------------------- /internal/ttlcache/item.go: -------------------------------------------------------------------------------- 1 | package ttlcache 2 | 3 | type Item struct { 4 | Value interface{} 5 | expiredAt int64 6 | } 7 | -------------------------------------------------------------------------------- /web/views/@default/db/logs.css: -------------------------------------------------------------------------------- 1 | pre.log-box { 2 | margin: 0; 3 | padding: 0; 4 | } 5 | /*# sourceMappingURL=logs.css.map */ -------------------------------------------------------------------------------- /web/views/@default/dns/index.css: -------------------------------------------------------------------------------- 1 | .italic { 2 | font-style: italic !important; 3 | } 4 | /*# sourceMappingURL=index.css.map */ -------------------------------------------------------------------------------- /web/views/@default/servers/iplists/update.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/metrics/charts/chart.less: -------------------------------------------------------------------------------- 1 | h4 { 2 | span { 3 | font-size: 0.8em; 4 | color: grey; 5 | } 6 | } -------------------------------------------------------------------------------- /web/views/@default/servers/server/index.html: -------------------------------------------------------------------------------- 1 | {$layout} 2 | {$template "/left_menu"} 3 | 4 |
5 |
-------------------------------------------------------------------------------- /web/views/@default/settings/profile/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /docker/build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | VERSION=latest 4 | 5 | docker build --no-cache -t goedge/edge-admin:${VERSION} . 6 | -------------------------------------------------------------------------------- /web/public/images/qq-group-qrcode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoEdgeLab/EdgeAdmin/HEAD/web/public/images/qq-group-qrcode.png -------------------------------------------------------------------------------- /web/views/@default/admins/@menu.html: -------------------------------------------------------------------------------- 1 | 2 | [创建管理员] 3 | -------------------------------------------------------------------------------- /web/views/@default/clusters/cluster/createBatch.less: -------------------------------------------------------------------------------- 1 | .left-box { 2 | top: 10em; 3 | } 4 | 5 | .right-box { 6 | top: 10em; 7 | } -------------------------------------------------------------------------------- /web/views/@default/clusters/cluster/installManual.less: -------------------------------------------------------------------------------- 1 | .left-box { 2 | top: 10em; 3 | } 4 | 5 | .right-box { 6 | top: 10em; 7 | } -------------------------------------------------------------------------------- /web/views/@default/clusters/cluster/installNodes.less: -------------------------------------------------------------------------------- 1 | .left-box { 2 | top: 10em; 3 | } 4 | 5 | .right-box { 6 | top: 10em; 7 | } -------------------------------------------------------------------------------- /web/views/@default/dns/index.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["index.less"],"names":[],"mappings":"AAAA;EACC,6BAAA","file":"index.css"} -------------------------------------------------------------------------------- /web/views/@default/servers/components/waf/import.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("导入成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/clusters/cluster/settings/waf/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/clusters/cluster/settings/webp/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/iplists/createPopup.css: -------------------------------------------------------------------------------- 1 | h3 var { 2 | font-style: normal; 3 | } 4 | /*# sourceMappingURL=createPopup.css.map */ -------------------------------------------------------------------------------- /web/views/@default/servers/logs/settings.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功,将会在一分钟之内生效") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/cache/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/common/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/http/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/https/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/pages/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/stat/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/tcp/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/tls/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/udp/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/waf/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/web/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/webp/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/settings/database/cleanSetting.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /internal/waf/injectionutils/libinjection_sqli.c: -------------------------------------------------------------------------------- 1 | #define LIBINJECTION_VERSION "3.9.1" 2 | 3 | #include "libinjection/src/libinjection_sqli.c" -------------------------------------------------------------------------------- /web/views/@default/clusters/cluster/node/settings/dns/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/clusters/cluster/settings/cache/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/clusters/cluster/settings/services/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/db/logs.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["logs.less"],"names":[],"mappings":"AAAA,GAAG;EACF,SAAA;EACA,UAAA","file":"logs.css"} -------------------------------------------------------------------------------- /web/views/@default/db/update.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifySuccess("保存成功", "/db/node?nodeId=" + this.node.id) 3 | }) -------------------------------------------------------------------------------- /web/views/@default/dns/tasks/listPopup.less: -------------------------------------------------------------------------------- 1 | h3 span { 2 | margin-left: 0.5em; 3 | color: grey; 4 | font-size: 0.6em !important; 5 | } 6 | -------------------------------------------------------------------------------- /web/views/@default/servers/components/waf/test.html: -------------------------------------------------------------------------------- 1 | {$layout} 2 | 3 | {$template "waf_menu"} 4 | 5 |

此功能暂未开放,敬请期待。

-------------------------------------------------------------------------------- /web/views/@default/servers/groups/group/settings/cache/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/groups/group/settings/pages/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/groups/group/settings/stat/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/groups/group/settings/waf/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/groups/group/settings/web/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/groups/group/settings/webp/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/accessLog/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/charset/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/compression/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/fastcgi/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/referers/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/remoteAddr/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/traffic/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/userAgent/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/websocket/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/server/stat/clients.less: -------------------------------------------------------------------------------- 1 | .chart-box { 2 | height: 20em; 3 | } 4 | 5 | h4 span.small { 6 | font-size: 0.8em; 7 | } -------------------------------------------------------------------------------- /web/views/@default/servers/server/stat/index.less: -------------------------------------------------------------------------------- 1 | .chart-box { 2 | height: 14em; 3 | } 4 | 5 | h4 span.small { 6 | font-size: 0.8em; 7 | } -------------------------------------------------------------------------------- /web/views/@default/servers/server/stat/regions.less: -------------------------------------------------------------------------------- 1 | .chart-box { 2 | height: 20em; 3 | } 4 | 5 | h4 span.small { 6 | font-size: 0.8em; 7 | } -------------------------------------------------------------------------------- /web/views/@default/settings/api/node/logs.css: -------------------------------------------------------------------------------- 1 | pre.log-box { 2 | margin: 0; 3 | padding: 0; 4 | } 5 | /*# sourceMappingURL=logs.css.map */ -------------------------------------------------------------------------------- /web/views/@default/settings/database/update.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifySuccess("保存成功", "/settings/database") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/clusters/cluster/node/install.less: -------------------------------------------------------------------------------- 1 | .installing-box { 2 | line-height: 1.8; 3 | 4 | .blue { 5 | color: #2185d0; 6 | } 7 | } -------------------------------------------------------------------------------- /web/views/@default/clusters/cluster/node/logs.css: -------------------------------------------------------------------------------- 1 | pre.log-box { 2 | margin: 0; 3 | padding: 0; 4 | } 5 | /*# sourceMappingURL=logs.css.map */ -------------------------------------------------------------------------------- /web/views/@default/clusters/cluster/node/settings/cache/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/clusters/cluster/node/settings/system/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/clusters/cluster/settings/message/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/clusters/create.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["create.less"],"names":[],"mappings":"AAAA,EAAG;EACF,gBAAA","file":"create.css"} -------------------------------------------------------------------------------- /web/views/@default/log/index.less: -------------------------------------------------------------------------------- 1 | .log-row { 2 | position: relative; 3 | 4 | .buttons { 5 | position: absolute; 6 | right: 1em; 7 | } 8 | } -------------------------------------------------------------------------------- /web/views/@default/servers/groups/group/settings/accessLog/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/groups/group/settings/charset/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/groups/group/settings/headers/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/groups/group/settings/remoteAddr/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/groups/group/settings/websocket/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/compression/gzip/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/locations/cache/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/locations/http/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/locations/pages/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/locations/stat/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/locations/waf/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/locations/web/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/locations/webp/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/requestLimit/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/reverseProxy/setting.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/server/stat/dailyRequests.less: -------------------------------------------------------------------------------- 1 | .chart-box { 2 | height: 21em; 3 | } 4 | 5 | h4 span.small { 6 | font-size: 0.8em; 7 | } -------------------------------------------------------------------------------- /web/views/@default/servers/server/stat/providers.less: -------------------------------------------------------------------------------- 1 | .chart-box { 2 | height: 20em; 3 | } 4 | 5 | h4 span.small { 6 | font-size: 0.8em; 7 | } -------------------------------------------------------------------------------- /web/views/@default/admins/update.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifySuccess("保存成功", "/admins/admin?adminId=" + this.admin.id) 3 | }) -------------------------------------------------------------------------------- /web/views/@default/clusters/cluster/settings/ddos-protection/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/clusters/cluster/updateNodeSSH.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | if (this.params.port <= 0) { 3 | this.params.port = 22 4 | } 5 | }) -------------------------------------------------------------------------------- /web/views/@default/clusters/grants/grant.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["grant.less"],"names":[],"mappings":"AAAA,gBAAiB;EAChB,qBAAA","file":"grant.css"} -------------------------------------------------------------------------------- /web/views/@default/servers/groups/group/settings/compression/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/groups/group/settings/requestLimit/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/metrics/charts/chart.css: -------------------------------------------------------------------------------- 1 | h4 span { 2 | font-size: 0.8em; 3 | color: grey; 4 | } 5 | /*# sourceMappingURL=chart.css.map */ -------------------------------------------------------------------------------- /web/views/@default/servers/server/delete/index.less: -------------------------------------------------------------------------------- 1 | .delete-box { 2 | margin-top: 1em; 3 | 4 | button { 5 | width: 20em!important; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/locations/accessLog/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/locations/charset/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/locations/compression/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/locations/fastcgi/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/locations/headers/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/locations/referers/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/locations/remoteAddr/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/locations/userAgent/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/locations/websocket/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/server/stat/hourlyRequests.less: -------------------------------------------------------------------------------- 1 | .chart-box { 2 | height: 21em; 3 | } 4 | 5 | h4 span.small { 6 | font-size: 0.8em; 7 | } -------------------------------------------------------------------------------- /web/views/@default/settings/updates/index.css: -------------------------------------------------------------------------------- 1 | .version-box { 2 | line-height: 1.8; 3 | color: #21ba45; 4 | } 5 | /*# sourceMappingURL=index.css.map */ -------------------------------------------------------------------------------- /web/public/css/fonts/S6uyw4BMUTPHjx4wXiWtFCc.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoEdgeLab/EdgeAdmin/HEAD/web/public/css/fonts/S6uyw4BMUTPHjx4wXiWtFCc.woff2 -------------------------------------------------------------------------------- /web/public/css/themes/basic/assets/fonts/icons.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoEdgeLab/EdgeAdmin/HEAD/web/public/css/themes/basic/assets/fonts/icons.eot -------------------------------------------------------------------------------- /web/public/css/themes/basic/assets/fonts/icons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoEdgeLab/EdgeAdmin/HEAD/web/public/css/themes/basic/assets/fonts/icons.ttf -------------------------------------------------------------------------------- /web/public/css/themes/basic/assets/fonts/icons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoEdgeLab/EdgeAdmin/HEAD/web/public/css/themes/basic/assets/fonts/icons.woff -------------------------------------------------------------------------------- /web/public/js/components/common/raquo.js: -------------------------------------------------------------------------------- 1 | Vue.component("raquo-item", { 2 | template: `»` 3 | }) -------------------------------------------------------------------------------- /web/views/@default/@echarts.html: -------------------------------------------------------------------------------- 1 | {$var "header"} 2 | 3 | 4 | {$end} -------------------------------------------------------------------------------- /web/views/@default/clusters/cluster/node/detail.css: -------------------------------------------------------------------------------- 1 | a.underline { 2 | border-bottom: 1px #db2828 dashed; 3 | } 4 | /*# sourceMappingURL=detail.css.map */ -------------------------------------------------------------------------------- /web/views/@default/clusters/grants/grant.css: -------------------------------------------------------------------------------- 1 | .CodeMirror-wrap pre { 2 | word-break: break-all !important; 3 | } 4 | /*# sourceMappingURL=grant.css.map */ -------------------------------------------------------------------------------- /web/views/@default/clusters/grants/updatePopup.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.method = this.grant.method; 3 | 4 | this.success = NotifyPopup; 5 | }); -------------------------------------------------------------------------------- /web/views/@default/servers/groups/group/settings/compression/gzip/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/groups/group/settings/httpReverseProxy/setting.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/groups/group/settings/tcpReverseProxy/setting.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/groups/group/settings/udpReverseProxy/setting.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/server/log/viewPopup.less: -------------------------------------------------------------------------------- 1 | table td { 2 | word-break: break-all; 3 | } 4 | 5 | table td.title { 6 | width: 12em !important; 7 | } -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/locations/compression/gzip/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/locations/requestLimit/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/locations/reverseProxy/setting.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | }) -------------------------------------------------------------------------------- /web/views/@default/settings/api/node/logs.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["logs.less"],"names":[],"mappings":"AAAA,GAAG;EACF,SAAA;EACA,UAAA","file":"logs.css"} -------------------------------------------------------------------------------- /web/views/@default/settings/updates/index.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["index.less"],"names":[],"mappings":"AAAA;EACC,gBAAA;EACA,cAAA","file":"index.css"} -------------------------------------------------------------------------------- /web/public/css/fonts/S6u8w4BMUTPHjxsAXC-qNiXg7Q.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoEdgeLab/EdgeAdmin/HEAD/web/public/css/fonts/S6u8w4BMUTPHjxsAXC-qNiXg7Q.woff2 -------------------------------------------------------------------------------- /web/public/css/fonts/S6u9w4BMUTPHh6UVSwiPGQ3q5d0.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoEdgeLab/EdgeAdmin/HEAD/web/public/css/fonts/S6u9w4BMUTPHh6UVSwiPGQ3q5d0.woff2 -------------------------------------------------------------------------------- /web/public/css/fonts/S6uyw4BMUTPHjxAwXiWtFCfQ7A.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoEdgeLab/EdgeAdmin/HEAD/web/public/css/fonts/S6uyw4BMUTPHjxAwXiWtFCfQ7A.woff2 -------------------------------------------------------------------------------- /web/public/css/themes/default/assets/fonts/icons.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoEdgeLab/EdgeAdmin/HEAD/web/public/css/themes/default/assets/fonts/icons.eot -------------------------------------------------------------------------------- /web/public/css/themes/default/assets/fonts/icons.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoEdgeLab/EdgeAdmin/HEAD/web/public/css/themes/default/assets/fonts/icons.otf -------------------------------------------------------------------------------- /web/public/css/themes/default/assets/fonts/icons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoEdgeLab/EdgeAdmin/HEAD/web/public/css/themes/default/assets/fonts/icons.ttf -------------------------------------------------------------------------------- /web/public/css/themes/default/assets/fonts/icons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoEdgeLab/EdgeAdmin/HEAD/web/public/css/themes/default/assets/fonts/icons.woff -------------------------------------------------------------------------------- /web/public/css/themes/default/assets/fonts/icons.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoEdgeLab/EdgeAdmin/HEAD/web/public/css/themes/default/assets/fonts/icons.woff2 -------------------------------------------------------------------------------- /web/public/css/themes/default/assets/images/flags.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoEdgeLab/EdgeAdmin/HEAD/web/public/css/themes/default/assets/images/flags.png -------------------------------------------------------------------------------- /web/public/css/themes/github/assets/fonts/octicons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoEdgeLab/EdgeAdmin/HEAD/web/public/css/themes/github/assets/fonts/octicons.ttf -------------------------------------------------------------------------------- /web/public/css/themes/material/assets/fonts/icons.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoEdgeLab/EdgeAdmin/HEAD/web/public/css/themes/material/assets/fonts/icons.eot -------------------------------------------------------------------------------- /web/public/css/themes/material/assets/fonts/icons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoEdgeLab/EdgeAdmin/HEAD/web/public/css/themes/material/assets/fonts/icons.ttf -------------------------------------------------------------------------------- /web/public/css/themes/material/assets/fonts/icons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoEdgeLab/EdgeAdmin/HEAD/web/public/css/themes/material/assets/fonts/icons.woff -------------------------------------------------------------------------------- /web/views/@default/clusters/cluster/delete.less: -------------------------------------------------------------------------------- 1 | .buttons-box { 2 | text-align: center; 3 | margin-top: 2em; 4 | 5 | button { 6 | width: 20em; 7 | } 8 | } -------------------------------------------------------------------------------- /web/views/@default/clusters/cluster/node/detail.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["detail.less"],"names":[],"mappings":"AAAA,CAAC;EACA,iCAAA","file":"detail.css"} -------------------------------------------------------------------------------- /web/views/@default/clusters/cluster/node/logs.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["logs.less"],"names":[],"mappings":"AAAA,GAAG;EACF,SAAA;EACA,UAAA","file":"logs.css"} -------------------------------------------------------------------------------- /web/public/css/fonts/S6u8w4BMUTPHjxsAUi-qNiXg7eU0.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoEdgeLab/EdgeAdmin/HEAD/web/public/css/fonts/S6u8w4BMUTPHjxsAUi-qNiXg7eU0.woff2 -------------------------------------------------------------------------------- /web/public/css/themes/github/assets/fonts/octicons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoEdgeLab/EdgeAdmin/HEAD/web/public/css/themes/github/assets/fonts/octicons.woff -------------------------------------------------------------------------------- /web/public/css/themes/material/assets/fonts/icons.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoEdgeLab/EdgeAdmin/HEAD/web/public/css/themes/material/assets/fonts/icons.woff2 -------------------------------------------------------------------------------- /web/views/@default/log/clean.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.cleanType = "all" 3 | this.days = 30 4 | 5 | this.success = NotifyReloadSuccess("清理完成") 6 | }) -------------------------------------------------------------------------------- /web/views/@default/log/index.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["index.less"],"names":[],"mappings":"AAAA;EACC,kBAAA;;AADD,QAGC;EACC,kBAAA;EACA,UAAA","file":"index.css"} -------------------------------------------------------------------------------- /web/views/@default/servers/groups/group/update.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifySuccess("保存成功", ".", { 3 | groupId: this.group.id 4 | }) 5 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/iplists/createPopup.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["createPopup.less"],"names":[],"mappings":"AAAA,EACC;EACC,kBAAA","file":"createPopup.css"} -------------------------------------------------------------------------------- /web/views/@default/servers/metrics/charts/chart.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["chart.less"],"names":[],"mappings":"AAAA,EACC;EACC,gBAAA;EACA,WAAA","file":"chart.css"} -------------------------------------------------------------------------------- /web/views/@default/servers/metrics/update.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifySuccess("保存成功", "/servers/metrics/item?itemId=" + this.item.id) 3 | }) -------------------------------------------------------------------------------- /docker/run.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | VERSION=latest 4 | 5 | docker run -d -p 7788:7788 -p 8001:8001 -p 3306:3306 --name edge-admin goedge/edge-admin:${VERSION} 6 | -------------------------------------------------------------------------------- /internal/ttlcache/utils.go: -------------------------------------------------------------------------------- 1 | package ttlcache 2 | 3 | import "github.com/cespare/xxhash/v2" 4 | 5 | func HashKey(key []byte) uint64 { 6 | return xxhash.Sum64(key) 7 | } 8 | -------------------------------------------------------------------------------- /web/public/css/fonts/S6u9w4BMUTPHh6UVSwaPGQ3q5d0N7w.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoEdgeLab/EdgeAdmin/HEAD/web/public/css/fonts/S6u9w4BMUTPHh6UVSwaPGQ3q5d0N7w.woff2 -------------------------------------------------------------------------------- /web/public/css/fonts/S6u_w4BMUTPHjxsI5wq_FQftx9897sxZ.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoEdgeLab/EdgeAdmin/HEAD/web/public/css/fonts/S6u_w4BMUTPHjxsI5wq_FQftx9897sxZ.woff2 -------------------------------------------------------------------------------- /web/public/css/fonts/S6u_w4BMUTPHjxsI5wq_Gwftx9897g.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoEdgeLab/EdgeAdmin/HEAD/web/public/css/fonts/S6u_w4BMUTPHjxsI5wq_Gwftx9897g.woff2 -------------------------------------------------------------------------------- /web/public/css/themes/default/assets/fonts/brand-icons.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoEdgeLab/EdgeAdmin/HEAD/web/public/css/themes/default/assets/fonts/brand-icons.eot -------------------------------------------------------------------------------- /web/public/css/themes/default/assets/fonts/brand-icons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoEdgeLab/EdgeAdmin/HEAD/web/public/css/themes/default/assets/fonts/brand-icons.ttf -------------------------------------------------------------------------------- /web/public/css/themes/default/assets/fonts/brand-icons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoEdgeLab/EdgeAdmin/HEAD/web/public/css/themes/default/assets/fonts/brand-icons.woff -------------------------------------------------------------------------------- /web/public/js/components/common/mask-warning.js: -------------------------------------------------------------------------------- 1 | Vue.component("mask-warning", { 2 | template: `为了安全起见,此项数据保存后将不允许在界面查看完整明文,为避免忘记,请自行记录原始数据。` 3 | }) -------------------------------------------------------------------------------- /web/views/@default/admins/admin.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["admin.less"],"names":[],"mappings":"AAAA,YACC;EACC,WAAA;EACA,UAAA;EACA,iBAAA;EACA,oBAAA","file":"admin.css"} -------------------------------------------------------------------------------- /web/views/@default/admins/admin.less: -------------------------------------------------------------------------------- 1 | .modules-box { 2 | .module-box { 3 | float: left; 4 | width: 9em; 5 | margin-top: 0.3em; 6 | margin-bottom: 0.3em; 7 | } 8 | } -------------------------------------------------------------------------------- /web/views/@default/clusters/cluster/createBatch.css: -------------------------------------------------------------------------------- 1 | .left-box { 2 | top: 10em; 3 | } 4 | .right-box { 5 | top: 10em; 6 | } 7 | /*# sourceMappingURL=createBatch.css.map */ -------------------------------------------------------------------------------- /web/views/@default/servers/components/cache/createPopup.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyPopup 3 | 4 | this.policyType = this.types[0].type 5 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/server/delete/index.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["index.less"],"names":[],"mappings":"AAAA;EACC,eAAA;;AADD,WAGC;EACC,qBAAA","file":"index.css"} -------------------------------------------------------------------------------- /internal/const/plus.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved. 2 | //go:build !plus 3 | 4 | package teaconst 5 | 6 | var IsPlus = false 7 | -------------------------------------------------------------------------------- /web/public/css/themes/default/assets/fonts/brand-icons.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoEdgeLab/EdgeAdmin/HEAD/web/public/css/themes/default/assets/fonts/brand-icons.woff2 -------------------------------------------------------------------------------- /web/public/css/themes/default/assets/fonts/outline-icons.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoEdgeLab/EdgeAdmin/HEAD/web/public/css/themes/default/assets/fonts/outline-icons.eot -------------------------------------------------------------------------------- /web/public/css/themes/default/assets/fonts/outline-icons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoEdgeLab/EdgeAdmin/HEAD/web/public/css/themes/default/assets/fonts/outline-icons.ttf -------------------------------------------------------------------------------- /web/public/css/themes/default/assets/fonts/outline-icons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoEdgeLab/EdgeAdmin/HEAD/web/public/css/themes/default/assets/fonts/outline-icons.woff -------------------------------------------------------------------------------- /web/public/css/themes/github/assets/fonts/octicons-local.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoEdgeLab/EdgeAdmin/HEAD/web/public/css/themes/github/assets/fonts/octicons-local.ttf -------------------------------------------------------------------------------- /web/views/@default/admins/update.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["update.less"],"names":[],"mappings":"AAAA,YACC;EACC,WAAA;EACA,WAAA;EACA,iBAAA;EACA,oBAAA","file":"update.css"} -------------------------------------------------------------------------------- /web/views/@default/admins/update.less: -------------------------------------------------------------------------------- 1 | .modules-box { 2 | .module-box { 3 | float: left; 4 | width: 10em; 5 | margin-top: 0.3em; 6 | margin-bottom: 0.3em; 7 | } 8 | } -------------------------------------------------------------------------------- /web/views/@default/clusters/cluster/installManual.css: -------------------------------------------------------------------------------- 1 | .left-box { 2 | top: 10em; 3 | } 4 | .right-box { 5 | top: 10em; 6 | } 7 | /*# sourceMappingURL=installManual.css.map */ -------------------------------------------------------------------------------- /web/views/@default/clusters/cluster/installNodes.css: -------------------------------------------------------------------------------- 1 | .left-box { 2 | top: 10em; 3 | } 4 | .right-box { 5 | top: 10em; 6 | } 7 | /*# sourceMappingURL=installNodes.css.map */ -------------------------------------------------------------------------------- /web/views/@default/clusters/cluster/node/install.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["install.less"],"names":[],"mappings":"AAAA;EACC,gBAAA;;AADD,eAGC;EACC,cAAA","file":"install.css"} -------------------------------------------------------------------------------- /web/views/@default/clusters/grants/createPopup.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.method = "user"; 3 | this.username = "root" 4 | 5 | this.success = NotifyPopup; 6 | }); -------------------------------------------------------------------------------- /web/views/@default/dns/tasks/listPopup.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["listPopup.less"],"names":[],"mappings":"AAAA,EAAG;EACF,kBAAA;EACA,WAAA;EACA,2BAAA","file":"listPopup.css"} -------------------------------------------------------------------------------- /web/views/@default/servers/server/stat/index.css: -------------------------------------------------------------------------------- 1 | .chart-box { 2 | height: 14em; 3 | } 4 | h4 span.small { 5 | font-size: 0.8em; 6 | } 7 | /*# sourceMappingURL=index.css.map */ -------------------------------------------------------------------------------- /web/views/@default/servers/server/stat/index.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["index.less"],"names":[],"mappings":"AAAA;EACC,YAAA;;AAGD,EAAG,KAAI;EACN,gBAAA","file":"index.css"} -------------------------------------------------------------------------------- /internal/configs/nodes/node_config.go: -------------------------------------------------------------------------------- 1 | package nodes 2 | 3 | type NodeConfig struct { 4 | Id string `json:"id" yaml:"id"` 5 | Secret string `json:"secret" yaml:"secret"` 6 | } 7 | -------------------------------------------------------------------------------- /web/public/css/themes/default/assets/fonts/outline-icons.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoEdgeLab/EdgeAdmin/HEAD/web/public/css/themes/default/assets/fonts/outline-icons.woff2 -------------------------------------------------------------------------------- /web/public/js/components/common/dot.js: -------------------------------------------------------------------------------- 1 | Vue.component("dot", { 2 | template: '' 3 | }) -------------------------------------------------------------------------------- /web/views/@default/admins/createPopup.less: -------------------------------------------------------------------------------- 1 | .modules-box { 2 | .module-box { 3 | float: left; 4 | width: 10em; 5 | margin-top: 0.3em; 6 | margin-bottom: 0.3em; 7 | } 8 | } -------------------------------------------------------------------------------- /web/views/@default/clusters/cluster/createBatch.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["createBatch.less"],"names":[],"mappings":"AAAA;EACC,SAAA;;AAGD;EACC,SAAA","file":"createBatch.css"} -------------------------------------------------------------------------------- /web/views/@default/clusters/cluster/delete.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["delete.less"],"names":[],"mappings":"AAAA;EACC,kBAAA;EACA,eAAA;;AAFD,YAIC;EACC,WAAA","file":"delete.css"} -------------------------------------------------------------------------------- /web/views/@default/clusters/cluster/installNodes.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["installNodes.less"],"names":[],"mappings":"AAAA;EACC,SAAA;;AAGD;EACC,SAAA","file":"installNodes.css"} -------------------------------------------------------------------------------- /web/views/@default/dns/tasks/listPopup.css: -------------------------------------------------------------------------------- 1 | h3 span { 2 | margin-left: 0.5em; 3 | color: grey; 4 | font-size: 0.6em !important; 5 | } 6 | /*# sourceMappingURL=listPopup.css.map */ -------------------------------------------------------------------------------- /web/views/@default/servers/ipbox/index.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["index.less"],"names":[],"mappings":"AAAA;EACC,+BAAA;EACA,iBAAA;EACA,UAAA;;AAGD;EACC,UAAA","file":"index.css"} -------------------------------------------------------------------------------- /web/views/@default/servers/server/stat/clients.css: -------------------------------------------------------------------------------- 1 | .chart-box { 2 | height: 20em; 3 | } 4 | h4 span.small { 5 | font-size: 0.8em; 6 | } 7 | /*# sourceMappingURL=clients.css.map */ -------------------------------------------------------------------------------- /web/views/@default/servers/server/stat/clients.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["clients.less"],"names":[],"mappings":"AAAA;EACC,YAAA;;AAGD,EAAG,KAAI;EACN,gBAAA","file":"clients.css"} -------------------------------------------------------------------------------- /web/views/@default/servers/server/stat/regions.css: -------------------------------------------------------------------------------- 1 | .chart-box { 2 | height: 20em; 3 | } 4 | h4 span.small { 5 | font-size: 0.8em; 6 | } 7 | /*# sourceMappingURL=regions.css.map */ -------------------------------------------------------------------------------- /web/views/@default/servers/server/stat/regions.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["regions.less"],"names":[],"mappings":"AAAA;EACC,YAAA;;AAGD,EAAG,KAAI;EACN,gBAAA","file":"regions.css"} -------------------------------------------------------------------------------- /web/views/@default/clusters/cluster/installManual.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["installManual.less"],"names":[],"mappings":"AAAA;EACC,SAAA;;AAGD;EACC,SAAA","file":"installManual.css"} -------------------------------------------------------------------------------- /web/views/@default/clusters/cluster/settings/firewall-actions/createPopup.css: -------------------------------------------------------------------------------- 1 | .white-span { 2 | background: white; 3 | border: 1px; 4 | } 5 | /*# sourceMappingURL=createPopup.css.map */ -------------------------------------------------------------------------------- /web/views/@default/db/logs.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.$delay(function () { 3 | teaweb.datepicker("day-from-picker") 4 | teaweb.datepicker("day-to-picker") 5 | }) 6 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/components/waf/export.less: -------------------------------------------------------------------------------- 1 | .groups-box { 2 | .group-box { 3 | float: left; 4 | width: 11em; 5 | margin-top: 0.1em; 6 | margin-bottom: 0.6em; 7 | } 8 | } -------------------------------------------------------------------------------- /web/views/@default/servers/server/stat/providers.css: -------------------------------------------------------------------------------- 1 | .chart-box { 2 | height: 20em; 3 | } 4 | h4 span.small { 5 | font-size: 0.8em; 6 | } 7 | /*# sourceMappingURL=providers.css.map */ -------------------------------------------------------------------------------- /web/views/@default/servers/server/stat/providers.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["providers.less"],"names":[],"mappings":"AAAA;EACC,YAAA;;AAGD,EAAG,KAAI;EACN,gBAAA","file":"providers.css"} -------------------------------------------------------------------------------- /web/public/codemirror/addon/display/fullscreen.css: -------------------------------------------------------------------------------- 1 | .CodeMirror-fullscreen { 2 | position: fixed; 3 | top: 0; left: 0; right: 0; bottom: 0; 4 | height: auto; 5 | z-index: 9; 6 | } 7 | -------------------------------------------------------------------------------- /web/views/@default/admins/createPopup.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["createPopup.less"],"names":[],"mappings":"AAAA,YACC;EACC,WAAA;EACA,WAAA;EACA,iBAAA;EACA,oBAAA","file":"createPopup.css"} -------------------------------------------------------------------------------- /web/views/@default/clusters/regions/@menu.html: -------------------------------------------------------------------------------- 1 | 2 | 区域 3 | 节点 4 | -------------------------------------------------------------------------------- /web/views/@default/log/index.css: -------------------------------------------------------------------------------- 1 | .log-row { 2 | position: relative; 3 | } 4 | .log-row .buttons { 5 | position: absolute; 6 | right: 1em; 7 | } 8 | /*# sourceMappingURL=index.css.map */ -------------------------------------------------------------------------------- /web/views/@default/servers/components/cache/batch/index.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["index.less"],"names":[],"mappings":"AAAA;EACC,gBAAA;EACA,gBAAA;;AAGD,cAAc;EACb,UAAA","file":"index.css"} -------------------------------------------------------------------------------- /web/views/@default/servers/components/waf/export.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["export.less"],"names":[],"mappings":"AAAA,WACC;EACC,WAAA;EACA,WAAA;EACA,iBAAA;EACA,oBAAA","file":"export.css"} -------------------------------------------------------------------------------- /web/views/@default/servers/ipbox/index.less: -------------------------------------------------------------------------------- 1 | .cell-title { 2 | background: rgba(0, 0, 0, 0.03); 3 | font-weight: bold; 4 | width: 7em; 5 | } 6 | 7 | .cell-content { 8 | width: 22%; 9 | } -------------------------------------------------------------------------------- /web/views/@default/servers/server/log/viewPopup.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["viewPopup.less"],"names":[],"mappings":"AAAA,KAAM;EACL,qBAAA;;AAGD,KAAM,GAAE;EACP,sBAAA","file":"viewPopup.css"} -------------------------------------------------------------------------------- /web/views/@default/servers/components/cache/batch/index.less: -------------------------------------------------------------------------------- 1 | .fail-keys-box { 2 | max-height: 10em; 3 | overflow-y: auto; 4 | } 5 | 6 | .fail-keys-box::-webkit-scrollbar { 7 | width: 6px; 8 | } -------------------------------------------------------------------------------- /web/views/@default/servers/components/log/index.html: -------------------------------------------------------------------------------- 1 | {$layout} 2 | {$template "/left_menu_top"} 3 | 4 |
5 |

此功能暂未开放敬请期待。

6 |
-------------------------------------------------------------------------------- /web/views/@default/servers/server/delete/index.css: -------------------------------------------------------------------------------- 1 | .delete-box { 2 | margin-top: 1em; 3 | } 4 | .delete-box button { 5 | width: 20em!important; 6 | } 7 | /*# sourceMappingURL=index.css.map */ -------------------------------------------------------------------------------- /web/views/@default/servers/server/stat/dailyRequests.css: -------------------------------------------------------------------------------- 1 | .chart-box { 2 | height: 21em; 3 | } 4 | h4 span.small { 5 | font-size: 0.8em; 6 | } 7 | /*# sourceMappingURL=dailyRequests.css.map */ -------------------------------------------------------------------------------- /web/views/@default/servers/server/stat/hourlyRequests.css: -------------------------------------------------------------------------------- 1 | .chart-box { 2 | height: 21em; 3 | } 4 | h4 span.small { 5 | font-size: 0.8em; 6 | } 7 | /*# sourceMappingURL=hourlyRequests.css.map */ -------------------------------------------------------------------------------- /internal/utils/errors.go: -------------------------------------------------------------------------------- 1 | package utils 2 | 3 | import "github.com/iwind/TeaGo/logs" 4 | 5 | func PrintError(err error) { 6 | // TODO 记录调用的文件名、行数 7 | logs.Println("[ERROR]" + err.Error()) 8 | } 9 | -------------------------------------------------------------------------------- /web/public/js/components/common/submit-btn.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 保存按钮 3 | */ 4 | Vue.component("submit-btn", { 5 | template: '' 6 | }); -------------------------------------------------------------------------------- /web/views/@default/admins/admin.css: -------------------------------------------------------------------------------- 1 | .modules-box .module-box { 2 | float: left; 3 | width: 9em; 4 | margin-top: 0.3em; 5 | margin-bottom: 0.3em; 6 | } 7 | /*# sourceMappingURL=admin.css.map */ -------------------------------------------------------------------------------- /web/views/@default/admins/update.css: -------------------------------------------------------------------------------- 1 | .modules-box .module-box { 2 | float: left; 3 | width: 10em; 4 | margin-top: 0.3em; 5 | margin-bottom: 0.3em; 6 | } 7 | /*# sourceMappingURL=update.css.map */ -------------------------------------------------------------------------------- /web/views/@default/clusters/cluster/node/install.css: -------------------------------------------------------------------------------- 1 | .installing-box { 2 | line-height: 1.8; 3 | } 4 | .installing-box .blue { 5 | color: #2185d0; 6 | } 7 | /*# sourceMappingURL=install.css.map */ -------------------------------------------------------------------------------- /web/views/@default/clusters/cluster/node/logs.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.$delay(function () { 3 | teaweb.datepicker("day-from-picker") 4 | teaweb.datepicker("day-to-picker") 5 | }) 6 | }) -------------------------------------------------------------------------------- /web/views/@default/clusters/cluster/settings/firewall-actions/createPopup.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["createPopup.less"],"names":[],"mappings":"AAAA;EACC,iBAAA;EACA,WAAA","file":"createPopup.css"} -------------------------------------------------------------------------------- /web/views/@default/clusters/grants/create.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.method = "user"; 3 | this.username = "root" 4 | 5 | this.success = NotifySuccess("保存成功", "/clusters/grants"); 6 | }); -------------------------------------------------------------------------------- /web/views/@default/servers/server/log/viewPopup.css: -------------------------------------------------------------------------------- 1 | table td { 2 | word-break: break-all; 3 | } 4 | table td.title { 5 | width: 12em !important; 6 | } 7 | /*# sourceMappingURL=viewPopup.css.map */ -------------------------------------------------------------------------------- /web/views/@default/servers/server/stat/dailyRequests.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["dailyRequests.less"],"names":[],"mappings":"AAAA;EACC,YAAA;;AAGD,EAAG,KAAI;EACN,gBAAA","file":"dailyRequests.css"} -------------------------------------------------------------------------------- /web/views/@default/servers/server/stat/hourlyRequests.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["hourlyRequests.less"],"names":[],"mappings":"AAAA;EACC,YAAA;;AAGD,EAAG,KAAI;EACN,gBAAA","file":"hourlyRequests.css"} -------------------------------------------------------------------------------- /web/views/@default/settings/api/node/logs.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.$delay(function () { 3 | teaweb.datepicker("day-from-picker") 4 | teaweb.datepicker("day-to-picker") 5 | }) 6 | }) -------------------------------------------------------------------------------- /web/views/@default/users/features.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["features.less"],"names":[],"mappings":"AAAA,cACC;EACC,kBAAA;EACA,WAAA;EACA,WAAA;;AAJF,cAOC,aAAY,MACX;EACC,iBAAA","file":"features.css"} -------------------------------------------------------------------------------- /internal/utils/recover.go: -------------------------------------------------------------------------------- 1 | package utils 2 | 3 | import ( 4 | "runtime/debug" 5 | ) 6 | 7 | func Recover() { 8 | e := recover() 9 | if e != nil { 10 | debug.PrintStack() 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /web/public/js/components/api-node/api-node-selector.js: -------------------------------------------------------------------------------- 1 | Vue.component("api-node-selector", { 2 | props: [], 3 | data: function () { 4 | return {} 5 | }, 6 | template: `
7 | 暂未实现 8 |
` 9 | }) -------------------------------------------------------------------------------- /web/public/js/pikaday.triangle.css: -------------------------------------------------------------------------------- 1 | /** 2 | * This theme is an example to show how you can add triangles to the dropdowns. 3 | */ 4 | .triangle-theme .pika-label:after { 5 | content:" \25be"; 6 | } 7 | -------------------------------------------------------------------------------- /web/views/@default/clusters/tasks/listPopup.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["listPopup.less"],"names":[],"mappings":"AAAA,EAAG;EACF,kBAAA;EACA,WAAA;EACA,gBAAA;;AAID,KACC;EACC,qBAAA","file":"listPopup.css"} -------------------------------------------------------------------------------- /web/views/@default/index/initPassword.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = function () { 3 | teaweb.success("用户名和密码保存成功,现在去登录", function () { 4 | window.location = "/" 5 | }) 6 | } 7 | }) -------------------------------------------------------------------------------- /web/views/@default/admins/createPopup.css: -------------------------------------------------------------------------------- 1 | .modules-box .module-box { 2 | float: left; 3 | width: 10em; 4 | margin-top: 0.3em; 5 | margin-bottom: 0.3em; 6 | } 7 | /*# sourceMappingURL=createPopup.css.map */ -------------------------------------------------------------------------------- /web/views/@default/clusters/cluster/delete.css: -------------------------------------------------------------------------------- 1 | .buttons-box { 2 | text-align: center; 3 | margin-top: 2em; 4 | } 5 | .buttons-box button { 6 | width: 20em; 7 | } 8 | /*# sourceMappingURL=delete.css.map */ -------------------------------------------------------------------------------- /web/views/@default/servers/iplists/createIPPopup.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.type = "ip" 3 | this.eventLevel = (this.listType == "white") ? "debug" : "critical" 4 | this.method = "single" 5 | }) -------------------------------------------------------------------------------- /web/public/css/sortable.css: -------------------------------------------------------------------------------- 1 | .sortable-ghost { 2 | border: 1px red solid !important; 3 | } 4 | 5 | .sortable-drag { 6 | border: 1px red solid !important; 7 | background: #fff; 8 | opacity: 100%; 9 | } -------------------------------------------------------------------------------- /web/views/@default/clusters/cluster/createNode.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["createNode.less"],"names":[],"mappings":"AAAA;EACC,SAAA;;AAGD;EACC,SAAA;;AAGD;EACC,cAAA;;AAGD,KAAK;EACJ,iBAAA","file":"createNode.css"} -------------------------------------------------------------------------------- /web/views/@default/clusters/grants/update.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.method = this.grant.method; 3 | 4 | this.success = NotifySuccess("保存成功", "/clusters/grants/grant?grantId=" + this.grant.id); 5 | }); -------------------------------------------------------------------------------- /web/views/@default/clusters/logs/index.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["index.less"],"names":[],"mappings":"AAAA,GAAG;EACF,SAAA;EACA,UAAA;;AAGD,qBACC;EACC,oBAAA;;AAFF,qBAKC,KAAI;EACH,gBAAA;EACA,cAAA","file":"index.css"} -------------------------------------------------------------------------------- /web/views/@default/servers/components/waf/export.css: -------------------------------------------------------------------------------- 1 | .groups-box .group-box { 2 | float: left; 3 | width: 11em; 4 | margin-top: 0.1em; 5 | margin-bottom: 0.6em; 6 | } 7 | /*# sourceMappingURL=export.css.map */ -------------------------------------------------------------------------------- /web/views/@default/dashboard/index.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["index.less"],"names":[],"mappings":"AAAA,GAAG,QACF,EACC;EACC,kBAAA;EACA,UAAA;EACA,QAAA;;AAKH;EACC,YAAA;;AAGD,EACC;EACC,gBAAA;EACA,WAAA","file":"index.css"} -------------------------------------------------------------------------------- /web/views/@default/servers/groups/selectPopup.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyPopup 3 | this.groupId = 0 4 | 5 | this.selectGroup = function (group) { 6 | this.groupId = group.id 7 | } 8 | }) -------------------------------------------------------------------------------- /web/views/@default/clusters/cluster/groups/selectPopup.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyPopup 3 | this.groupId = 0 4 | 5 | this.selectGroup = function (group) { 6 | this.groupId = group.id 7 | } 8 | }) -------------------------------------------------------------------------------- /web/views/@default/clusters/regions/selectPopup.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyPopup 3 | this.regionId = 0 4 | 5 | this.selectRegion = function (region) { 6 | this.regionId = region.id 7 | } 8 | }) -------------------------------------------------------------------------------- /web/views/@default/clusters/tasks/listPopup.less: -------------------------------------------------------------------------------- 1 | h3 span { 2 | margin-left: 0.5em; 3 | color: grey; 4 | font-size: 0.6em !important; 5 | } 6 | 7 | 8 | table { 9 | td { 10 | word-break: break-all; 11 | } 12 | } -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/headers/createDeletePopup.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.headerName = "" 3 | 4 | this.selectHeader = function (headerName) { 5 | this.headerName = headerName 6 | } 7 | }) -------------------------------------------------------------------------------- /web/views/@default/settings/api/node/updateAddrPopup.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | let addr = window.parent.UPDATING_ADDR 3 | this.protocol = addr.protocol 4 | this.addr = addr.host.quoteIP() + ":" + addr.portRange 5 | }) -------------------------------------------------------------------------------- /internal/oplogs/levels.go: -------------------------------------------------------------------------------- 1 | package oplogs 2 | 3 | const ( 4 | LevelNone = "none" 5 | LevelInfo = "info" 6 | LevelDebug = "debug" 7 | LevelWarn = "warn" 8 | LevelError = "error" 9 | LevelFatal = "fatal" 10 | ) 11 | -------------------------------------------------------------------------------- /web/views/@default/servers/components/waf/ipadmin/provinces.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["provinces.less"],"names":[],"mappings":"AAAA,cACC;EACC,WAAA;EACA,WAAA;EACA,oBAAA;;AAJF,cACC,MAKC,UAAU;EACT,0BAAA","file":"provinces.css"} -------------------------------------------------------------------------------- /web/views/@default/servers/ipbox/index.css: -------------------------------------------------------------------------------- 1 | .cell-title { 2 | background: rgba(0, 0, 0, 0.03); 3 | font-weight: bold; 4 | width: 7em; 5 | } 6 | .cell-content { 7 | width: 22%; 8 | } 9 | /*# sourceMappingURL=index.css.map */ -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/headers/createNonStandardPopup.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.headerName = "" 3 | 4 | this.selectHeader = function (headerName) { 5 | this.headerName = headerName 6 | } 7 | }) -------------------------------------------------------------------------------- /web/views/@default/settings/transfer/index.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["index.less"],"names":[],"mappings":"AAAA,MACC,MAAK,OACJ;EACC,iBAAA;;AAKH,SACC;EACC,eAAA;;AAFF,SACC,cAGC;EACC,YAAA;;AALH,SASC;EACC,eAAA","file":"index.css"} -------------------------------------------------------------------------------- /internal/utils/sizes/sizes.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved. 2 | 3 | package sizes 4 | 5 | const ( 6 | K int64 = 1024 7 | M = 1024 * K 8 | G = 1024 * M 9 | T = 1024 * G 10 | ) 11 | -------------------------------------------------------------------------------- /internal/web/actions/default/servers/server/settings/conds/condutils/utils_test.go: -------------------------------------------------------------------------------- 1 | package condutils 2 | 3 | import "testing" 4 | 5 | func TestReadAllAvailableCondTypes(t *testing.T) { 6 | t.Log(ReadAllAvailableCondTypes()) 7 | } 8 | -------------------------------------------------------------------------------- /web/views/@default/clusters/tasks/listPopup.css: -------------------------------------------------------------------------------- 1 | h3 span { 2 | margin-left: 0.5em; 3 | color: grey; 4 | font-size: 0.6em !important; 5 | } 6 | table td { 7 | word-break: break-all; 8 | } 9 | /*# sourceMappingURL=listPopup.css.map */ -------------------------------------------------------------------------------- /web/views/@default/servers/certs/acme/create.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["create.less"],"names":[],"mappings":"AAAA;EACC,eAAA;EACA,UAAA;;AAFD,aAIC,QAAO;EACN,YAAA;;AAIF;EACC,kBAAA;EACA,gBAAA;;AAFD,YAIC;EACC,gBAAA","file":"create.css"} -------------------------------------------------------------------------------- /web/views/@default/servers/components/cache/batch/index.css: -------------------------------------------------------------------------------- 1 | .fail-keys-box { 2 | max-height: 10em; 3 | overflow-y: auto; 4 | } 5 | .fail-keys-box::-webkit-scrollbar { 6 | width: 6px; 7 | } 8 | /*# sourceMappingURL=index.css.map */ -------------------------------------------------------------------------------- /web/views/@default/ui/selectProvincesPopup.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["selectProvincesPopup.less"],"names":[],"mappings":"AAAA,cACC;EACC,WAAA;EACA,WAAA;EACA,oBAAA;;AAJF,cACC,MAKC,UAAU;EACT,0BAAA","file":"selectProvincesPopup.css"} -------------------------------------------------------------------------------- /web/views/@default/ui/selectProvincesPopup.less: -------------------------------------------------------------------------------- 1 | .province-list { 2 | .item { 3 | float: left; 4 | width: 12em; 5 | margin-bottom: 0.5em; 6 | 7 | .checkbox label { 8 | font-size: 12px !important; 9 | } 10 | } 11 | } -------------------------------------------------------------------------------- /internal/const/build.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved. 2 | //go:build !plus 3 | 4 | package teaconst 5 | 6 | const BuildCommunity = true 7 | const BuildPlus = false 8 | const Tag = "community" 9 | -------------------------------------------------------------------------------- /web/public/js/components/common/message-loading.js: -------------------------------------------------------------------------------- 1 | Vue.component("loading-message", { 2 | template: `
3 |
  4 |
` 5 | }) -------------------------------------------------------------------------------- /web/public/js/components/common/warning-message.js: -------------------------------------------------------------------------------- 1 | // 警告消息 2 | Vue.component("warning-message", { 3 | template: `
` 4 | }) -------------------------------------------------------------------------------- /web/views/@default/clusters/cluster/createNode.less: -------------------------------------------------------------------------------- 1 | .left-box { 2 | top: 10em; 3 | } 4 | 5 | .right-box { 6 | top: 10em; 7 | } 8 | 9 | .row { 10 | line-height: 2; 11 | } 12 | 13 | .step.active { 14 | font-weight: bold; 15 | } -------------------------------------------------------------------------------- /web/views/@default/servers/groups/group/settings/waf/ipadmin/provinces.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["provinces.less"],"names":[],"mappings":"AAAA,cACC;EACC,WAAA;EACA,WAAA;EACA,oBAAA;;AAJF,cACC,MAKC,UAAU;EACT,0BAAA","file":"provinces.css"} -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/unix/index.html: -------------------------------------------------------------------------------- 1 | {$layout} 2 | {$template "../settings_menu"} 3 | {$template "/left_menu_with_menu"} 4 | 5 |
6 |

此功能暂未开放,敬请期待。

7 |
-------------------------------------------------------------------------------- /internal/encrypt/method_utils_test.go: -------------------------------------------------------------------------------- 1 | package encrypt 2 | 3 | import "testing" 4 | 5 | func TestFindMethodInstance(t *testing.T) { 6 | t.Log(NewMethodInstance("a", "b", "")) 7 | t.Log(NewMethodInstance("aes-256-cfb", "123456", "")) 8 | } 9 | -------------------------------------------------------------------------------- /web/views/@default/clusters/cluster/installRemote.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["installRemote.less"],"names":[],"mappings":"AAAA;EACC,SAAA;;AAGD;EACC,SAAA;;AAGD;EACC,kBAAA;;AAGD,EAAG;EACF,kBAAA;EACA,UAAA;EACA,WAAA","file":"installRemote.css"} -------------------------------------------------------------------------------- /web/views/@default/clusters/cluster/upgradeRemote.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["upgradeRemote.less"],"names":[],"mappings":"AAAA;EACC,SAAA;;AAGD;EACC,SAAA;;AAGD;EACC,kBAAA;;AAGD,EAAG;EACF,kBAAA;EACA,UAAA;EACA,WAAA","file":"upgradeRemote.css"} -------------------------------------------------------------------------------- /web/views/@default/clusters/selectPopup.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.select = function (cluster) { 3 | NotifyPopup({ 4 | code: 200, 5 | message: "", 6 | data: { 7 | cluster: cluster 8 | } 9 | }) 10 | } 11 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/components/waf/export.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = function (resp) { 3 | window.location = "/servers/components/waf/exportDownload?key=" + resp.data.key + "&policyId=" + resp.data.id 4 | } 5 | }) -------------------------------------------------------------------------------- /web/views/@default/users/features.less: -------------------------------------------------------------------------------- 1 | .feature-boxes { 2 | .feature-box { 3 | margin-bottom: 1em; 4 | width: 24em; 5 | float: left; 6 | } 7 | 8 | .feature-box:hover { 9 | label { 10 | font-weight: bold; 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /web/public/js/langs/en-us.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["en-us.less"],"names":[],"mappings":"AAAA,UACC,MACC;AAFU,SACX,MACC;EACC,iBAAA;;AAHH,UACC,MAKC,WACC;AAPS,SACX,MAKC,WACC;EACC,gBAAA;;AAMJ,SACC,MACC;EACC,gBAAA;EACA,kBAAA;EACA,qBAAA","file":"en-us.css"} -------------------------------------------------------------------------------- /web/public/js/langs/zh-cn.js: -------------------------------------------------------------------------------- 1 | // generated by 'langs generate' 2 | window.LANG_MESSAGES = {"admin_dashboard@ui_dns":"DNS","admin_dashboard@ui_events":"事件","admin_dashboard@ui_overview":"概况","admin_dashboard@ui_user":"用户","admin_dashboard@ui_waf":"WAF"}; 3 | -------------------------------------------------------------------------------- /web/views/@default/clusters/cluster/createBatch.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifySuccess("保存成功", "/clusters/cluster/nodes?clusterId=" + this.clusterId) 3 | 4 | this.$delay(function () { 5 | this.$refs.ipList.focus() 6 | }) 7 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/headers/createSetPopup.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.shouldReplace = false 3 | this.headerName = "" 4 | 5 | this.selectHeader = function (headerName) { 6 | this.headerName = headerName 7 | } 8 | }) -------------------------------------------------------------------------------- /web/views/@default/users/features.css: -------------------------------------------------------------------------------- 1 | .feature-boxes .feature-box { 2 | margin-bottom: 1em; 3 | width: 24em; 4 | float: left; 5 | } 6 | .feature-boxes .feature-box:hover label { 7 | font-weight: bold; 8 | } 9 | /*# sourceMappingURL=features.css.map */ -------------------------------------------------------------------------------- /web/public/js/langs/base.js: -------------------------------------------------------------------------------- 1 | // generated by 'langs generate' 2 | window.LANG_MESSAGES_BASE = {"admin_dashboard@ui_dns":"DNS","admin_dashboard@ui_events":"事件","admin_dashboard@ui_overview":"概况","admin_dashboard@ui_user":"用户","admin_dashboard@ui_waf":"WAF"}; 3 | -------------------------------------------------------------------------------- /web/views/@default/clusters/nodes.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["nodes.less"],"names":[],"mappings":"AAAA,MACC,GAAE;EACD,UAAA;;AAIF;EACC,kBAAA;;AADD,aAGC,MAAK;EACJ,aAAA;EACA,kBAAA;EACA,UAAA;EACA,QAAA;EACA,gBAAA;;AAIF,aAAa,MACZ,MAAK;EACJ,eAAA","file":"nodes.css"} -------------------------------------------------------------------------------- /web/views/@default/servers/certs/certPopup.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["certPopup.less"],"names":[],"mappings":"AAAA;EACC,YAAA;EACA,SAAA;EACA,gBAAA;EACA,yBAAA;EACA,qBAAA;EACA,gBAAA;EACA,+BAAA;EACA,gBAAA;EACA,gBAAA;;AAGD,QAAQ;EACP,UAAA","file":"certPopup.css"} -------------------------------------------------------------------------------- /web/views/@default/servers/components/waf/ipadmin/provinces.less: -------------------------------------------------------------------------------- 1 | .province-list { 2 | .item { 3 | float: left; 4 | width: 12em; 5 | margin-bottom: 0.5em; 6 | 7 | .checkbox label { 8 | font-size: 12px !important; 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /internal/waf/injectionutils/libinjection_xss.c: -------------------------------------------------------------------------------- 1 | #define LIBINJECTION_VERSION "3.9.1" 2 | 3 | #include "libinjection/src/libinjection_xss.c" 4 | #include "libinjection/src/libinjection_html5.c" 5 | 6 | #define GOEDGE_VERSION "25" // last version is for GoEdge change -------------------------------------------------------------------------------- /web/public/js/langs/en-us.js: -------------------------------------------------------------------------------- 1 | // generated by 'langs generate' 2 | window.LANG_MESSAGES = {"admin_dashboard@ui_dns":"DNS","admin_dashboard@ui_events":"Events","admin_dashboard@ui_overview":"Overview","admin_dashboard@ui_user":"Users","admin_dashboard@ui_waf":"WAF"}; 3 | -------------------------------------------------------------------------------- /web/views/@default/clusters/cluster/createNode.css: -------------------------------------------------------------------------------- 1 | .left-box { 2 | top: 10em; 3 | } 4 | .right-box { 5 | top: 10em; 6 | } 7 | .row { 8 | line-height: 2; 9 | } 10 | .step.active { 11 | font-weight: bold; 12 | } 13 | /*# sourceMappingURL=createNode.css.map */ -------------------------------------------------------------------------------- /web/views/@default/clusters/cluster/settings/dns/@menu.html: -------------------------------------------------------------------------------- 1 | 2 | DNS设置 3 | 解析记录 4 | 5 | -------------------------------------------------------------------------------- /web/views/@default/servers/certs/certPopup.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | // 打印缩进 3 | this.indent = function (index) { 4 | let indent = "" 5 | for (let i = 0; i < index; i++) { 6 | indent += "     " 7 | } 8 | return indent 9 | } 10 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/groups/group/settings/waf/ipadmin/provinces.less: -------------------------------------------------------------------------------- 1 | .province-list { 2 | .item { 3 | float: left; 4 | width: 12em; 5 | margin-bottom: 0.5em; 6 | 7 | .checkbox label { 8 | font-size: 12px !important; 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /web/public/codemirror/addon/search/matchesonscrollbar.css: -------------------------------------------------------------------------------- 1 | .CodeMirror-search-match { 2 | background: gold; 3 | border-top: 1px solid orange; 4 | border-bottom: 1px solid orange; 5 | -moz-box-sizing: border-box; 6 | box-sizing: border-box; 7 | opacity: .5; 8 | } 9 | -------------------------------------------------------------------------------- /web/views/@default/clusters/grants/@menu.html: -------------------------------------------------------------------------------- 1 | 2 | 认证列表 3 | | 4 | [创建认证] 5 | 6 | -------------------------------------------------------------------------------- /web/views/@default/servers/components/waf/ipadmin/index.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["index.less"],"names":[],"mappings":"AAAA,oBACC;EACC,4BAAA;EACA,6BAAA;;AAIF;EAaC,mBAAA;;AAbD,cACC,cACC;EACC,WAAA;EACA,WAAA;EACA,oBAAA;;AALH,cACC,cACC,MAKC,UAAU;EACT,0BAAA","file":"index.css"} -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/waf/ipadmin/selectProvincesPopup.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["selectProvincesPopup.less"],"names":[],"mappings":"AAAA,cACC;EACC,WAAA;EACA,WAAA;EACA,oBAAA;;AAJF,cACC,MAKC,UAAU;EACT,0BAAA;EACA,0BAAA","file":"selectProvincesPopup.css"} -------------------------------------------------------------------------------- /internal/tasks/task_sync_cluster_test.go: -------------------------------------------------------------------------------- 1 | package tasks 2 | 3 | import "testing" 4 | 5 | func TestSyncClusterTask_loop(t *testing.T) { 6 | task := NewSyncClusterTask() 7 | err := task.loop() 8 | if err != nil { 9 | t.Fatal(err) 10 | } 11 | t.Log("ok") 12 | } 13 | -------------------------------------------------------------------------------- /web/views/@default/clusters/cluster/installRemote.less: -------------------------------------------------------------------------------- 1 | .left-box { 2 | top: 10em; 3 | } 4 | 5 | .right-box { 6 | top: 10em; 7 | } 8 | 9 | h3 { 10 | position: relative; 11 | } 12 | 13 | h3 button { 14 | position: absolute; 15 | right: 1em; 16 | top: -0.2em; 17 | } -------------------------------------------------------------------------------- /web/views/@default/clusters/cluster/upgradeRemote.less: -------------------------------------------------------------------------------- 1 | .left-box { 2 | top: 10em; 3 | } 4 | 5 | .right-box { 6 | top: 10em; 7 | } 8 | 9 | h3 { 10 | position: relative; 11 | } 12 | 13 | h3 button { 14 | position: absolute; 15 | right: 1em; 16 | top: -0.2em; 17 | } -------------------------------------------------------------------------------- /web/views/@default/servers/components/cache/selectPopup.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.selectPolicy = function (cachePolicy) { 3 | NotifyPopup({ 4 | code: 200, 5 | data: { 6 | cachePolicy: cachePolicy 7 | }, 8 | message: "" 9 | }) 10 | } 11 | }) -------------------------------------------------------------------------------- /web/views/@default/ui/selectProvincesPopup.css: -------------------------------------------------------------------------------- 1 | .province-list .item { 2 | float: left; 3 | width: 12em; 4 | margin-bottom: 0.5em; 5 | } 6 | .province-list .item .checkbox label { 7 | font-size: 12px !important; 8 | } 9 | /*# sourceMappingURL=selectProvincesPopup.css.map */ -------------------------------------------------------------------------------- /internal/encrypt/method.go: -------------------------------------------------------------------------------- 1 | package encrypt 2 | 3 | type MethodInterface interface { 4 | // 初始化 5 | Init(key []byte, iv []byte) error 6 | 7 | // 加密 8 | Encrypt(src []byte) (dst []byte, err error) 9 | 10 | // 解密 11 | Decrypt(dst []byte) (src []byte, err error) 12 | } 13 | -------------------------------------------------------------------------------- /internal/web/actions/default/clusters/cluster/node/update_hook.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved. 2 | //go:build !plus 3 | 4 | package node 5 | 6 | func (this *UpdateAction) CanUpdateLevel(level int32) bool { 7 | return level <= 1 8 | } 9 | -------------------------------------------------------------------------------- /internal/web/actions/default/dashboard/index_ext.go: -------------------------------------------------------------------------------- 1 | // Copyright 2023 Liuxiangchao iwind.liu@gmail.com. All rights reserved. Official site: https://goedge.cn . 2 | //go:build !plus 3 | 4 | package dashboard 5 | 6 | func (this *IndexAction) checkPlus() bool { 7 | return false 8 | } 9 | -------------------------------------------------------------------------------- /web/views/@default/clusters/logs/index.less: -------------------------------------------------------------------------------- 1 | pre.log-box { 2 | margin: 0; 3 | padding: 0; 4 | } 5 | 6 | .search-keyword-label { 7 | a { 8 | opacity: 1!important; 9 | } 10 | 11 | span.small { 12 | font-size: 0.8em; 13 | color: #4183c4!important; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /web/views/@default/dashboard/index.css: -------------------------------------------------------------------------------- 1 | .ui.message a .icon { 2 | position: absolute; 3 | right: 1em; 4 | top: 2em; 5 | } 6 | .chart-box { 7 | height: 14em; 8 | } 9 | h4 span { 10 | font-size: 0.8em; 11 | color: grey; 12 | } 13 | /*# sourceMappingURL=index.css.map */ -------------------------------------------------------------------------------- /web/views/@default/servers/components/waf/ipadmin/provinces.css: -------------------------------------------------------------------------------- 1 | .province-list .item { 2 | float: left; 3 | width: 12em; 4 | margin-bottom: 0.5em; 5 | } 6 | .province-list .item .checkbox label { 7 | font-size: 12px !important; 8 | } 9 | /*# sourceMappingURL=provinces.css.map */ -------------------------------------------------------------------------------- /web/views/@default/servers/iplists/selectPopup.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.selectList = function (list) { 3 | NotifyPopup({ 4 | code: 200, 5 | data: { 6 | list: { 7 | id: list.id, 8 | name: list.name 9 | } 10 | } 11 | }) 12 | } 13 | }) -------------------------------------------------------------------------------- /internal/events/events.go: -------------------------------------------------------------------------------- 1 | package events 2 | 3 | type Event = string 4 | 5 | const ( 6 | EventStart Event = "start" // start loading 7 | EventQuit Event = "quit" // quit node gracefully 8 | 9 | EventSecurityConfigChanged Event = "securityConfigChanged" // 安全设置变更 10 | ) 11 | -------------------------------------------------------------------------------- /internal/web/actions/default/about/init.go: -------------------------------------------------------------------------------- 1 | package about 2 | 3 | import "github.com/iwind/TeaGo" 4 | 5 | func init() { 6 | TeaGo.BeforeStart(func(server *TeaGo.Server) { 7 | server. 8 | Prefix("/about"). 9 | Get("/qq", new(QqAction)). 10 | EndAll() 11 | }) 12 | } 13 | -------------------------------------------------------------------------------- /internal/web/actions/default/nodes/helper.go: -------------------------------------------------------------------------------- 1 | package nodes 2 | 3 | import ( 4 | "github.com/iwind/TeaGo/actions" 5 | ) 6 | 7 | type Helper struct { 8 | } 9 | 10 | func (this *Helper) BeforeAction(action *actions.ActionObject) { 11 | action.Data["teaMenu"] = "nodes" 12 | } 13 | -------------------------------------------------------------------------------- /web/views/@default/servers/components/waf/selectPopup.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.selectPolicy = function (firewallPolicy) { 3 | NotifyPopup({ 4 | code: 200, 5 | data: { 6 | firewallPolicy: firewallPolicy 7 | }, 8 | message: "" 9 | }) 10 | } 11 | }) -------------------------------------------------------------------------------- /internal/encrypt/magic_key_test.go: -------------------------------------------------------------------------------- 1 | package encrypt 2 | 3 | import "testing" 4 | 5 | func TestMagicKeyEncode(t *testing.T) { 6 | dst := MagicKeyEncode([]byte("Hello,World")) 7 | t.Log("dst:", string(dst)) 8 | 9 | src := MagicKeyDecode(dst) 10 | t.Log("src:", string(src)) 11 | } 12 | -------------------------------------------------------------------------------- /internal/goman/instance.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved. 2 | 3 | package goman 4 | 5 | import "time" 6 | 7 | type Instance struct { 8 | Id uint64 9 | CreatedTime time.Time 10 | File string 11 | Line int 12 | } 13 | -------------------------------------------------------------------------------- /internal/web/actions/default/csrf/init.go: -------------------------------------------------------------------------------- 1 | package csrf 2 | 3 | import "github.com/iwind/TeaGo" 4 | 5 | func init() { 6 | TeaGo.BeforeStart(func(server *TeaGo.Server) { 7 | server. 8 | Prefix("/csrf"). 9 | Get("/token", new(TokenAction)). 10 | EndAll() 11 | }) 12 | } 13 | -------------------------------------------------------------------------------- /internal/web/actions/default/logout/init.go: -------------------------------------------------------------------------------- 1 | package logout 2 | 3 | import "github.com/iwind/TeaGo" 4 | 5 | func init() { 6 | TeaGo.BeforeStart(func(server *TeaGo.Server) { 7 | server. 8 | Prefix("/logout"). 9 | Get("", new(IndexAction)). 10 | EndAll() 11 | }) 12 | } 13 | -------------------------------------------------------------------------------- /web/views/@default/servers/groups/group/settings/waf/ipadmin/provinces.css: -------------------------------------------------------------------------------- 1 | .province-list .item { 2 | float: left; 3 | width: 12em; 4 | margin-bottom: 0.5em; 5 | } 6 | .province-list .item .checkbox label { 7 | font-size: 12px !important; 8 | } 9 | /*# sourceMappingURL=provinces.css.map */ -------------------------------------------------------------------------------- /web/views/@default/ui/selectCountriesPopup.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["selectCountriesPopup.less"],"names":[],"mappings":"AAAA,oBACC;EACC,4BAAA;EACA,6BAAA;;AAIF;EAaC,mBAAA;;AAbD,cACC,cACC;EACC,WAAA;EACA,WAAA;EACA,oBAAA;;AALH,cACC,cACC,MAKC,UAAU;EACT,0BAAA","file":"selectCountriesPopup.css"} -------------------------------------------------------------------------------- /web/views/@default/users/update.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifySuccess("保存成功", "/users/user?userId=" + this.user.id) 3 | 4 | this.passwordEditing = false 5 | 6 | this.changePasswordEditing = function () { 7 | this.passwordEditing = !this.passwordEditing 8 | } 9 | }) -------------------------------------------------------------------------------- /internal/gen/generate_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved. 2 | 3 | package gen 4 | 5 | import "testing" 6 | 7 | func TestGenerate(t *testing.T) { 8 | err := Generate() 9 | if err != nil { 10 | t.Fatal(err) 11 | } 12 | t.Log("ok") 13 | } 14 | -------------------------------------------------------------------------------- /web/views/@default/servers/groups/group/settings/waf/ipadmin/countries.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["countries.less"],"names":[],"mappings":"AAAA,oBACC;EACC,4BAAA;EACA,6BAAA;;AAIF;EAaC,mBAAA;;AAbD,cACC,cACC;EACC,WAAA;EACA,WAAA;EACA,oBAAA;;AALH,cACC,cACC,MAKC,UAAU;EACT,0BAAA","file":"countries.css"} -------------------------------------------------------------------------------- /internal/web/actions/default/servers/certs/delete_ext.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved. Official site: https://goedge.cn . 2 | //go:build !plus 3 | 4 | package certs 5 | 6 | func (this *DeleteAction) filterDelete(certId int64) error { 7 | return nil 8 | } 9 | -------------------------------------------------------------------------------- /internal/web/actions/default/servers/certs/uploadBatchPopup_ext.go: -------------------------------------------------------------------------------- 1 | // Copyright 2023 Liuxiangchao iwind.liu@gmail.com. All rights reserved. Official site: https://goedge.cn . 2 | //go:build !plus 3 | 4 | package certs 5 | 6 | func (this *UploadBatchPopupAction) maxFiles() int { 7 | return 20 8 | } 9 | -------------------------------------------------------------------------------- /web/views/@default/clusters/grants/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.deleteGrant = function (grantId) { 3 | teaweb.confirm("确定要删除此认证吗?", function () { 4 | this.$post(".delete") 5 | .params({ 6 | "grantId": grantId 7 | }) 8 | .refresh(); 9 | }); 10 | }; 11 | }); -------------------------------------------------------------------------------- /web/views/@default/dashboard/index.less: -------------------------------------------------------------------------------- 1 | .ui.message { 2 | a { 3 | .icon { 4 | position: absolute; 5 | right: 1em; 6 | top: 2em; 7 | } 8 | } 9 | } 10 | 11 | .chart-box { 12 | height: 14em; 13 | } 14 | 15 | h4 { 16 | span { 17 | font-size: 0.8em; 18 | color: grey; 19 | } 20 | } -------------------------------------------------------------------------------- /web/views/@default/servers/certs/acme/create.less: -------------------------------------------------------------------------------- 1 | .button-group { 2 | margin-top: 4em; 3 | z-index: 1; 4 | 5 | .button.primary { 6 | float: right; 7 | } 8 | } 9 | 10 | .success-box { 11 | text-align: center; 12 | padding-top: 2em; 13 | 14 | p { 15 | font-size: 1.2em; 16 | } 17 | } -------------------------------------------------------------------------------- /web/views/@default/users/user.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.verify = function () { 3 | teaweb.popup(".verifyPopup?userId=" + this.user.id, { 4 | callback: function () { 5 | teaweb.success("保存成功", function () { 6 | teaweb.reload() 7 | }) 8 | } 9 | }) 10 | } 11 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/access/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | 4 | this.changeMethods = function (config) { 5 | Tea.action("$") 6 | .form(this.$refs.authForm) 7 | .post() 8 | teaweb.successRefresh("保存成功") 9 | } 10 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/waf/ipadmin/selectProvincesPopup.less: -------------------------------------------------------------------------------- 1 | .province-list { 2 | .item { 3 | float: left; 4 | width: 12em; 5 | margin-bottom: 0.5em; 6 | 7 | .checkbox label { 8 | font-size: 12px !important; 9 | cursor: pointer !important; 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /internal/web/actions/default/messages/helper.go: -------------------------------------------------------------------------------- 1 | package messages 2 | 3 | import "github.com/iwind/TeaGo/actions" 4 | 5 | type Helper struct { 6 | } 7 | 8 | func (this *Helper) BeforeAction(actionPtr actions.ActionWrapper) { 9 | action := actionPtr.Object() 10 | action.Data["teaMenu"] = "message" 11 | } -------------------------------------------------------------------------------- /web/public/js/components/common/second-menu.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 二级菜单 3 | */ 4 | Vue.component("second-menu", { 5 | template: ' \ 6 |
\ 7 | \ 10 |
\ 11 |
' 12 | }); -------------------------------------------------------------------------------- /web/views/@default/clusters/cluster/installRemote.css: -------------------------------------------------------------------------------- 1 | .left-box { 2 | top: 10em; 3 | } 4 | .right-box { 5 | top: 10em; 6 | } 7 | h3 { 8 | position: relative; 9 | } 10 | h3 button { 11 | position: absolute; 12 | right: 1em; 13 | top: -0.2em; 14 | } 15 | /*# sourceMappingURL=installRemote.css.map */ -------------------------------------------------------------------------------- /web/views/@default/clusters/cluster/upgradeRemote.css: -------------------------------------------------------------------------------- 1 | .left-box { 2 | top: 10em; 3 | } 4 | .right-box { 5 | top: 10em; 6 | } 7 | h3 { 8 | position: relative; 9 | } 10 | h3 button { 11 | position: absolute; 12 | right: 1em; 13 | top: -0.2em; 14 | } 15 | /*# sourceMappingURL=upgradeRemote.css.map */ -------------------------------------------------------------------------------- /web/views/@default/clusters/logs/index.css: -------------------------------------------------------------------------------- 1 | pre.log-box { 2 | margin: 0; 3 | padding: 0; 4 | } 5 | .search-keyword-label a { 6 | opacity: 1!important; 7 | } 8 | .search-keyword-label span.small { 9 | font-size: 0.8em; 10 | color: #4183c4 !important; 11 | } 12 | /*# sourceMappingURL=index.css.map */ -------------------------------------------------------------------------------- /web/views/@default/log/@menu.html: -------------------------------------------------------------------------------- 1 | 2 | 查询 3 | | 4 | 清理 5 | 设置 6 | -------------------------------------------------------------------------------- /web/views/@default/servers/components/cache/batch/tasks.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.deleteTask = function (taskId) { 3 | teaweb.confirm("确定要删除此任务吗?", function () { 4 | this.$post(".deleteTask") 5 | .params({ 6 | taskId: taskId 7 | }) 8 | .refresh() 9 | }) 10 | } 11 | }) -------------------------------------------------------------------------------- /internal/events/utils_test.go: -------------------------------------------------------------------------------- 1 | package events 2 | 3 | import "testing" 4 | 5 | func TestOn(t *testing.T) { 6 | On("hello", func() { 7 | t.Log("world") 8 | }) 9 | On("hello", func() { 10 | t.Log("world2") 11 | }) 12 | On("hello2", func() { 13 | t.Log("world2") 14 | }) 15 | Notify("hello") 16 | } 17 | -------------------------------------------------------------------------------- /internal/utils/exec/look_others.go: -------------------------------------------------------------------------------- 1 | // Copyright 2023 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn . 2 | //go:build !linux 3 | 4 | package executils 5 | 6 | import "os/exec" 7 | 8 | func LookPath(file string) (string, error) { 9 | return exec.LookPath(file) 10 | } 11 | -------------------------------------------------------------------------------- /internal/web/actions/default/login/init.go: -------------------------------------------------------------------------------- 1 | package login 2 | 3 | import ( 4 | "github.com/iwind/TeaGo" 5 | ) 6 | 7 | func init() { 8 | TeaGo.BeforeStart(func(server *TeaGo.Server) { 9 | server. 10 | Prefix("/login"). 11 | GetPost("/validate", new(ValidateAction)). 12 | EndAll() 13 | }) 14 | } 15 | -------------------------------------------------------------------------------- /web/public/js/components/common/inner-menu.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 二级菜单 3 | */ 4 | Vue.component("inner-menu", { 5 | template: ` 6 |
7 | 10 |
` 11 | }); -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/cache/createPopup.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyPopup 3 | this.cacheRef = null 4 | 5 | if (window.parent.UPDATING_CACHE_REF != null) { 6 | this.cacheRef = window.parent.UPDATING_CACHE_REF 7 | this.isReverse = this.cacheRef.isReverse 8 | } 9 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/locations/@menu.html: -------------------------------------------------------------------------------- 1 | 2 | 列表 3 | 创建 4 | -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/locations/access/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | 4 | this.changeMethods = function (config) { 5 | Tea.action("$") 6 | .form(this.$refs.authForm) 7 | .post() 8 | teaweb.successRefresh("保存成功") 9 | } 10 | }) -------------------------------------------------------------------------------- /web/views/@default/settings/server/updateHTTPPopup.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyPopup 3 | 4 | this.addresses = []; 5 | if (this.serverConfig != null && this.serverConfig.http != null && this.serverConfig.http.listen != null) { 6 | this.addresses = this.serverConfig.http.listen 7 | } 8 | }) -------------------------------------------------------------------------------- /internal/web/actions/default/settings/api/helper.go: -------------------------------------------------------------------------------- 1 | package api 2 | 3 | import ( 4 | "github.com/iwind/TeaGo/actions" 5 | ) 6 | 7 | type Helper struct { 8 | } 9 | 10 | func NewHelper() *Helper { 11 | return &Helper{} 12 | } 13 | 14 | func (this *Helper) BeforeAction(action *actions.ActionObject) { 15 | } 16 | -------------------------------------------------------------------------------- /web/views/@default/servers/groups/group/settings/cache/createPopup.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyPopup 3 | this.cacheRef = null 4 | 5 | if (window.parent.UPDATING_CACHE_REF != null) { 6 | this.cacheRef = window.parent.UPDATING_CACHE_REF 7 | this.isReverse = this.cacheRef.isReverse 8 | } 9 | }) -------------------------------------------------------------------------------- /web/views/@default/settings/server/updateHTTPSPopup.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyPopup 3 | 4 | this.addresses = []; 5 | if (this.serverConfig != null && this.serverConfig.https != null && this.serverConfig.https.listen != null) { 6 | this.addresses = this.serverConfig.https.listen 7 | } 8 | }) -------------------------------------------------------------------------------- /internal/ttlcache/utils_test.go: -------------------------------------------------------------------------------- 1 | package ttlcache 2 | 3 | import ( 4 | "runtime" 5 | "testing" 6 | ) 7 | 8 | func BenchmarkHashKey(b *testing.B) { 9 | runtime.GOMAXPROCS(1) 10 | for i := 0; i < b.N; i++ { 11 | HashKey([]byte("HELLO,WORLDHELLO,WORLDHELLO,WORLDHELLO,WORLDHELLO,WORLDHELLO,WORLD")) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /web/public/js/components/common/first-menu.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 一级菜单 3 | */ 4 | Vue.component("first-menu", { 5 | props: [], 6 | template: ' \ 7 |
\ 8 | \ 11 |
\ 12 |
' 13 | }); -------------------------------------------------------------------------------- /web/views/@default/servers/components/waf/ipadmin/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = function () { 3 | teaweb.success("保存成功", function () { 4 | teaweb.reload() 5 | }) 6 | } 7 | 8 | this.changeAllowedCountries = function (event) { 9 | this.allowedCountries = event.countries 10 | } 11 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/components/waf/policy.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.upgradeTemplate = function () { 3 | teaweb.confirm("确定要加入这些新规则吗?", function () { 4 | this.$post(".upgradeTemplate") 5 | .params({ 6 | policyId: this.firewallPolicy.id 7 | }) 8 | .refresh() 9 | }) 10 | } 11 | }) -------------------------------------------------------------------------------- /internal/configloaders/admin_module_test.go: -------------------------------------------------------------------------------- 1 | package configloaders 2 | 3 | import ( 4 | "github.com/iwind/TeaGo/logs" 5 | "testing" 6 | ) 7 | 8 | func TestLoadAdminModuleMapping(t *testing.T) { 9 | m, err := loadAdminModuleMapping() 10 | if err != nil { 11 | t.Fatal(err) 12 | } 13 | logs.PrintAsJSON(m, t) 14 | } 15 | -------------------------------------------------------------------------------- /web/views/@default/clusters/cluster/settings/services/@menu.html: -------------------------------------------------------------------------------- 1 | 2 | 设置 3 | 状态 4 | -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/waf/ipadmin/countries.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = function () { 3 | teaweb.success("保存成功", function () { 4 | teaweb.reload() 5 | }) 6 | } 7 | 8 | this.changeAllowedCountries = function (event) { 9 | this.allowedCountries = event.countries 10 | } 11 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/waf/ipadmin/provinces.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = function () { 3 | teaweb.success("保存成功", function () { 4 | teaweb.reload() 5 | }) 6 | } 7 | 8 | this.changeAllowedProvinces = function (event) { 9 | this.allowedProvinces = event.provinces 10 | } 11 | }) -------------------------------------------------------------------------------- /web/views/@default/settings/transfer/index.css: -------------------------------------------------------------------------------- 1 | .steps .step.active .content { 2 | font-weight: bold; 3 | } 4 | .step-box .button-group { 5 | margin-top: 1em; 6 | } 7 | .step-box .button-group .next { 8 | float: right; 9 | } 10 | .step-box .content { 11 | min-height: 6em; 12 | } 13 | /*# sourceMappingURL=index.css.map */ -------------------------------------------------------------------------------- /web/views/@default/settings/transfer/index.less: -------------------------------------------------------------------------------- 1 | .steps { 2 | .step.active { 3 | .content { 4 | font-weight: bold; 5 | } 6 | } 7 | } 8 | 9 | .step-box { 10 | .button-group { 11 | margin-top: 1em; 12 | 13 | .next { 14 | float: right; 15 | } 16 | } 17 | 18 | .content { 19 | min-height: 6em; 20 | } 21 | } -------------------------------------------------------------------------------- /internal/tasks/task_sync_api_nodes_test.go: -------------------------------------------------------------------------------- 1 | package tasks 2 | 3 | import ( 4 | _ "github.com/iwind/TeaGo/bootstrap" 5 | "testing" 6 | ) 7 | 8 | func TestSyncAPINodesTask_Loop(t *testing.T) { 9 | task := NewSyncAPINodesTask() 10 | err := task.Loop() 11 | if err != nil { 12 | t.Fatal(err) 13 | } 14 | t.Log("ok") 15 | } 16 | -------------------------------------------------------------------------------- /internal/web/actions/default/clusters/cluster/createBatch_ext.go: -------------------------------------------------------------------------------- 1 | // Copyright 2023 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn . 2 | //go:build !plus 3 | 4 | package cluster 5 | 6 | func (this *CreateBatchAction) findNodesQuota() (maxNodes int32, leftNodes int32, err error) { 7 | return 8 | } 9 | -------------------------------------------------------------------------------- /internal/web/actions/default/clusters/cluster/createNode_ext.go: -------------------------------------------------------------------------------- 1 | // Copyright 2023 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn . 2 | //go:build !plus 3 | 4 | package cluster 5 | 6 | func (this *CreateNodeAction) findNodesQuota() (maxNodes int32, leftNodes int32, err error) { 7 | return 8 | } 9 | -------------------------------------------------------------------------------- /internal/web/actions/default/servers/server/settings/https/index_ext.go: -------------------------------------------------------------------------------- 1 | // Copyright 2023 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn . 2 | //go:build !plus 3 | 4 | package https 5 | 6 | func (this *IndexAction) checkSupportsHTTP3(clusterId int64) (bool, error) { 7 | return false, nil 8 | } 9 | -------------------------------------------------------------------------------- /internal/web/actions/default/setup/confirm/init.go: -------------------------------------------------------------------------------- 1 | package confirm 2 | 3 | import "github.com/iwind/TeaGo" 4 | 5 | func init() { 6 | TeaGo.BeforeStart(func(server *TeaGo.Server) { 7 | server. 8 | Helper(new(Helper)). 9 | Prefix("/setup/confirm"). 10 | GetPost("", new(IndexAction)). 11 | EndAll() 12 | }) 13 | } 14 | -------------------------------------------------------------------------------- /web/views/@default/servers/components/waf/ipadmin/provinces.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = function () { 3 | teaweb.success("保存成功", function () { 4 | teaweb.reload() 5 | }) 6 | } 7 | 8 | 9 | this.changeAllowedProvinces = function (event) { 10 | this.allowedProvinces = event.provinces 11 | } 12 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/cache/@menu.html: -------------------------------------------------------------------------------- 1 | 2 | 设置 3 | 刷新 4 | 预热 5 | -------------------------------------------------------------------------------- /web/views/@default/servers/server/stat/waf.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["waf.less"],"names":[],"mappings":"AAAA;EACC,0BAAA;EACA,2BAAA;;AAFD,KAIC;EACC,kBAAA;EACA,4BAAA;;AANF,KAIC,QAIC,IAAG;EACF,iBAAA;;AATH,KAIC,QAIC,IAAG,MAGF;EACC,cAAA;EACA,mBAAA;;AAbJ,KAkBC,QAAO;EACN,eAAA;;AAIF;EACC,YAAA;;AAGD,EAAG;EACF,gBAAA;EACA,gBAAA","file":"waf.css"} -------------------------------------------------------------------------------- /web/views/@default/servers/groups/group/settings/cache/@menu.html: -------------------------------------------------------------------------------- 1 | 2 | 设置 3 | 刷新 4 | 预热 5 | -------------------------------------------------------------------------------- /web/views/@default/servers/groups/group/settings/waf/ipadmin/countries.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = function () { 3 | teaweb.success("保存成功", function () { 4 | teaweb.reload() 5 | }) 6 | } 7 | 8 | this.changeAllowedCountries = function (event) { 9 | this.allowedCountries = event.countries 10 | } 11 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/groups/group/settings/waf/ipadmin/provinces.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = function () { 3 | teaweb.success("保存成功", function () { 4 | teaweb.reload() 5 | }) 6 | } 7 | 8 | this.changeAllowedProvinces = function (event) { 9 | this.allowedProvinces = event.provinces 10 | } 11 | }) -------------------------------------------------------------------------------- /web/views/@default/setup/mysql/installPopup.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["installPopup.less"],"names":[],"mappings":"AAAA;EACC,mBAAA;;AAGD,EAAE;EACD,WAAA;;AAGD,WACC;EACC,gBAAA;;AAFF,WAKC;EACC,eAAA;;AAIF;EACC,gBAAA;EACA,gBAAA;;AAFD,SAIC;EACC,gBAAA;;AAIF,SAAS;EACR,UAAA;;AAGD;EACC,8BAAA;;AAGD;EACC,cAAA;;AAGD;EACC,cAAA","file":"installPopup.css"} -------------------------------------------------------------------------------- /internal/web/actions/default/settings/helper.go: -------------------------------------------------------------------------------- 1 | package settings 2 | 3 | import "github.com/iwind/TeaGo/actions" 4 | 5 | type Helper struct { 6 | } 7 | 8 | func NewHelper() *Helper { 9 | return &Helper{} 10 | } 11 | 12 | func (this *Helper) BeforeAction(action *actions.ActionObject) { 13 | action.Data["teaMenu"] = "settings" 14 | } 15 | -------------------------------------------------------------------------------- /internal/web/helpers/utils_none_gcc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2024 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn . 2 | //go:build !gcc 3 | 4 | package helpers 5 | 6 | import ( 7 | "net/http" 8 | ) 9 | 10 | // filter request 11 | func safeFilterRequest(req *http.Request) bool { 12 | return true 13 | } 14 | -------------------------------------------------------------------------------- /web/public/js/components/common/labeled-input.js: -------------------------------------------------------------------------------- 1 | Vue.component("labeled-input", { 2 | props: ["name", "size", "maxlength", "label", "value"], 3 | template: '
\ 4 | \ 5 | {{label}}\ 6 |
' 7 | }); -------------------------------------------------------------------------------- /web/public/js/components/common/not-found-box.js: -------------------------------------------------------------------------------- 1 | Vue.component("not-found-box", { 2 | props: ["message"], 3 | template: `
4 |
5 |

{{message}}

6 |
` 7 | }) -------------------------------------------------------------------------------- /web/views/@default/dns/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.updateCluster = function (clusterId) { 3 | teaweb.popup("/dns/updateClusterPopup?clusterId=" + clusterId, { 4 | height: "25em", 5 | callback: function () { 6 | teaweb.success("保存成功", function () { 7 | teaweb.reload() 8 | }) 9 | } 10 | }) 11 | } 12 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/certs/acme/create.css: -------------------------------------------------------------------------------- 1 | .button-group { 2 | margin-top: 4em; 3 | z-index: 1; 4 | } 5 | .button-group .button.primary { 6 | float: right; 7 | } 8 | .success-box { 9 | text-align: center; 10 | padding-top: 2em; 11 | } 12 | .success-box p { 13 | font-size: 1.2em; 14 | } 15 | /*# sourceMappingURL=create.css.map */ -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/waf/ipadmin/selectProvincesPopup.css: -------------------------------------------------------------------------------- 1 | .province-list .item { 2 | float: left; 3 | width: 12em; 4 | margin-bottom: 0.5em; 5 | } 6 | .province-list .item .checkbox label { 7 | font-size: 12px !important; 8 | cursor: pointer !important; 9 | } 10 | /*# sourceMappingURL=selectProvincesPopup.css.map */ -------------------------------------------------------------------------------- /internal/web/actions/actionutils/action_interface.go: -------------------------------------------------------------------------------- 1 | package actionutils 2 | 3 | import ( 4 | "context" 5 | "github.com/TeaOSLab/EdgeAdmin/internal/rpc" 6 | "github.com/iwind/TeaGo/maps" 7 | ) 8 | 9 | type ActionInterface interface { 10 | RPC() *rpc.RPCClient 11 | 12 | AdminContext() context.Context 13 | 14 | ViewData() maps.Map 15 | } 16 | -------------------------------------------------------------------------------- /web/views/@default/servers/create.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["create.less"],"names":[],"mappings":"AAAA,WACC;EACC,aAAA;;AAIF,MAAO;EACN,6BAAA;;AAGD,WACC;EACC,WAAA;EACA,kBAAA;EACA,iBAAA;;AAIF,mBAAsC;EACrC;IACC,aAAA;;EADD,WAGC,WAAU;IACT,UAAA;IACA,WAAA;;EALF,WAQC,WAAU;IACT,UAAA;IACA,WAAA;IACA,gBAAA;IACA,YAAA;;EAZF,WAeC,WAAU,MAAM;IACf,UAAA","file":"create.css"} -------------------------------------------------------------------------------- /internal/web/actions/default/servers/helper.go: -------------------------------------------------------------------------------- 1 | package servers 2 | 3 | import ( 4 | "github.com/iwind/TeaGo/actions" 5 | ) 6 | 7 | type Helper struct { 8 | } 9 | 10 | func NewHelper() *Helper { 11 | return &Helper{} 12 | } 13 | 14 | func (this *Helper) BeforeAction(action *actions.ActionObject) { 15 | action.Data["teaMenu"] = "servers" 16 | } 17 | -------------------------------------------------------------------------------- /web/views/@default/dns/issues/updateNodePopup.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.syncDomain = function (domainId) { 3 | this.$post(".syncDomain") 4 | .params({ 5 | domainId: domainId 6 | }) 7 | .success(function () { 8 | teaweb.success("从服务商获取线路成功", function () { 9 | window.location.reload() 10 | }) 11 | }) 12 | } 13 | }) -------------------------------------------------------------------------------- /web/views/@default/clusters/createNode.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.clusterId = 0 3 | 4 | this.changeCluster = function(clusterId) { 5 | this.clusterId = clusterId 6 | } 7 | 8 | this.goNext = function () { 9 | if (this.clusterId > 0) { 10 | window.location = "/clusters/cluster/createNode?clusterId=" + this.clusterId 11 | } 12 | } 13 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/certs/certPopup.less: -------------------------------------------------------------------------------- 1 | .pre-box { 2 | padding: 1em; 3 | margin: 0; 4 | line-height: 1.7; 5 | -ms-word-break: break-all; 6 | word-break: break-all; 7 | font-size: 0.9em; 8 | background: rgba(0, 0, 0, 0.05); 9 | overflow-y: auto; 10 | max-height: 20em; 11 | } 12 | 13 | .pre-box::-webkit-scrollbar { 14 | width: 6px; 15 | } 16 | -------------------------------------------------------------------------------- /web/views/@default/servers/iplists/import.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = function (resp) { 3 | let message = "成功导入" + resp.data.count + "个IP" 4 | if (resp.data.countIgnore > 0) { 5 | message += ",并忽略" + resp.data.countIgnore + "个格式错误的IP" 6 | } 7 | teaweb.success(message, function () { 8 | teaweb.reload() 9 | }) 10 | } 11 | }) -------------------------------------------------------------------------------- /internal/web/actions/default/about/qq.go: -------------------------------------------------------------------------------- 1 | package about 2 | 3 | import "github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils" 4 | 5 | type QqAction struct { 6 | actionutils.ParentAction 7 | } 8 | 9 | func (this *QqAction) Init() { 10 | this.Nav("", "", "") 11 | } 12 | 13 | func (this *QqAction) RunGet(params struct{}) { 14 | this.Show() 15 | } 16 | -------------------------------------------------------------------------------- /web/public/js/components/common/page-box.js: -------------------------------------------------------------------------------- 1 | Vue.component("page-box", { 2 | data: function () { 3 | return { 4 | page: "" 5 | } 6 | }, 7 | created: function () { 8 | let that = this; 9 | setTimeout(function () { 10 | that.page = Tea.Vue.page; 11 | }) 12 | }, 13 | template: `
14 |
15 |
` 16 | }) -------------------------------------------------------------------------------- /web/views/@default/clusters/cluster/node/updateDNSPopup.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.syncDomain = function (domainId) { 3 | this.$post(".syncDomain") 4 | .params({ 5 | domainId: domainId 6 | }) 7 | .success(function () { 8 | teaweb.success("从服务商获取线路成功", function () { 9 | window.location.reload() 10 | }) 11 | }) 12 | } 13 | }) -------------------------------------------------------------------------------- /internal/utils/dateutils/utils.go: -------------------------------------------------------------------------------- 1 | // Copyright 2023 Liuxiangchao iwind.liu@gmail.com. All rights reserved. Official site: https://goedge.cn . 2 | 3 | package dateutils 4 | 5 | // SplitYmd 分隔Ymd格式的日期 6 | // Ymd => Y-m-d 7 | func SplitYmd(day string) string { 8 | if len(day) != 8 { 9 | return day 10 | } 11 | return day[:4] + "-" + day[4:6] + "-" + day[6:] 12 | } 13 | -------------------------------------------------------------------------------- /internal/utils/service_test.go: -------------------------------------------------------------------------------- 1 | package utils 2 | 3 | import ( 4 | teaconst "github.com/TeaOSLab/EdgeAdmin/internal/const" 5 | "testing" 6 | ) 7 | 8 | func TestServiceManager_Log(t *testing.T) { 9 | manager := NewServiceManager(teaconst.ProductName, teaconst.ProductName+" Server") 10 | manager.Log("Hello, World") 11 | manager.LogError("Hello, World") 12 | } 13 | -------------------------------------------------------------------------------- /internal/web/actions/default/dns/helper.go: -------------------------------------------------------------------------------- 1 | package dns 2 | 3 | import ( 4 | "github.com/iwind/TeaGo/actions" 5 | "net/http" 6 | ) 7 | 8 | type Helper struct { 9 | } 10 | 11 | func (this *Helper) BeforeAction(action *actions.ActionObject) { 12 | if action.Request.Method != http.MethodGet { 13 | return 14 | } 15 | 16 | action.Data["teaMenu"] = "dns" 17 | } 18 | -------------------------------------------------------------------------------- /internal/web/actions/default/log/helper.go: -------------------------------------------------------------------------------- 1 | package log 2 | 3 | import ( 4 | "github.com/iwind/TeaGo/actions" 5 | "net/http" 6 | ) 7 | 8 | type Helper struct { 9 | } 10 | 11 | func (this *Helper) BeforeAction(action *actions.ActionObject) { 12 | if action.Request.Method != http.MethodGet { 13 | return 14 | } 15 | 16 | action.Data["teaMenu"] = "log" 17 | } 18 | -------------------------------------------------------------------------------- /web/views/@default/servers/certs/uploadPopup.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyPopup 3 | this.isCA = 0 4 | this.textMode = false 5 | 6 | this.switchTextMode = function () { 7 | this.textMode = !this.textMode 8 | if (this.textMode) { 9 | this.$delay(function () { 10 | this.$refs.certTextField.focus() 11 | }) 12 | } 13 | } 14 | }) -------------------------------------------------------------------------------- /web/views/@default/@datepicker.html: -------------------------------------------------------------------------------- 1 | {$var "header"} 2 | 3 | 4 | 5 | 6 | 7 | 8 | {$end} -------------------------------------------------------------------------------- /web/views/@default/clusters/cluster/settings/health/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | 4 | this.run = function () { 5 | teaweb.confirm("确定要对当前集群下的所有节点进行健康检查吗?", function () { 6 | teaweb.popup("/clusters/cluster/settings/health/runPopup?clusterId=" + this.clusterId, { 7 | height: "30em" 8 | }) 9 | }) 10 | } 11 | }) -------------------------------------------------------------------------------- /web/views/@default/clusters/grants/selectPopup.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["selectPopup.less"],"names":[],"mappings":"AAAA;EACC,eAAA;;AAGD;EACC,WAAA;EACA,WAAA;EACA,aAAA;EACA,kBAAA;EACA,gBAAA;EACA,mBAAA;EACA,sBAAA;EACA,oBAAA;EACA,oBAAA;EACA,gBAAA;EACA,eAAA;;AAXD,UAaC;EACC,gBAAA;;AAdF,UAiBC,IAAG;EACF,iBAAA;;AAlBF,UAiBC,IAAG,OAGF;EACC,gBAAA;;AAKH,UAAU;EACT,UAAA","file":"selectPopup.css"} -------------------------------------------------------------------------------- /web/views/@default/db/node.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.$delay(function () { 3 | this.loadStatus(this.node.id) 4 | }) 5 | 6 | this.status = null 7 | this.loadStatus = function (nodeId) { 8 | this.$post(".status") 9 | .params({ 10 | nodeId: nodeId 11 | }) 12 | .success(function (resp) { 13 | this.status = resp.data.status 14 | }) 15 | } 16 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/components/cache/batch/@menu.html: -------------------------------------------------------------------------------- 1 | 2 | 刷新缓存 3 | 预热缓存 4 | | 5 | 所有任务({{countDoingTasks}}) 6 | -------------------------------------------------------------------------------- /internal/web/actions/default/servers/update.go: -------------------------------------------------------------------------------- 1 | package servers 2 | 3 | import "github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils" 4 | 5 | type UpdateAction struct { 6 | actionutils.ParentAction 7 | } 8 | 9 | func (this *UpdateAction) Init() { 10 | this.Nav("", "", "") 11 | } 12 | 13 | func (this *UpdateAction) RunGet(params struct{}) { 14 | this.Show() 15 | } 16 | -------------------------------------------------------------------------------- /internal/web/actions/default/settings/backup/index.go: -------------------------------------------------------------------------------- 1 | package backup 2 | 3 | import "github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils" 4 | 5 | type IndexAction struct { 6 | actionutils.ParentAction 7 | } 8 | 9 | func (this *IndexAction) Init() { 10 | this.Nav("", "", "") 11 | } 12 | 13 | func (this *IndexAction) RunGet(params struct{}) { 14 | this.Show() 15 | } 16 | -------------------------------------------------------------------------------- /web/views/@default/servers/@menu.html: -------------------------------------------------------------------------------- 1 | 2 | 网站列表 3 | 审核中({{countAuditing}}) 4 | | 5 | [创建网站] 6 | -------------------------------------------------------------------------------- /web/views/@default/servers/groups/group/settings/httpReverseProxy/@menu.html: -------------------------------------------------------------------------------- 1 | 2 | 源站列表 3 | 调度算法 4 | 更多设置 5 | -------------------------------------------------------------------------------- /web/views/@default/servers/groups/group/settings/tcpReverseProxy/@menu.html: -------------------------------------------------------------------------------- 1 | 2 | 源站列表 3 | 调度算法 4 | 更多设置 5 | -------------------------------------------------------------------------------- /web/views/@default/servers/groups/group/settings/udpReverseProxy/@menu.html: -------------------------------------------------------------------------------- 1 | 2 | 源站列表 3 | 调度算法 4 | 更多设置 5 | -------------------------------------------------------------------------------- /internal/web/actions/default/servers/components/waf/test.go: -------------------------------------------------------------------------------- 1 | package waf 2 | 3 | import "github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils" 4 | 5 | type TestAction struct { 6 | actionutils.ParentAction 7 | } 8 | 9 | func (this *TestAction) Init() { 10 | this.Nav("", "", "test") 11 | } 12 | 13 | func (this *TestAction) RunGet(params struct{}) { 14 | this.Show() 15 | } 16 | -------------------------------------------------------------------------------- /internal/web/actions/default/settings/upgrade/index.go: -------------------------------------------------------------------------------- 1 | package upgrade 2 | 3 | import "github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils" 4 | 5 | type IndexAction struct { 6 | actionutils.ParentAction 7 | } 8 | 9 | func (this *IndexAction) Init() { 10 | this.Nav("", "", "") 11 | } 12 | 13 | func (this *IndexAction) RunGet(params struct{}) { 14 | this.Show() 15 | } 16 | -------------------------------------------------------------------------------- /web/public/js/components/common/network-addresses-view.js: -------------------------------------------------------------------------------- 1 | Vue.component("network-addresses-view", { 2 | props: ["v-addresses"], 3 | template: `
4 |
5 | {{addr.protocol}}://{{addr.host.quoteIP()}}*:{{addr.portRange}} 6 |
7 |
` 8 | }) -------------------------------------------------------------------------------- /internal/utils/service_others.go: -------------------------------------------------------------------------------- 1 | //go:build !linux && !windows 2 | 3 | package utils 4 | 5 | // 安装服务 6 | func (this *ServiceManager) Install(exePath string, args []string) error { 7 | return nil 8 | } 9 | 10 | // 启动服务 11 | func (this *ServiceManager) Start() error { 12 | return nil 13 | } 14 | 15 | // 删除服务 16 | func (this *ServiceManager) Uninstall() error { 17 | return nil 18 | } 19 | -------------------------------------------------------------------------------- /web/public/js/langs/en-us.less: -------------------------------------------------------------------------------- 1 | .main-menu, .left-box { 2 | .menu { 3 | .item { 4 | font-size: 0.95em; 5 | } 6 | 7 | .sub-items { 8 | .item { 9 | line-height: 1.4; 10 | } 11 | } 12 | } 13 | } 14 | 15 | .left-box { 16 | .menu { 17 | .item { 18 | line-height: 1.4; 19 | padding-top: 0.2em !important; 20 | padding-bottom: 0.2em !important; 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /web/views/@default/clusters/nodes.less: -------------------------------------------------------------------------------- 1 | .table { 2 | th.value-column { 3 | width: 7em; 4 | } 5 | } 6 | 7 | .node-name-td { 8 | position: relative; 9 | 10 | .icon.setting { 11 | display: none; 12 | position: absolute; 13 | right: 1em; 14 | top: 50%; 15 | margin-top: -1em; 16 | } 17 | } 18 | 19 | .node-name-td:hover { 20 | .icon.setting { 21 | display: inline; 22 | } 23 | } -------------------------------------------------------------------------------- /web/views/@default/servers/certs/updatePopup.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyPopup 3 | this.isCA = this.certConfig.isCA ? 1 : 0 4 | this.textMode = false 5 | 6 | this.switchTextMode = function () { 7 | this.textMode = !this.textMode 8 | if (this.textMode) { 9 | this.$delay(function () { 10 | this.$refs.certTextField.focus() 11 | }) 12 | } 13 | } 14 | }) -------------------------------------------------------------------------------- /web/views/@default/setup/confirm/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.isRequesting = false 3 | 4 | this.success = function () { 5 | teaweb.success("完成确认,现在跳转到首页", function () { 6 | window.location = "/" 7 | }) 8 | } 9 | 10 | this.before = function () { 11 | this.isRequesting = true 12 | } 13 | 14 | this.done = function () { 15 | this.isRequesting = false 16 | } 17 | }) -------------------------------------------------------------------------------- /internal/web/actions/default/index/init.go: -------------------------------------------------------------------------------- 1 | package index 2 | 3 | import ( 4 | "github.com/iwind/TeaGo" 5 | ) 6 | 7 | func init() { 8 | TeaGo.BeforeStart(func(server *TeaGo.Server) { 9 | server. 10 | Prefix(""). 11 | GetPost("/", new(IndexAction)). 12 | GetPost("/index/otp", new(OtpAction)). 13 | GetPost("/initPassword", new(InitPasswordAction)). 14 | EndAll() 15 | }) 16 | } 17 | -------------------------------------------------------------------------------- /internal/web/actions/default/logout/index.go: -------------------------------------------------------------------------------- 1 | package logout 2 | 3 | import ( 4 | "github.com/TeaOSLab/EdgeAdmin/internal/web/helpers" 5 | "github.com/iwind/TeaGo/actions" 6 | ) 7 | 8 | type IndexAction actions.Action 9 | 10 | // 退出登录 11 | func (this *IndexAction) Run(params struct { 12 | Auth *helpers.UserShouldAuth 13 | }) { 14 | params.Auth.Logout() 15 | this.RedirectURL("/") 16 | } 17 | -------------------------------------------------------------------------------- /web/public/js/langs/en-us.css: -------------------------------------------------------------------------------- 1 | .main-menu .menu .item, 2 | .left-box .menu .item { 3 | font-size: 0.95em; 4 | } 5 | .main-menu .menu .sub-items .item, 6 | .left-box .menu .sub-items .item { 7 | line-height: 1.4; 8 | } 9 | .left-box .menu .item { 10 | line-height: 1.4; 11 | padding-top: 0.2em !important; 12 | padding-bottom: 0.2em !important; 13 | } 14 | /*# sourceMappingURL=en-us.css.map */ -------------------------------------------------------------------------------- /web/views/@default/clusters/grants/test.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.isRequesting = false 3 | this.resp = null 4 | 5 | this.success = function (resp) { 6 | this.resp = resp.data 7 | } 8 | 9 | this.requestBefore = function () { 10 | this.isRequesting = true 11 | this.resp = null 12 | } 13 | 14 | this.requestDone = function () { 15 | this.isRequesting = false 16 | } 17 | }) -------------------------------------------------------------------------------- /web/views/@default/clusters/index.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["index.less"],"names":[],"mappings":"AAAA;EACC,kBAAA;;AADD,gBAGC,MAAK;EACJ,aAAA;EACA,kBAAA;EACA,UAAA;EACA,QAAA;EACA,kBAAA;EACA,YAAA;;AATF,gBAYC,MAAK;EACJ,eAAA;;AAbF,gBAgBC,MAAK;EACJ,YAAA;;AAjBF,gBAoBC,MAAK;EACJ,aAAA;EACA,kBAAA;EACA,UAAA;EACA,QAAA;EACA,kBAAA;;AAIF,gBAAgB,MACf,MAAK;EACJ,eAAA;;AAFF,gBAAgB,MAIf,MAAK;EACJ,eAAA","file":"index.css"} -------------------------------------------------------------------------------- /web/views/@default/clusters/nodes.css: -------------------------------------------------------------------------------- 1 | .table th.value-column { 2 | width: 7em; 3 | } 4 | .node-name-td { 5 | position: relative; 6 | } 7 | .node-name-td .icon.setting { 8 | display: none; 9 | position: absolute; 10 | right: 1em; 11 | top: 50%; 12 | margin-top: -1em; 13 | } 14 | .node-name-td:hover .icon.setting { 15 | display: inline; 16 | } 17 | /*# sourceMappingURL=nodes.css.map */ -------------------------------------------------------------------------------- /web/views/@default/clusters/regions/nodes.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.updateNodeRegion = function (node) { 3 | let nodeId = node.id 4 | let regionId = (node.region ? node.region.id : 0) 5 | 6 | teaweb.popup(Tea.url(".updateNodeRegionPopup", { nodeId: nodeId, regionId: regionId }), { 7 | callback: function () { 8 | teaweb.successRefresh("保存成功") 9 | } 10 | }) 11 | } 12 | }) -------------------------------------------------------------------------------- /web/views/@default/login/validate.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | {$TEA.VUE} 7 | {$TEA.SEMANTIC} 8 | 9 | 10 | 11 |
12 | 13 |
14 | 15 | -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/redirects/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.change = function (values) { 3 | this.$post("$") 4 | .params({ 5 | webId: this.webId, 6 | hostRedirectsJSON: JSON.stringify(values) 7 | }) 8 | .success(function () { 9 | teaweb.successToast("保存成功", null, function () { 10 | teaweb.reload() 11 | }) 12 | }) 13 | } 14 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/reverseProxy/scheduling.html: -------------------------------------------------------------------------------- 1 | {$layout} 2 | {$template "../settings_menu"} 3 | {$template "/left_menu_with_menu"} 4 | 5 |
6 | {$template "menu"} 7 | 8 | 9 |
-------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/rewrite/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | // 创建重写规则 3 | this.createRewriteRule = function () { 4 | teaweb.popup("/servers/server/settings/rewrite/createPopup?webId=" + this.webId, { 5 | height: "26em", 6 | callback: function () { 7 | teaweb.success("保存成功", function () { 8 | teaweb.reload() 9 | }) 10 | } 11 | }) 12 | } 13 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/rewrite/updatePopup.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyPopup 3 | 4 | this.statusOptions = [ 5 | {"code": 301, "text": "Moved Permanently"}, 6 | {"code": 308, "text": "Permanent Redirect"}, 7 | {"code": 302, "text": "Found"}, 8 | {"code": 303, "text": "See Other"}, 9 | {"code": 307, "text": "Temporary Redirect"} 10 | ] 11 | }) -------------------------------------------------------------------------------- /internal/web/actions/default/files/init.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved. Official site: https://goedge.cn . 2 | 3 | package files 4 | 5 | import "github.com/iwind/TeaGo" 6 | 7 | func init() { 8 | TeaGo.BeforeStart(func(server *TeaGo.Server) { 9 | server. 10 | Prefix("/files"). 11 | Get("/file", new(FileAction)). 12 | EndAll() 13 | }) 14 | } 15 | -------------------------------------------------------------------------------- /web/views/@default/servers/certs/certPopup.css: -------------------------------------------------------------------------------- 1 | .pre-box { 2 | padding: 1em; 3 | margin: 0; 4 | line-height: 1.7; 5 | -ms-word-break: break-all; 6 | word-break: break-all; 7 | font-size: 0.9em; 8 | background: rgba(0, 0, 0, 0.05); 9 | overflow-y: auto; 10 | max-height: 20em; 11 | } 12 | .pre-box::-webkit-scrollbar { 13 | width: 6px; 14 | } 15 | /*# sourceMappingURL=certPopup.css.map */ -------------------------------------------------------------------------------- /web/views/@default/servers/metrics/charts/createPopup.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.type = this.types[0].code 3 | this.typeDefinition = null 4 | 5 | this.$delay(function () { 6 | this.changeType() 7 | }) 8 | 9 | this.changeType = function () { 10 | let that = this 11 | this.typeDefinition = this.types.$find(function (k, v) { 12 | return v.code == that.type 13 | }) 14 | } 15 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/rewrite/index.html: -------------------------------------------------------------------------------- 1 | {$layout} 2 | {$template "../settings_menu"} 3 | {$template "/left_menu_with_menu"} 4 | 5 |
6 | 7 | [创建] 8 | 9 | 10 |
-------------------------------------------------------------------------------- /web/public/js/components/ns/ns-user-selector.js: -------------------------------------------------------------------------------- 1 | Vue.component("ns-user-selector", { 2 | props: ["v-user-id"], 3 | data: function () { 4 | return {} 5 | }, 6 | methods: { 7 | change: function (userId) { 8 | this.$emit("change", userId) 9 | } 10 | }, 11 | template: `
12 | 13 |
` 14 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/locations/rewrite/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | // 创建重写规则 3 | this.createRewriteRule = function () { 4 | teaweb.popup("/servers/server/settings/rewrite/createPopup?webId=" + this.webId, { 5 | height: "26em", 6 | callback: function () { 7 | teaweb.success("保存成功", function () { 8 | teaweb.reload() 9 | }) 10 | } 11 | }) 12 | } 13 | }) -------------------------------------------------------------------------------- /internal/web/actions/default/servers/components/log/index.go: -------------------------------------------------------------------------------- 1 | package log 2 | 3 | import ( 4 | "github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils" 5 | ) 6 | 7 | type IndexAction struct { 8 | actionutils.ParentAction 9 | } 10 | 11 | func (this *IndexAction) Init() { 12 | this.FirstMenu("index") 13 | } 14 | 15 | func (this *IndexAction) RunGet(params struct{}) { 16 | 17 | this.Show() 18 | } 19 | -------------------------------------------------------------------------------- /web/views/@default/index/index.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["index.less"],"names":[],"mappings":"AAAA;EACI,eAAA;EACA,QAAA;EACA,SAAA;EACA,OAAA;EACA,QAAA;;AAGJ;EACI,eAAA;EACA,WAAA;EACA,QAAA;EACA,SAAA;EACA,kBAAA;EACA,iBAAA;;AANJ,IAQC;EACC,kBAAA;EACA,yBAAA;;AAVF,IAaC;EACC,gBAAA;EACA,iBAAA;EACA,gBAAA;EACA,mBAAA;EACA,UAAA;;AAlBF,IAqBC;EACC,iBAAA;EACA,cAAA;EACA,WAAA;;AASD,mBALoC;EACjC;IACI,UAAA;IACA,iBAAA","file":"index.css"} -------------------------------------------------------------------------------- /internal/web/actions/default/servers/certs/acme/users/selectPopup.go: -------------------------------------------------------------------------------- 1 | package users 2 | 3 | import "github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils" 4 | 5 | type SelectPopupAction struct { 6 | actionutils.ParentAction 7 | } 8 | 9 | func (this *SelectPopupAction) Init() { 10 | this.Nav("", "", "") 11 | } 12 | 13 | func (this *SelectPopupAction) RunGet(params struct{}) { 14 | this.Show() 15 | } 16 | -------------------------------------------------------------------------------- /internal/web/actions/default/settings/index.go: -------------------------------------------------------------------------------- 1 | package settings 2 | 3 | import ( 4 | "github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils" 5 | ) 6 | 7 | type IndexAction struct { 8 | actionutils.ParentAction 9 | } 10 | 11 | func (this *IndexAction) Init() { 12 | this.Nav("", "", "") 13 | } 14 | 15 | func (this *IndexAction) RunGet(params struct{}) { 16 | this.RedirectURL("/settings/server") 17 | } 18 | -------------------------------------------------------------------------------- /web/public/js/components/plans/plan-user-selector.js: -------------------------------------------------------------------------------- 1 | Vue.component("plan-user-selector", { 2 | props: ["v-user-id"], 3 | data: function () { 4 | return {} 5 | }, 6 | methods: { 7 | change: function (userId) { 8 | this.$emit("change", userId) 9 | } 10 | }, 11 | template: `
12 | 13 |
` 14 | }) -------------------------------------------------------------------------------- /web/views/@default/clusters/create.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = function (resp) { 3 | teaweb.success("集群创建成功", function () { 4 | window.location = "/clusters/cluster/nodes?clusterId=" + resp.data.clusterId 5 | }) 6 | } 7 | 8 | this.domain = {id: 0, name: ""} 9 | this.changeDomain = function (domain) { 10 | this.domain.id = domain.id 11 | this.domain.name = domain.name 12 | } 13 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/metrics/charts/@chart_menu.html: -------------------------------------------------------------------------------- 1 | 2 | 图表列表 3 | | 4 | 详情"{{chart.name}}" 5 | 修改 6 | -------------------------------------------------------------------------------- /web/views/@default/servers/serverNamesPopup.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | let allServerNames = this.serverNames.$copy(); 3 | 4 | this.keyword = "" 5 | 6 | this.$delay(function () { 7 | let that = this 8 | this.$watch("keyword", function (keyword) { 9 | that.serverNames = allServerNames.$findAll(function (k, serverName) { 10 | return teaweb.match(serverName, keyword) 11 | }) 12 | }) 13 | }) 14 | }) -------------------------------------------------------------------------------- /internal/web/actions/default/recover/init.go: -------------------------------------------------------------------------------- 1 | package recovers 2 | 3 | import "github.com/iwind/TeaGo" 4 | 5 | func init() { 6 | TeaGo.BeforeStart(func(server *TeaGo.Server) { 7 | server. 8 | Helper(new(Helper)). 9 | Prefix("/recover"). 10 | Get("", new(IndexAction)). 11 | Post("/validateApi", new(ValidateApiAction)). 12 | Post("/updateHosts", new(UpdateHostsAction)). 13 | EndAll() 14 | }) 15 | } 16 | -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/headers/updateCORSPopup.html: -------------------------------------------------------------------------------- 1 | {$layout "layout_popup"} 2 | 3 |

CORS跨域设置

4 |
5 | 6 | 7 | 8 | 9 |
-------------------------------------------------------------------------------- /internal/utils/email.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved. Official site: https://goedge.cn . 2 | 3 | package utils 4 | 5 | import "regexp" 6 | 7 | var emailReg = regexp.MustCompile(`(?i)^[a-z\d]+([._+-]*[a-z\d]+)*@([a-z\d]+[a-z\d-]*[a-z\d]+\.)+[a-z\d]+$`) 8 | 9 | // ValidateEmail 校验电子邮箱格式 10 | func ValidateEmail(email string) bool { 11 | return emailReg.MatchString(email) 12 | } 13 | -------------------------------------------------------------------------------- /internal/web/actions/default/setup/helper.go: -------------------------------------------------------------------------------- 1 | package setup 2 | 3 | import ( 4 | "github.com/TeaOSLab/EdgeAdmin/internal/setup" 5 | "github.com/iwind/TeaGo/actions" 6 | ) 7 | 8 | type Helper struct { 9 | } 10 | 11 | func (this *Helper) BeforeAction(actionPtr actions.ActionWrapper) (goNext bool) { 12 | if setup.IsConfigured() { 13 | actionPtr.Object().RedirectURL("/") 14 | return false 15 | } 16 | return true 17 | } 18 | -------------------------------------------------------------------------------- /web/public/js/components/common/bits-var.js: -------------------------------------------------------------------------------- 1 | Vue.component("bits-var", { 2 | props: ["v-bits"], 3 | data: function () { 4 | let bits = this.vBits 5 | if (typeof bits != "number") { 6 | bits = 0 7 | } 8 | let format = teaweb.splitFormat(teaweb.formatBits(bits)) 9 | return { 10 | format: format 11 | } 12 | }, 13 | template:` 14 | {{format[0]}}{{format[1]}} 15 | ` 16 | }) -------------------------------------------------------------------------------- /web/public/js/components/finance/finance-user-selector.js: -------------------------------------------------------------------------------- 1 | Vue.component("finance-user-selector", { 2 | props: ["v-user-id"], 3 | data: function () { 4 | return {} 5 | }, 6 | methods: { 7 | change: function (userId) { 8 | this.$emit("change", userId) 9 | } 10 | }, 11 | template: `
12 | 13 |
` 14 | }) -------------------------------------------------------------------------------- /web/views/@default/clusters/cluster/node/settings/ddos-protection/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | this.checkResult = null 4 | 5 | this.$post(".status") 6 | .params({ 7 | nodeId: this.nodeId 8 | }) 9 | .success(function (resp) { 10 | let results = resp.data.results 11 | if (results.length > 0) { 12 | this.checkResult = results[0] 13 | } 14 | }) 15 | }) -------------------------------------------------------------------------------- /web/views/@default/clusters/cluster/nodes.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["nodes.less"],"names":[],"mappings":"AAAA,MACC,GAAE;EACD,UAAA;;AAFF,MAKC;EACC,oBAAA;;AAIF,CACC;EACC,iCAAA;;AAIF,WACC;EACC,kBAAA;EACA,aAAA;;AAIF,WAAW,UACV;EACC,eAAA;EACA,cAAA;;AAIF,WAAW,MACV;EACC,eAAA;;AAIF,CAAC;EACA,gBAAA;EACA,kBAAA;;AAGD;EACC,kBAAA;;AADD,aAGC,MAAK;EACJ,aAAA;EACA,kBAAA;EACA,UAAA;EACA,QAAA;EACA,gBAAA;;AAIF,aAAa,MACZ,MAAK;EACJ,eAAA","file":"nodes.css"} -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/waf/ipadmin/selectCountriesPopup.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["selectCountriesPopup.less"],"names":[],"mappings":"AAAA,oBACC;EACC,mBAAA;EACA,oBAAA;;AAHF,oBACC,MAIC;EACC,gBAAA;EACA,WAAA;;AAKH;EACC,gBAAA;EACA,gBAAA;;AAFD,eAIC;EACC,mBAAA;;AALF,eAIC,eAGC,cACC;EACC,WAAA;EACA,UAAA;EACA,oBAAA;;AAXJ,eAIC,eAGC,cACC,MAKC,UAAU;EACT,0BAAA;EACA,0BAAA;;AAOL,eAAe;EACd,UAAA","file":"selectCountriesPopup.css"} -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/web/createIndex.html: -------------------------------------------------------------------------------- 1 | {$layout "layout_popup"} 2 |

添加首页文件

3 |
4 | 5 | 6 | 7 | 8 | 9 |
首页文件名 *
10 | 11 |
-------------------------------------------------------------------------------- /web/views/@default/servers/serverNamesPopup.html: -------------------------------------------------------------------------------- 1 | {$layout "layout_popup"} 2 | 3 |

查看域名

4 | 5 |
6 | 7 |
8 | 9 |
10 | {{serverName}} 11 |
12 | -------------------------------------------------------------------------------- /internal/ttlcache/option.go: -------------------------------------------------------------------------------- 1 | package ttlcache 2 | 3 | type OptionInterface interface { 4 | } 5 | 6 | type PiecesOption struct { 7 | Count int 8 | } 9 | 10 | func NewPiecesOption(count int) *PiecesOption { 11 | return &PiecesOption{Count: count} 12 | } 13 | 14 | type MaxItemsOption struct { 15 | Count int 16 | } 17 | 18 | func NewMaxItemsOption(count int) *MaxItemsOption { 19 | return &MaxItemsOption{Count: count} 20 | } 21 | -------------------------------------------------------------------------------- /internal/web/actions/default/servers/server/settings/serverNames/index_ext.go: -------------------------------------------------------------------------------- 1 | // Copyright 2023 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn . 2 | //go:build !plus 3 | 4 | package serverNames 5 | 6 | import "github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs" 7 | 8 | func (this *IndexAction) checkPlan(serverId int64, serverNames []*serverconfigs.ServerNameConfig) { 9 | // stub 10 | } 11 | -------------------------------------------------------------------------------- /web/views/@default/clusters/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.latestVisible = false 3 | 4 | this.showLatest = function () { 5 | this.latestVisible = !this.latestVisible 6 | } 7 | 8 | this.pin = function (clusterId, isPinned) { 9 | this.$post(".pin") 10 | .params({ 11 | clusterId: clusterId, 12 | isPinned: isPinned 13 | }) 14 | .success(function () { 15 | teaweb.reload() 16 | }) 17 | } 18 | }) -------------------------------------------------------------------------------- /web/views/@default/index/initPassword.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["initPassword.less"],"names":[],"mappings":"AAAA;EACI,eAAA;EACA,QAAA;EACA,SAAA;EACA,OAAA;EACA,QAAA;;AAGJ;EACI,eAAA;EACA,WAAA;EACA,QAAA;EACA,SAAA;EACA,kBAAA;EACA,iBAAA;;AANJ,IAQC;EACC,kBAAA;EACA,yBAAA;;AAVF,IAaC;EACC,gBAAA;EACA,iBAAA;EACA,gBAAA;EACA,mBAAA;EACA,UAAA;;AAlBF,IAqBC;EACC,iBAAA;EACA,cAAA;EACA,WAAA;;AAIF,mBAAqC;EACjC;IACI,UAAA;IACA,iBAAA","file":"initPassword.css"} -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/headers/updateSetPopup.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.shouldReplace = this.headerConfig.shouldReplace 3 | this.statusList = [] 4 | if (this.headerConfig.status != null && this.headerConfig.status.codes != null) { 5 | this.statusList = this.headerConfig.status.codes 6 | } 7 | 8 | this.selectHeader = function (headerName) { 9 | this.headerConfig.name = headerName 10 | } 11 | }) -------------------------------------------------------------------------------- /web/views/@default/ui/selectCountriesPopup.less: -------------------------------------------------------------------------------- 1 | .region-letter-group { 2 | .item { 3 | padding-left: 1em !important; 4 | padding-right: 1em !important; 5 | } 6 | } 7 | 8 | .country-group { 9 | .country-list { 10 | .item { 11 | float: left; 12 | width: 12em; 13 | margin-bottom: 0.5em; 14 | 15 | .checkbox label { 16 | font-size: 12px !important; 17 | } 18 | } 19 | } 20 | 21 | padding-bottom: 1em; 22 | } -------------------------------------------------------------------------------- /internal/waf/injectionutils/libinjection/src/libinjection_xss.h: -------------------------------------------------------------------------------- 1 | #ifndef LIBINJECTION_XSS 2 | #define LIBINJECTION_XSS 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | /** 9 | * HEY THIS ISN'T DONE 10 | */ 11 | 12 | /* pull in size_t */ 13 | 14 | #include 15 | 16 | int libinjection_is_xss(const char* s, size_t len, int flags, int strictMode); 17 | 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | #endif 22 | -------------------------------------------------------------------------------- /web/public/js/components/common/bytes-var.js: -------------------------------------------------------------------------------- 1 | Vue.component("bytes-var", { 2 | props: ["v-bytes"], 3 | data: function () { 4 | let bytes = this.vBytes 5 | if (typeof bytes != "number") { 6 | bytes = 0 7 | } 8 | let format = teaweb.splitFormat(teaweb.formatBytes(bytes)) 9 | return { 10 | format: format 11 | } 12 | }, 13 | template:` 14 | {{format[0]}}{{format[1]}} 15 | ` 16 | }) -------------------------------------------------------------------------------- /web/public/js/components/common/size-capacity-view.js: -------------------------------------------------------------------------------- 1 | Vue.component("size-capacity-view", { 2 | props:["v-default-text", "v-value"], 3 | methods: { 4 | composeCapacity: function (capacity) { 5 | return teaweb.convertSizeCapacityToString(capacity) 6 | } 7 | }, 8 | template: `
9 | {{composeCapacity(vValue)}} 10 | {{vDefaultText}} 11 |
` 12 | }) -------------------------------------------------------------------------------- /web/views/@default/clusters/logs/@menu.html: -------------------------------------------------------------------------------- 1 | 2 | 所有 3 | 未读({{countUnreadLogs}}) 4 | 需修复({{countNeedFixLogs}}) 5 | -------------------------------------------------------------------------------- /web/views/@default/index/otp.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["otp.less"],"names":[],"mappings":"AAAA;EACI,eAAA;EACA,QAAA;EACA,SAAA;EACA,OAAA;EACA,QAAA;;AAGJ;EACI,eAAA;EACA,WAAA;EACA,QAAA;EACA,SAAA;EACA,kBAAA;EACA,iBAAA;;AANJ,IAQC;EACC,kBAAA;EACA,yBAAA;;AAVF,IAaC;EACC,gBAAA;EACA,iBAAA;EACA,gBAAA;EACA,mBAAA;EACA,UAAA;;AAlBF,IAqBC;EACC,iBAAA;EACA,cAAA;EACA,WAAA;;AAxBF,IA2BC;EACC,kBAAA;EACA,gBAAA;;AAIF,mBAAqC;EACjC;IACI,UAAA;IACA,iBAAA","file":"otp.css"} -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/locations/location/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | 4 | this.$delay(function () { 5 | this.changePatternType(this.type) 6 | }) 7 | 8 | this.selectedType = null 9 | 10 | this.changePatternType = function (type) { 11 | this.selectedType = this.patternTypes.$find(function (k, v) { 12 | return v.type == type; 13 | }) 14 | } 15 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/server/stat/@requests_menu.html: -------------------------------------------------------------------------------- 1 | 2 | 即时 3 | 按小时 4 | 按天 5 | 6 |
-------------------------------------------------------------------------------- /web/views/@default/settings/security/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | 4 | this.addDefaultClientIPHeaderNames = function (headerNames) { 5 | if (this.config.clientIPHeaderNames == null || this.config.clientIPHeaderNames.length == 0) { 6 | this.config.clientIPHeaderNames = headerNames 7 | } else { 8 | this.config.clientIPHeaderNames += " " + headerNames 9 | } 10 | } 11 | }) -------------------------------------------------------------------------------- /internal/utils/lookup_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved. 2 | 3 | package utils_test 4 | 5 | import ( 6 | "github.com/TeaOSLab/EdgeAdmin/internal/utils" 7 | "testing" 8 | ) 9 | 10 | func TestLookupCNAME(t *testing.T) { 11 | for _, domain := range []string{"www.yun4s.cn", "example.com"} { 12 | result, err := utils.LookupCNAME(domain) 13 | t.Log(domain, "=>", result, err) 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /internal/web/actions/default/servers/iplists/iplistutils/utils.go: -------------------------------------------------------------------------------- 1 | // Copyright 2024 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn . 2 | 3 | package iplistutils 4 | 5 | import "regexp" 6 | 7 | var ipListCodeRegexp = regexp.MustCompile(`^[a-zA-Z0-9_-]+$`) 8 | 9 | // ValidateIPListCode 校验IP名单代号格式 10 | func ValidateIPListCode(code string) bool { 11 | return ipListCodeRegexp.MatchString(code) 12 | } 13 | -------------------------------------------------------------------------------- /internal/web/actions/default/settings/advanced.go: -------------------------------------------------------------------------------- 1 | package settings 2 | 3 | import "github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils" 4 | 5 | type AdvancedAction struct { 6 | actionutils.ParentAction 7 | } 8 | 9 | func (this *AdvancedAction) Init() { 10 | this.Nav("", "", "") 11 | } 12 | 13 | func (this *AdvancedAction) RunGet(params struct{}) { 14 | // 跳转到高级设置的第一个Tab 15 | this.RedirectURL("/settings/database") 16 | } 17 | -------------------------------------------------------------------------------- /internal/web/actions/default/setup/confirm/helper.go: -------------------------------------------------------------------------------- 1 | package confirm 2 | 3 | import ( 4 | "github.com/TeaOSLab/EdgeAdmin/internal/setup" 5 | "github.com/iwind/TeaGo/actions" 6 | ) 7 | 8 | type Helper struct { 9 | } 10 | 11 | func (this *Helper) BeforeAction(actionPtr actions.ActionWrapper) (goNext bool) { 12 | if !setup.IsNewInstalled() { 13 | actionPtr.Object().RedirectURL("/") 14 | return false 15 | } 16 | return true 17 | } 18 | -------------------------------------------------------------------------------- /web/views/@default/servers/groups/group/settings/httpReverseProxy/scheduling.html: -------------------------------------------------------------------------------- 1 | {$layout} 2 | {$template "/servers/groups/group/menu"} 3 | {$template "/left_menu_without_menu"} 4 | 5 |
6 | {$template "menu"} 7 | 8 | 9 |
-------------------------------------------------------------------------------- /web/views/@default/servers/groups/group/settings/tcpReverseProxy/scheduling.html: -------------------------------------------------------------------------------- 1 | {$layout} 2 | {$template "/servers/groups/group/menu"} 3 | {$template "/left_menu_without_menu"} 4 | 5 |
6 | {$template "menu"} 7 | 8 | 9 |
-------------------------------------------------------------------------------- /web/views/@default/servers/groups/group/settings/udpReverseProxy/scheduling.html: -------------------------------------------------------------------------------- 1 | {$layout} 2 | {$template "/servers/groups/group/menu"} 3 | {$template "/left_menu_without_menu"} 4 | 5 |
6 | {$template "menu"} 7 | 8 | 9 |
-------------------------------------------------------------------------------- /web/views/@default/servers/server/delete/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.deleteServer = function (serverId) { 3 | teaweb.confirm("html:确定要删除当前网站吗?
请慎重操作,删除后无法恢复!", function () { 4 | this.$post("$") 5 | .params({ 6 | "serverId": serverId 7 | }) 8 | .success(function () { 9 | teaweb.success("删除成功", function () { 10 | window.location = "/servers" 11 | }) 12 | }) 13 | }) 14 | } 15 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/locations/create.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifySuccess("添加成功", "/servers/server/settings/locations?serverId=" + this.serverId) 3 | 4 | this.type = 1 5 | this.selectedType = this.patternTypes[0] 6 | 7 | 8 | this.changePatternType = function (type) { 9 | this.selectedType = this.patternTypes.$find(function (k, v) { 10 | return v.type == type; 11 | }) 12 | } 13 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/redirects/index.html: -------------------------------------------------------------------------------- 1 | {$layout} 2 | {$template "../settings_menu"} 3 | {$template "/left_menu_with_menu"} 4 | 5 |
6 |
7 | 8 | 9 |
10 |
-------------------------------------------------------------------------------- /internal/errors/error_test.go: -------------------------------------------------------------------------------- 1 | package errors 2 | 3 | import ( 4 | "errors" 5 | "testing" 6 | ) 7 | 8 | func TestNew(t *testing.T) { 9 | t.Log(New("hello")) 10 | t.Log(Wrap(errors.New("hello"))) 11 | t.Log(testError1()) 12 | t.Log(Wrap(testError1())) 13 | t.Log(Wrap(testError2())) 14 | } 15 | 16 | func testError1() error { 17 | return New("test error1") 18 | } 19 | 20 | func testError2() error { 21 | return Wrap(testError1()) 22 | } 23 | -------------------------------------------------------------------------------- /internal/web/actions/default/recover/helper.go: -------------------------------------------------------------------------------- 1 | package recovers 2 | 3 | import ( 4 | teaconst "github.com/TeaOSLab/EdgeAdmin/internal/const" 5 | "github.com/iwind/TeaGo/actions" 6 | ) 7 | 8 | type Helper struct { 9 | } 10 | 11 | func (this *Helper) BeforeAction(actionPtr actions.ActionWrapper) (goNext bool) { 12 | if !teaconst.IsRecoverMode { 13 | actionPtr.Object().RedirectURL("/") 14 | return false 15 | } 16 | return true 17 | } 18 | -------------------------------------------------------------------------------- /web/views/@default/servers/components/waf/ipadmin/index.less: -------------------------------------------------------------------------------- 1 | .region-letter-group { 2 | .item { 3 | padding-left: 1em !important; 4 | padding-right: 1em !important; 5 | } 6 | } 7 | 8 | .country-group { 9 | .country-list { 10 | .item { 11 | float: left; 12 | width: 12em; 13 | margin-bottom: 0.5em; 14 | 15 | .checkbox label { 16 | font-size: 12px !important; 17 | } 18 | } 19 | } 20 | 21 | padding-bottom: 1em; 22 | } -------------------------------------------------------------------------------- /web/views/@default/servers/groups/createPopup.html: -------------------------------------------------------------------------------- 1 | {$layout "layout_popup"} 2 | 3 |

创建分组

4 |
5 | 6 | 7 | 8 | 11 | 12 |
分组名称 * 9 | 10 |
13 | 14 |
-------------------------------------------------------------------------------- /internal/web/actions/default/settings/api/node/helper.go: -------------------------------------------------------------------------------- 1 | package node 2 | 3 | import ( 4 | "github.com/iwind/TeaGo/actions" 5 | "net/http" 6 | ) 7 | 8 | type Helper struct { 9 | } 10 | 11 | func NewHelper() *Helper { 12 | return &Helper{} 13 | } 14 | 15 | func (this *Helper) BeforeAction(action *actions.ActionObject) (goNext bool) { 16 | if action.Request.Method != http.MethodGet { 17 | return true 18 | } 19 | 20 | return true 21 | } 22 | -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/reverseProxy/@menu.html: -------------------------------------------------------------------------------- 1 | 2 | 源站列表 3 | 调度算法 4 | 更多设置 5 | -------------------------------------------------------------------------------- /web/views/@default/servers/certs/acme/accounts/createPopup.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.selectedProvider = null 3 | this.changeProvider = function () { 4 | if (this.providerCode.length == 0) { 5 | this.selectedProvider = null 6 | return 7 | } 8 | 9 | let that = this 10 | this.selectedProvider = this.providers.$find(function (k, v) { 11 | return v.code == that.providerCode 12 | }) 13 | } 14 | 15 | this.changeProvider() 16 | }) -------------------------------------------------------------------------------- /internal/web/actions/default/recover/index.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved. 2 | 3 | package recovers 4 | 5 | import "github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils" 6 | 7 | type IndexAction struct { 8 | actionutils.ParentAction 9 | } 10 | 11 | func (this *IndexAction) Init() { 12 | this.Nav("", "", "") 13 | } 14 | 15 | func (this *IndexAction) RunGet(params struct{}) { 16 | this.Show() 17 | } 18 | -------------------------------------------------------------------------------- /web/views/@default/servers/groups/group/settings/waf/ipadmin/countries.less: -------------------------------------------------------------------------------- 1 | .region-letter-group { 2 | .item { 3 | padding-left: 1em !important; 4 | padding-right: 1em !important; 5 | } 6 | } 7 | 8 | .country-group { 9 | .country-list { 10 | .item { 11 | float: left; 12 | width: 12em; 13 | margin-bottom: 0.5em; 14 | 15 | .checkbox label { 16 | font-size: 12px !important; 17 | } 18 | } 19 | } 20 | 21 | padding-bottom: 1em; 22 | } -------------------------------------------------------------------------------- /web/views/@default/clusters/cluster/delete.html: -------------------------------------------------------------------------------- 1 | {$layout} 2 | 3 | 4 | {{currentClusterName}} 5 | » 6 | 删除 7 | 8 | 9 |
10 | 11 |
-------------------------------------------------------------------------------- /internal/web/actions/default/setup/status.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved. 2 | 3 | package setup 4 | 5 | import "github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils" 6 | 7 | var currentStatusText = "" 8 | 9 | type StatusAction struct { 10 | actionutils.ParentAction 11 | } 12 | 13 | func (this *StatusAction) RunPost(params struct{}) { 14 | this.Data["statusText"] = currentStatusText 15 | this.Success() 16 | } 17 | -------------------------------------------------------------------------------- /web/views/@default/clusters/cluster/settings/@menu.html: -------------------------------------------------------------------------------- 1 | 2 | {{currentClusterName}} 3 | 4 | 集群设置 5 | 6 | "{{leftMenuActiveItem.name}}"设置 7 | -------------------------------------------------------------------------------- /web/views/@default/clusters/grants/@grant_menu.html: -------------------------------------------------------------------------------- 1 | 2 | 认证列表 3 | | 4 | {{grant.name}}详情 5 | 测试 6 | 修改 7 | 8 | -------------------------------------------------------------------------------- /web/views/@default/servers/components/waf/ipadmin/index.css: -------------------------------------------------------------------------------- 1 | .region-letter-group .item { 2 | padding-left: 1em !important; 3 | padding-right: 1em !important; 4 | } 5 | .country-group { 6 | padding-bottom: 1em; 7 | } 8 | .country-group .country-list .item { 9 | float: left; 10 | width: 12em; 11 | margin-bottom: 0.5em; 12 | } 13 | .country-group .country-list .item .checkbox label { 14 | font-size: 12px !important; 15 | } 16 | /*# sourceMappingURL=index.css.map */ -------------------------------------------------------------------------------- /web/views/@default/servers/index.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["index.less"],"names":[],"mappings":"AAAA,GAAG,QACF,MAAK;EACJ,kBAAA;EACA,UAAA;EACA,UAAA;;AAJF,GAAG,QAOF;EACC,kBAAA;;AAIF;EACC,gBAAA;EACA,gBAAA;;AAGD,cAAc;EACb,UAAA;;AAGD,mBACC;EACC,YAAA;;AAFF,mBAKC,UAAS;EACR,aAAA;;AAIF;EACC,kBAAA;;AADD,eAGC,MAAK;EACJ,aAAA;EACA,kBAAA;EACA,UAAA;EACA,QAAA;EACA,gBAAA;;AAIF,eAAe,MACd,MAAK;EACJ,eAAA;;AAIF,eACC;EACC,gBAAA;;AAFF,eACC,IAGC;EACC,gBAAA;;AAKH,MACC,GAAE;EACD,UAAA","file":"index.css"} -------------------------------------------------------------------------------- /internal/web/actions/default/dns/providers/provider_ext.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved. Official site: https://goedge.cn . 2 | //go:build !plus 3 | 4 | package providers 5 | 6 | import ( 7 | "github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb" 8 | "github.com/iwind/TeaGo/maps" 9 | ) 10 | 11 | func (this *ProviderAction) readEdgeDNS(provider *pb.DNSProvider, apiParams maps.Map) (maps.Map, error) { 12 | return maps.Map{}, nil 13 | } 14 | -------------------------------------------------------------------------------- /web/views/@default/settings/profile/index.html: -------------------------------------------------------------------------------- 1 | {$layout} 2 | 3 |
4 | 5 |
6 | 7 | 8 | 9 | 12 | 13 |
你的姓名 * 10 | 11 |
14 | 15 |
-------------------------------------------------------------------------------- /web/views/@default/ui/selectCountriesPopup.css: -------------------------------------------------------------------------------- 1 | .region-letter-group .item { 2 | padding-left: 1em !important; 3 | padding-right: 1em !important; 4 | } 5 | .country-group { 6 | padding-bottom: 1em; 7 | } 8 | .country-group .country-list .item { 9 | float: left; 10 | width: 12em; 11 | margin-bottom: 0.5em; 12 | } 13 | .country-group .country-list .item .checkbox label { 14 | font-size: 12px !important; 15 | } 16 | /*# sourceMappingURL=selectCountriesPopup.css.map */ -------------------------------------------------------------------------------- /internal/web/actions/default/settings/transfer/index.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved. 2 | 3 | package transfer 4 | 5 | import "github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils" 6 | 7 | type IndexAction struct { 8 | actionutils.ParentAction 9 | } 10 | 11 | func (this *IndexAction) Init() { 12 | this.Nav("", "transfer", "") 13 | } 14 | 15 | func (this *IndexAction) RunGet(params struct{}) { 16 | this.Show() 17 | } 18 | -------------------------------------------------------------------------------- /web/views/@default/servers/certs/acme/@menu.html: -------------------------------------------------------------------------------- 1 | 2 | 所有任务 3 | | 4 | [新申请] 5 | | 6 | ACME用户 7 | 服务商账号 8 | 9 | -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/rewrite/createPopup.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyPopup 3 | 4 | this.rewriteRule = { 5 | mode: "proxy", 6 | redirectStatus: 307 7 | } 8 | this.statusOptions = [ 9 | {"code": 301, "text": "Moved Permanently"}, 10 | {"code": 308, "text": "Permanent Redirect"}, 11 | {"code": 302, "text": "Found"}, 12 | {"code": 303, "text": "See Other"}, 13 | {"code": 307, "text": "Temporary Redirect"} 14 | ] 15 | }) -------------------------------------------------------------------------------- /internal/const/const.go: -------------------------------------------------------------------------------- 1 | package teaconst 2 | 3 | const ( 4 | Version = "1.3.8.2" 5 | 6 | APINodeVersion = "1.3.8" 7 | 8 | ProductName = "Edge Admin" 9 | ProcessName = "edge-admin" 10 | 11 | Role = "admin" 12 | 13 | EncryptMethod = "aes-256-cfb" 14 | 15 | CookieSID = "geadsid" 16 | SessionAdminId = "adminId" 17 | 18 | SystemdServiceName = "edge-admin" 19 | UpdatesURL = "https://goedge.cn/api/boot/versions?os=${os}&arch=${arch}&version=${version}" 20 | ) 21 | -------------------------------------------------------------------------------- /internal/web/actions/default/settings/ui/index_ext.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved. Official site: https://goedge.cn . 2 | //go:build !plus 3 | 4 | package ui 5 | 6 | import "github.com/TeaOSLab/EdgeCommon/pkg/systemconfigs" 7 | 8 | func (this *IndexAction) filterConfig(config *systemconfigs.AdminUIConfig) { 9 | this.Data["supportModuleCDN"] = true 10 | this.Data["supportModuleNS"] = true 11 | this.Data["nsIsVisible"] = false 12 | } 13 | -------------------------------------------------------------------------------- /web/views/@default/admins/@admin_menu.html: -------------------------------------------------------------------------------- 1 | 2 | 系统用户 3 | | 4 | "{{admin.fullname}}" 详情 5 | 修改 6 | API AccessKey({{admin.countAccessKeys}}) 7 | -------------------------------------------------------------------------------- /web/views/@default/servers/metrics/charts/update.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.type = this.chart.type 3 | this.typeDefinition = null 4 | 5 | this.$delay(function () { 6 | this.changeType() 7 | }) 8 | 9 | this.changeType = function () { 10 | let that = this 11 | this.typeDefinition = this.types.$find(function (k, v) { 12 | return v.code == that.type 13 | }) 14 | } 15 | 16 | this.success = NotifySuccess("保存成功", Tea.url(".chart", {chartId: this.chart.id})) 17 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/locations/reverseProxy/scheduling.html: -------------------------------------------------------------------------------- 1 | {$layout} 2 | {$template "/left_menu"} 3 | 4 |
5 | {$template "../location_menu"} 6 | {$template "../left_menu"} 7 | 8 |
9 | {$template "menu"} 10 | 11 | 12 |
13 |
-------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/locations/rewrite/index.html: -------------------------------------------------------------------------------- 1 | {$layout} 2 | {$template "/left_menu"} 3 | 4 |
5 | {$template "../location_menu"} 6 | {$template "../left_menu"} 7 | 8 |
9 | 10 | [创建] 11 | 12 | 13 |
14 |
-------------------------------------------------------------------------------- /internal/web/actions/actionutils/menu_item.go: -------------------------------------------------------------------------------- 1 | package actionutils 2 | 3 | // MenuItem 菜单项 4 | type MenuItem struct { 5 | Id string `json:"id"` 6 | Name string `json:"name"` 7 | SubName string `json:"subName"` // 副标题 8 | SupName string `json:"supName"` // 头标 9 | URL string `json:"url"` 10 | IsActive bool `json:"isActive"` 11 | Icon string `json:"icon"` 12 | IsSortable bool `json:"isSortable"` 13 | SubColor string `json:"subColor"` 14 | } 15 | -------------------------------------------------------------------------------- /web/public/codemirror/mode/d/test.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: https://codemirror.net/LICENSE 3 | 4 | (function() { 5 | var mode = CodeMirror.getMode({indentUnit: 2}, "d"); 6 | function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); } 7 | 8 | MT("nested_comments", 9 | "[comment /+]","[comment comment]","[comment +/]","[variable void] [variable main](){}"); 10 | 11 | })(); 12 | -------------------------------------------------------------------------------- /web/views/@default/db/@menu.html: -------------------------------------------------------------------------------- 1 | 2 | 所有节点 3 | | 4 | "{{node.name}}"详情 5 | 清理 6 | 运行日志 7 | 修改 8 | -------------------------------------------------------------------------------- /web/views/@default/servers/groups/group/settings/waf/ipadmin/countries.css: -------------------------------------------------------------------------------- 1 | .region-letter-group .item { 2 | padding-left: 1em !important; 3 | padding-right: 1em !important; 4 | } 5 | .country-group { 6 | padding-bottom: 1em; 7 | } 8 | .country-group .country-list .item { 9 | float: left; 10 | width: 12em; 11 | margin-bottom: 0.5em; 12 | } 13 | .country-group .country-list .item .checkbox label { 14 | font-size: 12px !important; 15 | } 16 | /*# sourceMappingURL=countries.css.map */ -------------------------------------------------------------------------------- /internal/setup/utils.go: -------------------------------------------------------------------------------- 1 | package setup 2 | 3 | import ( 4 | "github.com/TeaOSLab/EdgeAdmin/internal/configs" 5 | ) 6 | 7 | var isConfigured bool 8 | 9 | // IsConfigured 判断系统是否已经配置过 10 | func IsConfigured() bool { 11 | if isConfigured { 12 | return true 13 | } 14 | 15 | _, err := configs.LoadAPIConfig() 16 | isConfigured = err == nil 17 | return isConfigured 18 | } 19 | 20 | // IsNewInstalled IsNew 检查是否新安装 21 | func IsNewInstalled() bool { 22 | return configs.IsNewInstalled() 23 | } 24 | -------------------------------------------------------------------------------- /web/public/js/components/server/http-firewall-page-options-viewer.js: -------------------------------------------------------------------------------- 1 | Vue.component("http-firewall-page-options-viewer", { 2 | props: ["v-page-options"], 3 | data: function () { 4 | return { 5 | options: this.vPageOptions 6 | } 7 | }, 8 | template: `
9 | 默认设置 10 |
11 | 状态码:{{options.status}} / 提示内容:[{{options.body.length}}字符] 12 |
13 |
14 | ` 15 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/groups/group/settings/web/index.html: -------------------------------------------------------------------------------- 1 | {$layout} 2 | {$template "/servers/groups/group/menu"} 3 | {$template "/left_menu_without_menu"} 4 | 5 |
6 |
7 | 8 | 9 | 10 |
11 |
-------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/fastcgi/index.html: -------------------------------------------------------------------------------- 1 | {$layout} 2 | {$template "../settings_menu"} 3 | {$template "/left_menu_with_menu"} 4 | 5 |
6 |
7 | 8 | 9 | 10 |
11 |
-------------------------------------------------------------------------------- /internal/web/actions/default/servers/components/log/helper.go: -------------------------------------------------------------------------------- 1 | package log 2 | 3 | import ( 4 | "github.com/iwind/TeaGo/actions" 5 | "net/http" 6 | ) 7 | 8 | type Helper struct { 9 | } 10 | 11 | func NewHelper() *Helper { 12 | return &Helper{} 13 | } 14 | 15 | func (this *Helper) BeforeAction(action *actions.ActionObject) { 16 | if action.Request.Method != http.MethodGet { 17 | return 18 | } 19 | 20 | action.Data["mainTab"] = "component" 21 | action.Data["secondMenuItem"] = "log" 22 | } 23 | -------------------------------------------------------------------------------- /internal/web/actions/default/ui/eventLevelOptions.go: -------------------------------------------------------------------------------- 1 | package ui 2 | 3 | import ( 4 | "github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils" 5 | "github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs/firewallconfigs" 6 | ) 7 | 8 | type EventLevelOptionsAction struct { 9 | actionutils.ParentAction 10 | } 11 | 12 | func (this *EventLevelOptionsAction) RunPost(params struct{}) { 13 | this.Data["eventLevels"] = firewallconfigs.FindAllFirewallEventLevels() 14 | 15 | this.Success() 16 | } 17 | -------------------------------------------------------------------------------- /internal/web/helpers/utils_gcc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2024 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn . 2 | //go:build gcc 3 | 4 | package helpers 5 | 6 | import ( 7 | "github.com/TeaOSLab/EdgeAdmin/internal/waf/injectionutils" 8 | "net/http" 9 | ) 10 | 11 | // filter request 12 | func safeFilterRequest(req *http.Request) bool { 13 | return !injectionutils.DetectXSS(req.RequestURI, false) && !injectionutils.DetectSQLInjection(req.RequestURI, false) 14 | } 15 | -------------------------------------------------------------------------------- /web/views/@default/clusters/@menu.html: -------------------------------------------------------------------------------- 1 | 2 | 集群 ({{totalNodeClusters}}) 3 | 节点 ({{totalNodes}}) 4 | | 5 | [创建集群] 6 | [创建节点] 7 | 8 | -------------------------------------------------------------------------------- /web/views/@default/servers/groups/group/settings/stat/index.html: -------------------------------------------------------------------------------- 1 | {$layout} 2 | {$template "/servers/groups/group/menu"} 3 | {$template "/left_menu_without_menu"} 4 | 5 |
6 |
7 | 8 | 9 | 10 |
11 |
-------------------------------------------------------------------------------- /web/views/@default/servers/server/stat/index.html: -------------------------------------------------------------------------------- 1 | {$layout} 2 | {$template "/echarts"} 3 | 4 | {$template "stat_menu"} 5 | {$template "/left_menu_with_menu"} 6 |
7 | {$template "requests_menu"} 8 | 9 |
10 |

请求数统计(即时)

11 |
12 | 13 |

流量统计(即时)

14 |
15 |
16 |
-------------------------------------------------------------------------------- /web/views/@default/servers/server/stat/dailyRequests.html: -------------------------------------------------------------------------------- 1 | {$layout} 2 | {$template "/echarts"} 3 | 4 | {$template "stat_menu"} 5 | {$template "/left_menu_with_menu"} 6 |
7 | {$template "requests_menu"} 8 | 9 |
10 |

请求数统计(按天)

11 |
12 | 13 |

流量统计(按天)

14 |
15 |
16 |
-------------------------------------------------------------------------------- /web/views/@default/servers/server/stat/hourlyRequests.html: -------------------------------------------------------------------------------- 1 | {$layout} 2 | {$template "/echarts"} 3 | 4 | {$template "stat_menu"} 5 | {$template "/left_menu_with_menu"} 6 |
7 | {$template "requests_menu"} 8 | 9 |
10 |

请求数统计(小时)

11 |
12 | 13 |

流量统计(小时)

14 |
15 |
16 |
-------------------------------------------------------------------------------- /internal/utils/sizes/sizes_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved. 2 | 3 | package sizes_test 4 | 5 | import ( 6 | "github.com/TeaOSLab/EdgeAdmin/internal/utils/sizes" 7 | "github.com/iwind/TeaGo/assert" 8 | "testing" 9 | ) 10 | 11 | func TestSizes(t *testing.T) { 12 | var a = assert.NewAssertion(t) 13 | a.IsTrue(sizes.K == 1024) 14 | a.IsTrue(sizes.M == 1024*1024) 15 | a.IsTrue(sizes.G == 1024*1024*1024) 16 | a.IsTrue(sizes.T == 1024*1024*1024*1024) 17 | } 18 | -------------------------------------------------------------------------------- /web/public/js/components/common/more-options-angle.js: -------------------------------------------------------------------------------- 1 | Vue.component("more-options-angle", { 2 | data: function () { 3 | return { 4 | isVisible: false 5 | } 6 | }, 7 | methods: { 8 | show: function () { 9 | this.isVisible = !this.isVisible 10 | this.$emit("change", this.isVisible) 11 | } 12 | }, 13 | template: `更多选项收起选项` 14 | }) -------------------------------------------------------------------------------- /internal/utils/taskutils/concurrent_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2023 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn . 2 | 3 | package taskutils_test 4 | 5 | import ( 6 | "github.com/TeaOSLab/EdgeAdmin/internal/utils/taskutils" 7 | "testing" 8 | ) 9 | 10 | func TestRunConcurrent(t *testing.T) { 11 | err := taskutils.RunConcurrent([]string{"a", "b", "c", "d", "e"}, 3, func(task any) { 12 | t.Log("run", task) 13 | }) 14 | if err != nil { 15 | t.Fatal(err) 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /internal/web/actions/default/settings/lang/init.go: -------------------------------------------------------------------------------- 1 | package lang 2 | 3 | import ( 4 | "github.com/TeaOSLab/EdgeAdmin/internal/configloaders" 5 | "github.com/TeaOSLab/EdgeAdmin/internal/web/helpers" 6 | "github.com/iwind/TeaGo" 7 | ) 8 | 9 | func init() { 10 | TeaGo.BeforeStart(func(server *TeaGo.Server) { 11 | server. 12 | Helper(helpers.NewUserMustAuth(configloaders.AdminModuleCodeServer)). 13 | Prefix("/settings/lang"). 14 | Post("/switch", new(SwitchAction)). 15 | EndAll() 16 | }) 17 | } 18 | -------------------------------------------------------------------------------- /web/views/@default/clusters/cluster/settings/ddos-protection/status.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.isLoading = true 3 | this.results = [] 4 | 5 | this.$delay(function () { 6 | this.reload() 7 | }) 8 | 9 | this.reload = function () { 10 | this.isLoading = true 11 | this.$post("$") 12 | .params({ clusterId: this.clusterId }) 13 | .success(function (resp) { 14 | this.results = resp.data.results 15 | }) 16 | .done(function () { 17 | this.isLoading = false 18 | }) 19 | } 20 | }) -------------------------------------------------------------------------------- /web/views/@default/dns/providers/createPopup.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyPopup 3 | this.type = "" 4 | this.typeDescription = "" 5 | 6 | this.changeType = function () { 7 | let that = this 8 | let t = this.types.$find(function (k, v) { 9 | return v.code == that.type 10 | }) 11 | if (t != null) { 12 | this.typeDescription = t.description 13 | } else { 14 | this.typeDescription = "" 15 | } 16 | } 17 | 18 | // DNSPod 19 | this.paramDNSPodAPIType = "tencentDNS" 20 | }) -------------------------------------------------------------------------------- /web/views/@default/dns/providers/updatePopup.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.typeDescription = "" 3 | 4 | let that = this 5 | this.types.forEach(function (v) { 6 | if (v.code == that.provider.type) { 7 | that.typeDescription = v.description 8 | } 9 | }) 10 | 11 | // DNSPod 12 | if (this.provider.type == "dnspod" && this.provider.params != null && (this.provider.params.apiType == null || this.provider.params.apiType.length == 0)) { 13 | this.provider.params.apiType = "dnsPodToken" 14 | } 15 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/server/stat/@stat_menu.html: -------------------------------------------------------------------------------- 1 | 2 | 网站列表 3 | | 4 | "{{server.name}}"统计 5 | | 6 | 9 | -------------------------------------------------------------------------------- /web/views/@default/clusters/cluster/groups/createPopup.html: -------------------------------------------------------------------------------- 1 | {$layout "layout_popup"} 2 | 3 |

创建分组

4 |
5 | 6 | 7 | 8 | 9 | 12 | 13 |
分组名称 * 10 | 11 |
14 | 15 |
-------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/access/index.html: -------------------------------------------------------------------------------- 1 | {$layout} 2 | {$template "../settings_menu"} 3 | {$template "/left_menu_with_menu"} 4 | 5 |
6 |
7 | 8 | 9 | 10 |
11 |
-------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/userAgent/index.html: -------------------------------------------------------------------------------- 1 | {$layout} 2 | {$template "../settings_menu"} 3 | {$template "/left_menu_with_menu"} 4 | 5 |
6 |
7 | 8 | 9 | 10 | 11 | 12 |
13 |
-------------------------------------------------------------------------------- /web/views/@default/settings/server/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.updateHTTP = function () { 3 | teaweb.popup("/settings/server/updateHTTPPopup", { 4 | callback: function () { 5 | teaweb.success("保存成功", teaweb.reload) 6 | } 7 | }) 8 | } 9 | 10 | this.updateHTTPS = function () { 11 | teaweb.popup("/settings/server/updateHTTPSPopup", { 12 | height: "26em", 13 | width:"50em", 14 | callback: function () { 15 | teaweb.success("保存成功", teaweb.reload) 16 | } 17 | }) 18 | } 19 | }) -------------------------------------------------------------------------------- /web/views/@default/servers/server/settings/locations/reverseProxy/index.js: -------------------------------------------------------------------------------- 1 | Tea.context(function () { 2 | this.success = NotifyReloadSuccess("保存成功") 3 | 4 | this.updateOn = function (b) { 5 | teaweb.confirm(b ? "确定要启用源站吗?" : "确定要停用源站服务吗?", function () { 6 | this.$post(".updateOn") 7 | .params({ 8 | "serverId": this.serverId, 9 | "isOn": b ? 1 : 0, 10 | "reverseProxyId": this.reverseProxyId 11 | }) 12 | .success(function () { 13 | window.location.reload() 14 | }) 15 | }) 16 | } 17 | }) -------------------------------------------------------------------------------- /internal/web/actions/default/clusters/cluster/settings/dns/randomName.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved. 2 | 3 | package dns 4 | 5 | import ( 6 | "github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils" 7 | "github.com/iwind/TeaGo/rands" 8 | ) 9 | 10 | type RandomNameAction struct { 11 | actionutils.ParentAction 12 | } 13 | 14 | func (this *RandomNameAction) RunPost(params struct{}) { 15 | this.Data["name"] = "cluster" + rands.HexString(8) 16 | 17 | this.Success() 18 | } 19 | -------------------------------------------------------------------------------- /web/views/@default/servers/groups/group/update.html: -------------------------------------------------------------------------------- 1 | {$layout "layout"} 2 | {$template "menu"} 3 | 4 |
5 | 6 | 7 | 8 | 9 | 12 | 13 |
分组名称 * 10 | 11 |
14 | 15 |
-------------------------------------------------------------------------------- /internal/web/actions/default/servers/server/settings/index_ext.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved. Official site: https://goedge.cn . 2 | //go:build !plus 3 | 4 | package settings 5 | 6 | import ( 7 | "github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb" 8 | "github.com/iwind/TeaGo/maps" 9 | ) 10 | 11 | func (this *IndexAction) initUserPlan(server *pb.Server) { 12 | var userPlanMap = maps.Map{"id": server.UserPlanId, "dayTo": "", "plan": maps.Map{}} 13 | this.Data["userPlan"] = userPlanMap 14 | } 15 | -------------------------------------------------------------------------------- /web/views/@default/clusters/cluster/groups/updatePopup.html: -------------------------------------------------------------------------------- 1 | {$layout "layout_popup"} 2 | 3 |

修改分组

4 |
5 | 6 | 7 | 8 | 9 | 12 | 13 |
分组名称 * 10 | 11 |
14 | 15 |
-------------------------------------------------------------------------------- /internal/web/actions/default/clusters/cluster/node/nodeutils/utils_ext.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved. Official site: https://goedge.cn . 2 | //go:build !plus 3 | 4 | package nodeutils 5 | 6 | import ( 7 | "github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb" 8 | "github.com/iwind/TeaGo/maps" 9 | ) 10 | 11 | func filterMenuItems(menuItems []maps.Map, menuItem string, prefix string, query string, info *pb.FindEnabledNodeConfigInfoResponse, langCode string) []maps.Map { 12 | return menuItems 13 | } 14 | -------------------------------------------------------------------------------- /internal/web/actions/default/clusters/cluster/node/nodeutils/utils_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2024 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn . 2 | 3 | package nodeutils_test 4 | 5 | import ( 6 | "github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/clusters/cluster/node/nodeutils" 7 | _ "github.com/iwind/TeaGo/bootstrap" 8 | "testing" 9 | ) 10 | 11 | func TestInstallLocalNode(t *testing.T) { 12 | err := nodeutils.InstallLocalNode() 13 | if err != nil { 14 | t.Fatal(err) 15 | } 16 | } 17 | --------------------------------------------------------------------------------