mirror of
				https://github.com/nadoo/glider.git
				synced 2025-11-04 07:42:38 +08:00 
			
		
		
		
	ipset: add comments
This commit is contained in:
		
							parent
							
								
									09e1b9342d
								
							
						
					
					
						commit
						1177c89102
					
				@ -16,6 +16,8 @@ import (
 | 
				
			|||||||
	"unsafe"
 | 
						"unsafe"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// netfilter netlink message types
 | 
				
			||||||
 | 
					// https://github.com/torvalds/linux/blob/9e66317d3c92ddaab330c125dfe9d06eee268aff/include/uapi/linux/netfilter/nfnetlink.h#L56
 | 
				
			||||||
const NFNL_SUBSYS_IPSET = 6
 | 
					const NFNL_SUBSYS_IPSET = 6
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// http://git.netfilter.org/ipset/tree/include/libipset/linux_ip_set.h
 | 
					// http://git.netfilter.org/ipset/tree/include/libipset/linux_ip_set.h
 | 
				
			||||||
 | 
				
			|||||||
@ -11,12 +11,13 @@ import (
 | 
				
			|||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const (
 | 
					const (
 | 
				
			||||||
	// from linux/include/uapi/linux/netfilter_ipv4.h
 | 
						// SO_ORIGINAL_DST from linux/include/uapi/linux/netfilter_ipv4.h
 | 
				
			||||||
	SO_ORIGINAL_DST = 80
 | 
						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
 | 
						IP6T_SO_ORIGINAL_DST = 80
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// RedirProxy struct
 | 
				
			||||||
type RedirProxy struct {
 | 
					type RedirProxy struct {
 | 
				
			||||||
	*Forwarder        // as client
 | 
						*Forwarder        // as client
 | 
				
			||||||
	sDialer    Dialer // dialer for server
 | 
						sDialer    Dialer // dialer for server
 | 
				
			||||||
 | 
				
			|||||||
@ -10,9 +10,6 @@ import (
 | 
				
			|||||||
type Server interface {
 | 
					type Server interface {
 | 
				
			||||||
	// ListenAndServe as proxy server, use only in server mode.
 | 
						// ListenAndServe as proxy server, use only in server mode.
 | 
				
			||||||
	ListenAndServe()
 | 
						ListenAndServe()
 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Serve
 | 
					 | 
				
			||||||
	// Serve(c net.Conn)
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// ServerFromURL parses url and get a Proxy
 | 
					// ServerFromURL parses url and get a Proxy
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user