Commit Graph
86 Commits
Author SHA1 Message Date
Bot 3d2b27f4ec feat: custom domain management, config and notification fixes, and VPS auto-renewal rollover 2026-09-01 23:45:21 +08:00
Bot 00f5777112 Merge branch 'upstream/master' into master and preserve domain extensions 2026-08-31 02:46:42 +08:00
naibaandnaiba/CloudCode 8b47ff141f feat(agentcompat): add shared runtime contracts
Co-authored-by: naiba/CloudCode <hi+cloudcode@nai.ba>
2026-07-20 04:25:03 +00:00
Bot c778472571 fix: panic on nil pointer dereference in notification sending and fix date parsing formats 2026-07-01 23:36:21 +08:00
naibaandnaiba/CloudCode ea7ad67f03 fix(ddns): apply SSRF defense to webhook provider
GHSA-6x26-5727-rrm9: a low-privilege member could point a DDNS webhook
at internal or loopback hosts and the dashboard would dial them with the
unrestricted utils.HttpClient.

Extract the notification SSRF defenses (CIDR blocklist, IP-pin DialContext,
SNI preservation, redirect rejection) into reusable helpers in pkg/utils
(NewRestrictedHTTPClient / ResolveAllowedHTTPURL / buildRestrictedHTTPClient)
and route the DDNS webhook through the same path. Replace the notification
inline implementation with a thin wrapper to keep behaviour identical.

Side improvements collected by the refactor:
- prepareRequest now resolves DNS once and returns the paired client, so
  the dialer's pinned IP and the validated URL stay in sync (no more
  double resolution between prepareRequest and SetRecords).
- response body is drained and closed.
- HttpClient / HttpClientSkipTlsVerify are explicitly tagged unsafe for
  attacker-controlled URLs.

Tests cover: hermetic SNI preservation, redirect rejection, dial pin to
the vetted IP, the full blocked-CIDR list at the webhook entry point,
and the verifyTLS↔skipVerifyTLS inversion in the notification wrapper.

