127 Commits

Author SHA1 Message Date
ed5278a0f8 fix: update password validation and improve login error messages (#1523)
* fix: update password validation and improve login error messages

* refactor: change variable declarations to constants for better clarity
2025-08-07 21:04:12 +08:00
c68080bc1f feat: 实时测试正则表达式 (#1368)
* refactor: i18n-related code

Update i18n.js

* feat: add tooltips component

* feat: add i18n-attr function

* chore: unify the HTML dataset naming style

* style: add some tooltips

Also for testing tooltips function

* feat: real-time testing of ipv6 regular expressions
2025-01-14 20:28:34 +08:00
5f0d7eb183 Fix bug by overwriting existing system cookie (#1304) 2024-10-31 23:36:14 +08:00
2b9bda3dce Login page autofocus on username (#1303) 2024-10-31 16:57:46 +08:00
d5fb28e625 Revert UI changes for Logs button styling (#1302)
Co-authored-by: luo.pengcheng <luo.pengcheng@ikasinfo.com>
2024-10-31 16:51:49 +08:00
abef25c866 add logout feature (#1301)
* add logout feature

* fix bug, optimize display

* optimize logout display

* keep Logs ui to logout

---------

Co-authored-by: luo.pengcheng <luo.pengcheng@ikasinfo.com>
2024-10-31 16:34:08 +08:00
394efc23a6 增加一个接口地址,支持独立IPv4 IPv6。此接口服务由我个人公益维护 (#1230)
* 增加一个接口地址,支持独立IPv4  IPv6。此接口服务由我个人公益维护

* Add Chinese Help URL in `static/constant.js`
2024-09-25 14:20:34 +08:00
771e180aa3 feat: Reduce password strength requirements (#1224) 2024-08-19 10:46:33 +08:00
23277cc078 fix: need to parse the referer (#1204) 2024-08-01 16:07:03 +08:00
e881d5b253 feat: Login page as user settings page (#1203)
* feat: Login page as user settings page

* remove empty password check
2024-08-01 12:43:47 +08:00
bdeda6cebd chore: the time limit is set to 30 minutes (#1202) 2024-07-31 17:17:58 +08:00
d04149a905 chore: the time limit is set to 10 minutes (#1191)
* chore: the time limit is set to 10 minutes

* docs: set up username and password immediately after logging in
2024-07-19 09:24:35 +08:00
97f188f126 fix: add token expires for system (#1151) 2024-06-13 07:29:17 -07:00
6f4c79047d fix: Use a prompt instead of auto login (#1152) 2024-06-13 07:15:27 -07:00
ca3027b111 feat: add support for rename config (#1132)
* feat: add support for rename config

* fix(web): remove unnecessary margin for delete button
2024-05-29 14:12:50 +08:00
eda1050430 feat: reset password (#1119)
- Encrypt password using bcrypt
- Add reset password function
2024-05-18 22:39:00 -07:00
15e6cb0434 Update messages.go (#1115) 2024-05-16 08:01:17 -07:00
63b510bef2 Login page (#1094)
* feat: Add a login page

* feat: Modify save rules, more secure

* remove remoteAddr == "localhost"

* "登录失败次数过多,请等待 %d 分钟后再试

* cookie remove secure

* set cookie expires time by `NotAllowWanAccess`

* prettier

* fix: rename

* feat: auto login if unfilled

* feat: auto login if there is no username/password

* auto login if no username/password
2024-04-26 19:35:08 -07:00
4c11754afd refactor(headers): support all types of line breaks (#1046)
Now it only works properly if the line break is `\r\n`. Using the `splitLines` function solves this problem.

Rewritten the function `checkParseHeaders` and renamed it to `extractHeaders` for better readability.
2024-03-18 06:38:21 -07:00
9aee04b587 fix(web): logging if no domain is entered (#1038)
* fix(web): IPv4/6 cannot be enabled without domains

Currently, if IPv4/6 is enabled but there is no domain, nothing happens. In this case, we should throw an error.

* fix: replace errors with logs

* fix: logging only if no domain is entered

* feat: logging index
2024-03-10 06:14:06 -07:00
52ef2b7fbf fix: the url of ipv4 (#1024) 2024-02-19 16:52:08 +08:00
6410dad8a2 fix: The select is not working properly (#1006) 2024-02-02 12:39:07 +08:00
7befe6e7da refactor: 重构前端代码 (#988)
* refactor: 重构前端代码

几乎完全重构前端js代码
小幅度重构后端代码(主要为了适配前端)

* fix: 修复主题色无法自适应的bug

还原了主题色修改函数的write参数,去除该参数会导致自适应修改主题时也会写入localStorage

* feat: 自动修改标签的for属性

自动修改”获取 IP 方式“标签的for属性,保证其始终指向当前可编辑的元素

* refactor: 去除JQuery

* refactor: 按业务划分代码

* fix: 对空值兼容

* fix: 统一html命名

* feat: 默认选择最后一个配置

* fix: 删除冗余代码

* fix: Update writing.html
2024-01-22 04:34:46 -08:00
01d3f4ddbc fix(web): correctly display new logs when the same log appear multiple times (#974)
* fix(web): correctly display new logs when old log appear multiple times

* style(html): format with Prettier
2024-01-12 12:01:04 +08:00
1a443b7ecc fix: unique id (#971) 2024-01-11 02:34:30 -08:00
7c69aa1bf7 feat: gomod v5 to v6 & upgrade golang to 1.21 (#969) 2024-01-11 16:25:14 +08:00
eec98404fe feat: support english (#967)
* feat: init the i18n

* fix: porkbun

* refactor: http_util GetHTTPResponse

* fix: save

* fix: add more i18n

* feat: i18n at writing.html

* feat: README EN

* fix: default api

* fix: pic
2024-01-11 15:52:53 +08:00
8b508c6f0a feat: Reduce password strength verification when using on the intranet (#966) 2024-01-10 14:13:39 +08:00
e2605ff9c2 fix: example for eu.org (#950) 2023-12-22 16:32:58 +08:00
afb8c71c03 add eu.org subdomain (#920)
* add eu.org subdomain

* better explain

* fix: prettier again

* ddns:cn.eu.org -> subdomain:cn.eu.org

---------

Co-authored-by: jeessy2 <6205259+jeessy2@users.noreply.github.com>
2023-12-22 12:43:14 +08:00
0e620feaa9 feat: save data-theme state in localstorage (#850)
* feat: save data-theme state in localstorage

* fix: prefer the state in localstorage than the scheme preference

* do not save state when using default theme

* fix: determine the correct theme mode
2023-09-10 05:30:51 -07:00
57b3aa6fe0 docs: namecheap don't supports ipv6 ddns (#805) 2023-08-04 19:24:46 +08:00
5fa178381f 支持namesilo (#796)
* 支持namesilo
2023-08-04 19:16:31 +08:00
6bc09d799c feat(web): validate password (#779)
* feat(web): validate password

https://github.com/wagslane/go-password-validator

* fix: validate password only if password is non-empty
2023-07-21 14:43:58 +08:00
68c59d0fb7 feat: Making saving more secure (#773)
* feat: Making saving more secure
2023-07-19 21:59:56 +08:00
b66340e2e4 fix: typos (#766) 2023-07-11 20:55:54 +08:00
e283f7a9c8 chore(web): hide DnsID when idLabel is empty (#739)
* chore(web): hide `DnsID` when `idLabel` is empty

* fix: do not disable when `idLabel` is empty
2023-06-14 20:57:43 +08:00
6645d78924 feat: support DNSPod API 3.0 (#713)
* feat: support Tencent Cloud DNSPod API 3.0

https://cloud.tencent.com/document/api/1427/56193

* chore: no longer need `tencentCloudHost`

* chore(TencentCloudSigner): no longer used `fmt`

* perf(TencentCloudSigner): use `strings.Builder` to build strings

https://pkg.go.dev/strings#Builder
2023-05-26 22:36:06 +08:00
73ea376ce7 feat: webhook supports headers (#626)
* feat: webhook supports headers

* change rows to 1

* WebhookRequestHeaders改成WebhookHeaders

* 简化parts[0]

* 默认\r\n

* RequestHeaders -> WebhookHeaders

* fix test

* change new line break

* RequestHeaders -> Headers
2023-05-10 14:00:18 +08:00
39330ca62c Revert #656 (#697) 2023-05-08 17:40:01 +08:00
39bfef88d6 feat: save from the public network within 5 minutes (#688) 2023-04-24 21:13:05 +08:00
309385417f feat: Optimize the front-end logs code (#663) 2023-04-09 21:27:43 +08:00
ee8162760b feat: checkbox to disable Webhook (#656)
* feat: checkbox to enable Webhook

* fix: true when `webhookenable` key missing

* feat: `WebhookStatus` button

* chore: better comment for `getWebhookStatus`

* feat: reuse checkbox

The button is no longer used.

* chore: move `WebhookStatus` above `WebhookURL` [skip ci]

* refactor(`getWebhookStatus`): use conditional operator

https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Conditional_Operator

* refactor(`WebhookStatus`): moves the part that changes the value to `addEventListener`

Add a new function `isWebhookStatusDisable`.

* feat: checkbox to disable Webhook

* chore(html): re-add blank line [skip ci]
2023-04-04 20:49:43 +08:00
ce1a4b022d feat: If the configuration file is empty, access from the public network is prohibited for more than 3 hours (#646) 2023-03-24 23:37:50 +08:00
9f7ee01451 feat: log X-Real-IP header (#631)
* feat: log X-Real-IP header

* fix: log first X-Forwarded-For client

* refactor: add GetRealIP function

* fix: RemoteAddr

* feat: display the X-Real-IP and X-Forwarded-For

---------

Co-authored-by: jeessy2 <6205259+jeessy2@users.noreply.github.com>
2023-03-24 23:29:08 +08:00
548c5c3c73 fix: select the saved net interface (#628)
* fix: select the saved net inteface

* fix: If none is selected, select the first option
2023-03-14 12:00:22 +08:00
ee2d20503e fix: the domain name separation does not work well (#625) 2023-03-13 14:04:02 +08:00
2f58c514bc fix: clear the previous DNS ID when switching configurations (#620) 2023-03-12 20:18:57 +08:00
01f5adcecf fix: reset a single ip cache (#619) 2023-03-12 20:17:32 +08:00
31ce5f0648 新增namecheap支持 (#454)
* 新增namecheap支持

* feat: supports namecheap

---------

Co-authored-by: 紫东遥 <–1160899437@qq.com>
Co-authored-by: jeessy2 <6205259+jeessy2@users.noreply.github.com>
2023-03-12 11:20:04 +08:00