1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-20 06:29:02 +00:00
Commit Graph

12 Commits

Author SHA1 Message Date
henri
6e8b30d721 Added support to resolve proxy hostnames. 2013-04-22 19:32:52 +00:00
henri
b7b3b4bd3e Default port is set to -1 (and not zero) when not specified in proxy specification string. 2013-04-22 19:32:44 +00:00
henri
da1559b237 Replaced a couple macros by corresponding static inline functions.
Removed unused PROXY_CTX_NODES() macro.
2013-04-22 19:32:20 +00:00
henri
6c0d537efb Removed unused http_proxy_info structure. 2013-04-22 19:32:11 +00:00
henri
152490e630 Removed per-node information structures as well as data encoding/decoding
interface.

These were unused and I think won't be required by any proxy type (HTTP and
SOCKS).
2013-04-22 19:32:04 +00:00
henri
173adc678b Implemented a more robust URI parser. Code largely adapted from ncat/http.c. 2013-04-22 19:31:56 +00:00
henri
ba27c10458 Removed the proxy-specific tcp_connect hook.
This simplifies the interface that proxies export to the library but also relies
upon the assumption that a proxy chain starts with a TCP connection from the
scanner to the next hop proxy. That will be enough ATM.
2013-04-22 19:31:40 +00:00
henri
4d5bb41361 Added skeletton for having px_info list in each Nsock IOD.
When establishing the tunnel through proxy chain, we need to track status of
each proxy (storing R/W buffers, stats, retries...).

This patch lets proxies store and manage whatever structure they want to have
for this in a Nsock IOD. Since types can differ between proxy types, the
proxy_info are stored as a list of void *, ordered like the proxy nodes.
2013-04-22 19:31:30 +00:00
henri
af65c7448f Removed 'data_' prefixes to encoding/decoding functions to avoid confusion with functions that deal with proxy internal data structures. 2013-04-22 19:31:14 +00:00
henri
5168ff9113 Moved prototypes to nsock_proxy.h 2013-04-22 19:31:06 +00:00
henri
f1a04abd6b Removed the global ProxyOps list.
Each proxy node now provides a pointer to its operations struct.
2013-04-22 19:30:49 +00:00
henri
3451220630 Refactored proxy code to use a "strategy" design pattern.
Proxy backends are selected at runtime. Each proxy exports a list of operations
to the rest of the library. This is similar to the way IO engines are
implemented within nsock.
2013-04-22 19:30:40 +00:00