Co-authored-by: naiba/CloudCode <hi+cloudcode@nai.ba>
2026-05-18 15:14:27 +00:00
naibaandnaiba/CloudCode c4bea1ffd3 fix(notification): harden webhook request handling
Co-authored-by: naiba/CloudCode <hi+cloudcode@nai.ba>
2026-05-17 10:24:19 +08:00
Bot f3dded3186 feat: separate expiry notification days and refactor TG bot interactive logic 2026-05-13 00:52:36 +08:00
Bot 3319d7344f feat: rewrite notification system and telegram interactive bot 2026-04-28 00:04:29 +08:00
Bot 5493f5c32f feat: add native Telegram notification provider 2026-04-16 21:43:44 +08:00
Bot 3d849b4b43 feat: implement VPS/Domain expiry notifications and native SMTP support 2026-04-16 21:36:49 +08:00
UUBulb c22446b20c feat(notification): add option to convert metric units in request body (#1156)
* feat(notification): add option to convert metric units in request body

* ignore gosec

* rename fields
2026-01-10 17:29:10 +08:00
UUBulb 302d278644 feat(notification): add option to convert metric units in request body (#1156)
* feat(notification): add option to convert metric units in request body

* ignore gosec

* rename fields
2026-01-10 17:29:10 +08:00
UUBulb 043d6c4097 feat: update to go1.24 & support listening https (#1002)
* feat: support listening https

* refactor

* modernize

* support snake case in config

* more precise control of config fields

* update goreleaser config

* remove kubeyaml

* fix: expose agent_secret

* chore
2025-02-28 22:02:54 +08:00
UUBulb 1d2f8d24f6 feat: update to go1.24 & support listening https (#1002)
* feat: support listening https

* refactor

* modernize

* support snake case in config

* more precise control of config fields

* update goreleaser config

* remove kubeyaml

* fix: expose agent_secret

* chore
2025-02-28 22:02:54 +08:00
UUBulb ea068d4db1 refactor: simplify server & service manipulation (#993)
* refactor: simplify server & service manipulation

* update

* fix

* update for nat, ddns & notification

* chore

* update cron

* update dependencies

* use of function iterators

* update default dns servers
2025-02-21 23:08:12 +08:00
UUBulb 91bef2882a refactor: simplify server & service manipulation (#993)
* refactor: simplify server & service manipulation

* update

* fix

* update for nat, ddns & notification

* chore

* update cron

* update dependencies

* use of function iterators

* update default dns servers
2025-02-21 23:08:12 +08:00
UUBulb ff4fd31ec4 small improvements (#958)
* small improvements

* fix: return empty iterator if no json present

* use time.Tick

* changes
2025-01-19 21:22:00 +08:00
UUBulb 4b1af369e3 small improvements (#958)
* small improvements

* fix: return empty iterator if no json present

* use time.Tick

* changes
2025-01-19 21:22:00 +08:00
naiba a7e4fe0909 rename repo 2024-11-28 19:38:54 +08:00
naiba 3cce7ebf01 rename repo 2024-11-28 19:38:54 +08:00
UUBulb 13810bb38b report geoip separately, fix server creation & deletion bugs (#14)
* new geoip method

* report geoip separately, fix server creation & deletion bugs

* fix struct tag

* fix write name

* remove deleteion list

* remove rpc realip header

* Revert "remove rpc realip header"

This reverts commit 8a5f86cf2d7df87f28cfa2a3b3430f449dd6ed73.
2024-11-22 22:40:43 +08:00
UUBulb fc98c0919f report geoip separately, fix server creation & deletion bugs (#14)
* new geoip method

* report geoip separately, fix server creation & deletion bugs

* fix struct tag

* fix write name

* remove deleteion list

* remove rpc realip header

* Revert "remove rpc realip header"

This reverts commit 8a5f86cf2d7df87f28cfa2a3b3430f449dd6ed73.
2024-11-22 22:40:43 +08:00
UUBulb 5c1599c88c fix struct tags (#7) 2024-11-16 20:57:03 +08:00
UUBulb 288e1b75e9 fix struct tags (#7) 2024-11-16 20:57:03 +08:00
uubulb 96bec45855 add zh_TW locale, rename ssl to tls 2024-11-01 14:32:55 +08:00
uubulb ca997cc994 add zh_TW locale, rename ssl to tls 2024-11-01 14:32:55 +08:00
UUBulb 8bfe70d519 add cron, nat api & refactor alert rule (#459)
* add cron api & refactor alert rule

* add nat api

* fix swagger

* remove unnecessary steps
2024-10-26 23:57:47 +08:00
UUBulb 68d7e16773 add cron, nat api & refactor alert rule (#459)
* add cron api & refactor alert rule

* add nat api

* fix swagger

* remove unnecessary steps
2024-10-26 23:57:47 +08:00
UUBulb 28b606ef7b implement notification group (#450)
* implement notification group

* some fixes

* fix sql

* add listNotification

* retrieve notification from map

* create notification_group_notification if non-exist

* NotificationIDToGroup -> NotificationIDToGroups

* clean
2024-10-23 21:55:12 +08:00
UUBulb 61e755d2b9 implement notification group (#450)
* implement notification group

* some fixes

* fix sql

* add listNotification

* retrieve notification from map

* create notification_group_notification if non-exist

* NotificationIDToGroup -> NotificationIDToGroups

* clean
2024-10-23 21:55:12 +08:00
UUBulb 427e0e5449 feat: description file for custom theme; use gjson (#433)
* feat: description file for custom theme; use gjson

* fix gosec

* remove outdated stuff
2024-10-10 00:08:16 +08:00
UUBulb 55f5c89c1c feat: description file for custom theme; use gjson (#433)
* feat: description file for custom theme; use gjson

* fix gosec

* remove outdated stuff
2024-10-10 00:08:16 +08:00
hiDandelion 6b3743f39f Add replacing fields to notification content in notification.go (#408) 2024-08-13 13:51:19 +08:00
hiDandelion 711d162a46 Add replacing fields to notification content in notification.go (#408) 2024-08-13 13:51:19 +08:00
Mmx 256ca2465b fix: field name "VerifySSL" to "SkipVerifySSL" in Transport config (#305) 2023-12-06 09:35:38 +08:00
Mmx 927bf13ce4 fix: field name "VerifySSL" to "SkipVerifySSL" in Transport config (#305) 2023-12-06 09:35:38 +08:00
Mmx 9df97e2bdb Fix Coroutine Leaks and Proxy Handling in http.Client (#304)
* fix: builtin variable conflict

* feat: add pkg/utils/http HttpClientSkipTlsVerify HttpClient

* fix: realtime create http Transport

* fix: http keepalive connection may not reusable

* feat: allow http request use proxy from environment
2023-12-05 23:22:25 +08:00
Mmx 1dcd899591 Fix Coroutine Leaks and Proxy Handling in http.Client (#304)
* fix: builtin variable conflict

* feat: add pkg/utils/http HttpClientSkipTlsVerify HttpClient

* fix: realtime create http Transport

* fix: http keepalive connection may not reusable

* feat: allow http request use proxy from environment
2023-12-05 23:22:25 +08:00
naiba f62f68fbeb fix gosec (3 2023-10-21 22:21:21 +08:00
naiba a2e34bfc49 fix gosec (3 2023-10-21 22:21:21 +08:00
naiba 30db2f2441 fix gosec 2023-10-21 22:11:55 +08:00
naiba 68f10e4fc7 fix gosec 2023-10-21 22:11:55 +08:00
naiba 78cb02b886 fix gosec 2023-10-21 18:13:38 +08:00
naiba 014abbc41e fix gosec 2023-10-21 18:13:38 +08:00
naiba 668453eed0 v0.15.2 消息模板新增 #DATETIME# 占位符 2023-09-02 00:06:40 +08:00
naiba 93bcf833fd v0.15.2 消息模板新增 #DATETIME# 占位符 2023-09-02 00:06:40 +08:00
naiba bea284ad25 fix gosec G307 2023-02-12 21:10:34 +08:00
naiba ff8bf16171 fix gosec G307 2023-02-12 21:10:34 +08:00
naiba c8f6c5172e ⬆️ upgrade dependencies 2022-09-14 22:26:14 +08:00
naiba 1561ccb2fb ⬆️ upgrade dependencies 2022-09-14 22:26:14 +08:00