proxy: support server mode of PROXY protocol v1

This commit is contained in:
nadoo committed 2021-08-04 19:13:22 +08:00
1 parent 32e1c37cfe
commit 7486373821
15 files changed
+173 -37

No files matched your search

+1 -1
View File
@@ -66,7 +66,7 @@ func (pc *PktConn) ReadFrom(b []byte) (int, net.Addr, error) {
return n, raddr, errors.New("not enough size to get addr")
}
// https://tools.ietf.org/html/rfc1928#section-7
// https://www.rfc-editor.org/rfc/rfc1928#section-7
// +----+------+------+----------+----------+----------+
// |RSV | FRAG | ATYP | DST.ADDR | DST.PORT | DATA |
// +----+------+------+----------+----------+----------+
+1 -1
View File
@@ -1,4 +1,4 @@
// https://tools.ietf.org/html/rfc1928
// https://www.rfc-editor.org/rfc/rfc1928
// socks5 client:
// https://github.com/golang/net/tree/master/proxy