(b []byte)
| 898 | } |
| 899 | |
| 900 | func (pc *proxyProtocolConn) Write(b []byte) (int, error) { |
| 901 | if !pc.proxyHeaderWritten { |
| 902 | _, err := pc.Conn.Write(pc.proxyHeader) |
| 903 | if err != nil { |
| 904 | return 0, err |
| 905 | } |
| 906 | pc.proxyHeaderWritten = true |
| 907 | } |
| 908 | return pc.Conn.Write(b) |
| 909 | } |
| 910 | |
| 911 | func proxyDialer(proxyHeader string) func(context.Context, string, string) (net.Conn, error) { |
| 912 | return func(_ context.Context, network string, addr string) (net.Conn, error) { |
no outgoing calls
no test coverage detected