26 Commits
Author SHA1 Message Date
Mxmilu 71b31978b3 fix(server): close underlying work conn when server bandwidth limiter is enabled (#5553)
When bandwidthLimitMode is "server", the work connection is wrapped by
libio.WrapReadWriteCloser with a close callback that captured the
variable being reassigned (local/rwc). At call time the callback
referenced the wrapper itself, whose closed guard was already set, so
Close returned nil without closing the underlying work connection.

For TCP proxies this left libio.Join blocked on the other copy
goroutine after the user disconnected, keeping the work connection and
the backend connection open. HTTP and UDP proxies had the same pattern.

Bind the Close method value before reassignment, and add an e2e test
verifying that the local connection is closed after the user
disconnects.
2026-10-10 10:45:34 +08:00
fatedier effa496859 feat: add negotiated binary UDP packets (#5456) 2026-07-30 13:19:55 +08:00
fatedier 7f8d68b666 feat: use wire v2 framing for UDP workConn payload (#5340) 2026-06-01 16:22:34 +08:00
Oleksandr Redko c2454e7114 refactor: fix modernize lint issues (#5215) 2026-03-07 23:10:19 +08:00
fatedier 462c987f6d pkg/msg: change UDPPacket.Content from string to []byte to avoid redundant base64 encode/decode (#5198) 2026-03-06 01:38:24 +08:00
fatedier 7526d7a69a refactor: separate auth config from runtime and defer token resolution (#5105) 2025-12-25 00:53:08 +08:00
fatedier 43ba7bd338 use new log package (#4054) 2024-03-12 13:58:53 +08:00
fatedier 69ae2b0b69 optimize some code (#3801) 2023-11-27 15:47:49 +08:00
fatedier c95311d1a0 support yaml/json/toml configuration format, make ini deprecated (#3599) 2023-09-06 10:18:02 +08:00
fatedier e1cef053be server/proxy: simplify the code (#3488) 2023-06-16 00:14:19 +08:00
fatedier 9aef3b9944 adjust code style about config (#3464) 2023-05-30 20:25:22 +08:00
fatedier 555db9d272 format import package name (#3455) 2023-05-29 14:10:34 +08:00
Craig O'Donnell aa31d7ad0b support bandwidth_limit set by server plugin (#3271)
* support bandwidth_limit set by server plugin

* limiter at proxy level

* bandwidth_limit_mode

* updates tests for bandwidth_limit_mode default

* bandwidth_limit_mode as string

* add checkForSrv for bandwidth_limit_mode

* bandwidth_limit flags for sub cmds

* gci write
2023-02-09 00:38:36 +08:00
fatedier 9d077b02cf lint by golangci-lint (#3080) 2022-08-29 01:02:53 +08:00
fatedier 6194273615 use net.JoinHostPort instead of fmt.Sprintf (#2791) 2022-02-09 15:19:35 +08:00
fatedier fbaa5f866e add e2e tests (#2334) 2021-03-31 16:57:39 +08:00
fatedier 3fbdea0f6b rename models to pkg (#2005) 2020-09-23 13:49:14 +08:00
fatedier c9fe23eb10 more e2e tests (#1845) 2020-09-07 14:57:23 +08:00
fatedier 8b75b8b837 fix by golint (#1822) 2020-05-24 17:48:37 +08:00
Tank d193519329 feat: Support user specify udp packet size in config (#1794) 2020-05-07 17:47:36 +08:00
fatedier 495d999b6c refactoring monitor code, support prometheus (#1668)
* refactoring monitor code, support prometheus
* remove vendor
2020-03-11 13:20:26 +08:00
fatedier 649f47c345 change log method 2019-10-12 20:13:12 +08:00
Tyler Compton 6277af4790 Pass server configuration as an argument
The ServerCommonConf is now passed around as an argument instead of
being shared between components as a global variable. This allows for
more natural interaction with server.Session as a library and allows for
multiple servers to co-exist within the same process.

Related: #1387
2019-08-19 15:52:08 -07:00
fatedier 9c4ec56491 support proxy protocol 2019-03-29 19:01:18 +08:00
fatedier 48990da22e go vet 2019-01-31 16:49:23 +08:00
fatedier 611d063e1f server: adjust code structure 2019-01-15 00:11:08 +08:00