How phuslu/liner works
Liner appears to be a configurable network proxy and tunneling server: clients enter through DNS, HTTP, SOCKS, SSH, transparent-proxy, or TUN interfaces, and traffic can be forwarded through selectable dialers. Its HTTP web handlers also provide site content and ancillary services. The README supplies no capability detail; the graph relies on the sampled handler excerpts and the limited main.go excerpt, so unsampled configuration and routing links are omitted.
Main entry points: handler_dns.go DNS handler · handler_http_web.go Web handler · handler_tun.go TUN handler · main.go Server setup
Components 27
Runtime setup
- Server setup
main.go
Client ingress
- DNS handler
handler_dns.go - HTTP forward proxy
handler_http_forward.go - HTTP tunnel
handler_http_tunnel.go - SOCKS proxy
handler_socks.go - SSH server
handler_ssh.go - Transparent proxy
handler_tproxy.go - TUN handler
handler_tun.go
HTTP web services
- HTTP server
handler_http.go - Web handler
handler_http_web.go - Web content
handler_http_web_index.go - Web reverse proxy
handler_http_web_proxy.go - CGI service
handler_http_web_cgi.go - WebDAV service
handler_http_web_dav.go - DNS-over-HTTPS
handler_http_web_doh.go - Log tail
handler_http_web_logtail.go - Web shell
handler_http_web_shell.go
Forwarding transports
- Dialer implementations
dialer_http3.go - Tunnel transports
handler_tunnel.go
Resolution and support
- Template functions
functions.go - DNS resolver pool
resolver_dns.go - Geo resolver
resolver_geo.go - Process lookup (Darwin)
processinfo_darwin.go - Process lookup (Linux)
processinfo_linux.go - Process lookup (Windows)
processinfo_windows.go
Other components
- Network clients
- Upstream network services
Connections 20
- Network clients → DNS handler: queries
handler_dns.go - Network clients → HTTP forward proxy: proxies requests
handler_http_forward.go - Network clients → HTTP tunnel: opens tunnel
handler_http_tunnel.go - Network clients → SOCKS proxy: opens proxy
handler_socks.go - Network clients → SSH server: opens session
handler_ssh.go - Network clients → Transparent proxy: sends traffic
handler_tproxy.go - Network clients → TUN handler: sends packets
handler_tun.go - Network clients → HTTP server: requests content
- Server setup → DNS resolver pool: creates resolver
main.go - Server setup → TUN handler: configures TUN
main.go - DNS handler → DNS resolver pool: selects upstream
handler_dns.go - DNS handler → Upstream network services: forwards queries
handler_dns.go - HTTP forward proxy → Dialer implementations: dials target
- HTTP tunnel → Upstream network services: opens streams
handler_http_tunnel.go - SOCKS proxy → Upstream network services: dials target
handler_socks.go - Transparent proxy → Upstream network services: dials target
handler_tproxy.go - TUN handler → Upstream network services: forwards traffic
handler_tun.go - HTTP server → Web handler: serves requests
- Web handler → Web content: serves content
- Web handler → Web reverse proxy: dispatches proxy