ipset: add comments

This commit is contained in:
nadoo 2017-10-02 19:39:57 +08:00
parent 97dda61483
commit ade87c9588
3 changed files with 5 additions and 5 deletions

View File

@ -16,6 +16,8 @@ import (
"unsafe"
)
// netfilter netlink message types
// https://github.com/torvalds/linux/blob/9e66317d3c92ddaab330c125dfe9d06eee268aff/include/uapi/linux/netfilter/nfnetlink.h#L56
const NFNL_SUBSYS_IPSET = 6
// http://git.netfilter.org/ipset/tree/include/libipset/linux_ip_set.h

View File

@ -11,12 +11,13 @@ import (
)
const (
// from linux/include/uapi/linux/netfilter_ipv4.h
// SO_ORIGINAL_DST from linux/include/uapi/linux/netfilter_ipv4.h
SO_ORIGINAL_DST = 80
// from linux/include/uapi/linux/netfilter_ipv6/ip6_tables.h
// IP6T_SO_ORIGINAL_DST from linux/include/uapi/linux/netfilter_ipv6/ip6_tables.h
IP6T_SO_ORIGINAL_DST = 80
)
// RedirProxy struct
type RedirProxy struct {
*Forwarder // as client
sDialer Dialer // dialer for server

View File

@ -10,9 +10,6 @@ import (
type Server interface {
// ListenAndServe as proxy server, use only in server mode.
ListenAndServe()
// Serve
// Serve(c net.Conn)
}
// ServerFromURL parses url and get a Proxy