Commit Graph

21 Commits

Author SHA1 Message Date
ginuerzh 618cc7fd9c fix(plugin): CloseIdleConnections silent no-op when tokenTransport wraps HTTP transport
tokenTransport now delegates CloseIdleConnections to the underlying
*http.Transport so http.Client.CloseIdleConnections() works through
the wrapper. Three plugin Close() methods updated to unwrap via
HTTPClientTransport before calling CloseIdleConnections.

RoundTrip now short-circuits when caller already set Authorization,
avoiding an unnecessary req.Clone allocation on the pass-through path.
2026-05-27 20:37:14 +08:00
ginuerzh 011759d888 docs(hosts,hop): add doc comments, fix missing httpLoader.Close, accumulate reload errors
- hosts/hosts.go: add package and symbol doc comments, fix missing
  httpLoader.Close() in Close()
- hosts/plugin: add doc comments for HTTP and gRPC plugin types
- hop/hop.go: add doc comments, accumulate reload/parse errors via errors.Join
  instead of silently discarding them
- hop/plugin/http.go: add doc comments and missing Close() method
- Add unit tests for hosts (580 lines) and hop (991 lines)
2026-05-24 16:00:53 +08:00
ginuerzh 238a0b95b7 feat: upgrade core to v0.4.0, pass network to admission, add dial options
Upgrade github.com/go-gost/core from v0.3.3 to v0.4.0, adapting to
interface changes:
- Admit(ctx, network, addr, opts) now accepts a network parameter
- Router.Dial now accepts variadic chain.DialOption, forwarded to
  the route's Dial call along with router-level options
- gRPC/HTTP admission plugins include the new Network field

Also fix two typos: ResoloverNodeOption -> ResolverNodeOption,
WithHostOpton -> WithHostOption.
2026-05-21 21:26:49 +08:00
ginuerzh 0e5c285eb7 fix empty hop nodes 2025-08-10 18:36:43 +08:00
ginuerzh 4eb006f1b0 tungo: debug exec.Command output 2025-08-09 16:34:04 +08:00
ginuerzh b597467858 add context for conn 2025-08-04 19:29:38 +08:00
ginuerzh c2aedbabd9 add routing rule for node 2024-11-15 20:28:47 +08:00
ginuerzh 118ee91c95 fix error response for web APIs 2024-06-04 22:05:13 +08:00
ginuerzh 754b2fdeac fix redis loader for hop 2024-05-08 21:26:15 +08:00
ginuerzh 3d2a7b7d3b move x/internal/ctx to x/ctx 2024-01-30 18:19:39 +08:00
ginuerzh 43d37d0a5f fix hop http plugin 2024-01-27 21:29:45 +08:00
ginuerzh 01168e9846 fix deadlock in websocket client conn 2024-01-12 23:46:22 +08:00
ginuerzh c04c28e1fd add protocol based node selection for hop 2024-01-08 21:22:20 +08:00
ginuerzh c959fc2f73 add observer 2024-01-03 20:55:06 +08:00
ginuerzh f847fa533e fix auth for file handler 2023-12-16 14:28:58 +08:00
ginuerzh b1390dda1c router: update system routes for linux 2023-11-30 19:39:37 +08:00
ginuerzh 88cc6ff4d5 add traffic limiter for proxy handler 2023-11-18 18:28:09 +08:00
ginuerzh 6bface4581 add path option for hop 2023-11-09 20:34:59 +08:00
ginuerzh 0bef7c0cdf improve tunnel handler 2023-10-27 22:11:11 +08:00
ginuerzh 836cf6eade add network for bypass 2023-09-30 17:51:55 +08:00
ginuerzh ea585fc25d add reload and plugin support for hop 2023-09-28 21:04:15 +08:00