mkdir gnalloy-app && cd gnalloy-app
go mod init example.com/gnalloy-app
go get gnalloy.org/handler-proxy@dev
go doc gnalloy.org/handler-proxyThe current source tree exposes these package import paths:
gnalloy.org/handler-proxy
Use go doc against the package that matches the behavior you need:
go doc gnalloy.org/handler-proxySelected current exported entry points:
const SOCKS4Version byte = 0x04 ...const SOCKS5Version byte = 0x05 ...var ErrNeedMore = errors.New("gnalloy/handler/proxy: need more bytes") ...func AppendHTTPConnectRequest(dst []byte, req HTTPConnectRequest) ([]byte, error)func AppendSOCKS4Bind(dst []byte, address string, userID string) ([]byte, error)func AppendSOCKS4Command(dst []byte, command byte, address string, userID string) ([]byte, error)
Repository tests are executable examples of supported behavior. Start with the selected names below, then read the matching _test.go files for complete setup and assertions. See Testing and Performance for the complete discovered list.
GOWORK=off GOTOOLCHAIN=local go test ./... -run Test -count=1Selected current test, benchmark, fuzz, and example entry points:
TestHTTPConnectClientWritesRequestAndEmitsEventTestHTTPConnectRequestAndResponseTestParseHAProxyV1AndV2TestSOCKS4ClientRejectsHandshakeFailureTestSOCKS4ClientWritesConnectAndEmitsEventTestSOCKS4ConnectHelpersTestSOCKS5ClientRejectsHandshakeFailureTestSOCKS5ClientUsernamePasswordAuthTestSOCKS5ClientWritesGreetingConnectAndEmitsEventTestSOCKS5CommandHelpersEncodeBindAndUDPAssociateTestSOCKS5GreetingConnectAndReplyTestSOCKS5UsernamePasswordAuthHelpers
Direct Gnalloy dependencies for this module:
gnalloy.org/gnalloy
Assembly guidance:
- Use this handler inside a Gnalloy pipeline to apply policy, lifecycle, protection, logging, metrics, or traffic behavior.
- Keep protocol parsing in codec modules and socket ownership in transport modules.
- Place the handler where its inbound and outbound semantics match the selected protocol stack.
For sustained load, wire this module into a scenario under gnalloy.org/benchmarks or a runnable client under gnalloy.org/examples when the module participates in network traffic. Record host, OS, CPU, Go version, protocol, payload, concurrency, warmup, repetitions, throughput, and p99 latency in the report.