Commit graph

14 commits

Author SHA1 Message Date
fatedier
a88e0e9a49
refactor: clean up code (#5308)
Some checks failed
golangci-lint / lint (push) Has been cancelled
2026-05-12 11:13:50 +08:00
fatedier
eeb0dacfc1
pkg/metrics/mem: remove redundant map write-backs and optimize proxy lookup (#5221)
Remove 4 redundant pointer map write-backs in OpenConnection,
CloseConnection, AddTrafficIn, and AddTrafficOut since the map stores
pointers and mutations are already visible without reassignment.

Optimize GetProxiesByTypeAndName from O(n) full map scan to O(1) direct
map lookup by proxy name.
2026-03-08 10:40:39 +08:00
fatedier
bb3d0e7140
deduplicate common logic across proxy, visitor, and metrics modules (#5213)
- Replace duplicate parseBasicAuth with existing httppkg.ParseBasicAuth
- Extract buildDomains helper in BaseProxy for HTTP/HTTPS/TCPMux proxies
- Extract toProxyStats helper to deduplicate ProxyStats construction
- Extract startVisitorListener helper in BaseProxy for STCP/SUDP proxies
- Extract acceptLoop helper in BaseVisitor for STCP/XTCP visitors
2026-03-07 12:00:27 +08:00
fatedier
266c492b5d
web/frps: add detailed client and proxy views with enhanced tracking (#5144) 2026-01-31 02:18:35 +08:00
Charlie Blevins
7cfa546b55
add proxy name label to the proxy_count prometheus metric (#4985)
* add proxy name label to the proxy_count metric

* undo label addition in favor of a new metric - this change should not break existing queries

* also register this new metric

* add type label to proxy_counts_detailed

* Update pkg/metrics/prometheus/server.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-23 00:18:49 +08:00
fatedier
43cf1688e4 update golangci-lint version (#4817) 2025-06-25 11:40:23 +08:00
fatedier
43ba7bd338
use new log package (#4054) 2024-03-12 13:58:53 +08:00
fatedier
b31c67d7c0
web: support to clear offline proxies data on dashboard (#3963) 2024-02-01 10:54:57 +08:00
fatedier
184223cb2f
Code refactoring related to message handling and retry logic. (#3745) 2023-11-06 10:51:48 +08:00
fatedier
46ff40543a
update github actions (#3538) 2023-07-21 10:30:46 +08:00
fatedier
c71efde303
refactor the code related to xtcp (#3449) 2023-05-28 16:50:43 +08:00
fatedier
9d077b02cf
lint by golangci-lint (#3080) 2022-08-29 01:02:53 +08:00
harmy
ef5ae3e598
fix: a reconnected proxy will disappear from dashboard after 7 days (#2008) 2020-09-25 16:10:20 +08:00
fatedier
3fbdea0f6b
rename models to pkg (#2005) 2020-09-23 13:49:14 +08:00