You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
httpAddrs=flag.String("http_addrs", ":80", "comma-separated addresses to listen for HTTP traffic on")
18
17
sniAddrs=flag.String("sni_addrs", ":443,:444", "comma-separated addresses to listen for SNI traffic on")
19
-
ldapServer=flag.String("ldap_server", "scripts-ldap.mit.edu:389", "LDAP server to query")
18
+
ldapServers=flag.String("ldap_servers", "scripts-ldap.mit.edu:389", "comma-spearated LDAP servers to query")
20
19
defaultHost=flag.String("default_host", "scripts.mit.edu", "default host to route traffic to if SNI/Host header cannot be parsed or cannot be found in LDAP")
21
20
baseDn=flag.String("base_dn", "ou=VirtualHosts,dc=scripts,dc=mit,dc=edu", "base DN to query for hosts")
21
+
localRange=flag.String("local_range", "18.4.86.0/24", "IP block for client IP spoofing. If the resolved destination address is in this subnet, the source IP address of the backend connection will be spoofed to match the client IP. This subnet needs to be local to the proxy.")
22
22
)
23
23
24
+
constldapRetries=3
25
+
24
26
funcalways(context.Context, string) bool {
25
27
returntrue
26
28
}
27
29
28
30
typeldapTargetstruct {
29
-
ldap*ldap.Conn
31
+
localPoolRange*net.IPNet
32
+
ldap*ldap.Pool
30
33
}
31
34
32
35
// HandleConn is called by tcpproxy after receiving a connection and sniffing the host.
0 commit comments