Commit Graph

14 Commits

Author SHA1 Message Date
ginuerzh 48f31513c7 feat(hosts): add catch-all host mapping with '.' pattern
Adds a catch-all fallback to hostMapper.Lookup() that matches any
hostname when a '.' mapping exists. After the existing three-phase
matching (exact -> dot-prefix -> suffix walk) fails, the lookup now
checks for a standalone '.' entry as a final fallback.

This enables users to map all hostnames to a single IP (e.g., for SNI
proxy usage) with a simple configuration like 'hosts=.:<ip>'.

Fixes go-gost/gost#228
2026-06-20 20:47:10 +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 4eb006f1b0 tungo: debug exec.Command output 2025-08-09 16:34:04 +08:00
ginuerzh b1390dda1c router: update system routes for linux 2023-11-30 19:39:37 +08:00
ginuerzh e5fa371586 add options for components 2023-10-26 22:20:10 +08:00
ginuerzh ea585fc25d add reload and plugin support for hop 2023-09-28 21:04:15 +08:00
ginuerzh 32c8188351 add plugin system 2023-04-18 20:52:56 +08:00
ginuerzh 5237f79740 add chain hop 2022-09-20 17:54:03 +08:00
ginuerzh efd8838c18 added proxy protocol 2022-09-08 21:31:11 +08:00
ginuerzh be7af96d40 improve cidr matcher 2022-08-31 10:10:14 +08:00
ginuerzh f3f3acd4e1 more fine-grained log level 2022-08-18 11:34:57 +08:00
ginuerzh 5f3e4177a1 improve file and redis loader 2022-04-21 23:24:52 +08:00
ginuerzh b0859bcebf add loader for hosts 2022-04-12 22:25:21 +08:00
ginuerzh a3346ad246 add pkgs from core 2022-04-04 12:44:35 +08:00