mirror of
https://github.com/nmap/nmap.git
synced 2025-12-20 22:49:01 +00:00
Removed the global ProxyOps list.
Each proxy node now provides a pointer to its operations struct.
This commit is contained in:
@@ -77,7 +77,9 @@ static char *proxy_http_data_decode(const char *src, size_t len, size_t *dlen);
|
||||
|
||||
|
||||
/* ---- PROXY DEFINITION ---- */
|
||||
struct proxy_op proxy_http = {
|
||||
const struct proxy_op proxy_http_ops = {
|
||||
.prefix = "http://",
|
||||
.type = PROXY_TYPE_HTTP,
|
||||
.init = proxy_http_init,
|
||||
.handler = proxy_http_handler,
|
||||
.connect_tcp = proxy_http_connect_tcp,
|
||||
@@ -90,6 +92,8 @@ void proxy_http_init(struct proxy_node *proxy, char *proxystr) {
|
||||
struct sockaddr_in *sin;
|
||||
char *strhost, *strport, *saveptr;
|
||||
|
||||
proxy->ops = &proxy_http_ops;
|
||||
|
||||
strhost = strtok_r(proxystr + 7, ":", &saveptr);
|
||||
strport = strtok_r(NULL, ":", &saveptr);
|
||||
if (strport == NULL)
|
||||
|
||||
Reference in New Issue
Block a user