* This function can accept a NULL pointer as `addr', in which case
* it will only check the host name.
*/
-static int proxy_for_destination (SockAddr addr, const char *hostname,
- int port, Conf *conf)
+int proxy_for_destination (SockAddr addr, const char *hostname,
+ int port, Conf *conf)
{
int s = 0, e = 0;
char hostip[64];
return 1;
}
-SockAddr name_lookup(char *host, int port, char **canonicalname,
+SockAddr name_lookup(const char *host, int port, char **canonicalname,
Conf *conf, int addressfamily)
{
if (conf_get_int(conf, CONF_proxy_type) != PROXY_NONE &&
return sk_namelookup(host, canonicalname, addressfamily);
}
-Socket new_connection(SockAddr addr, char *hostname,
+Socket new_connection(SockAddr addr, const char *hostname,
int port, int privport,
int oobinline, int nodelay, int keepalive,
Plug plug, Conf *conf)
sk_proxy_write_eof,
sk_proxy_flush,
sk_proxy_set_frozen,
- sk_proxy_socket_error
+ sk_proxy_socket_error,
+ NULL, /* peer_info */
};
static const struct plug_function_table plug_fn_table = {
return sk_new(addr, port, privport, oobinline, nodelay, keepalive, plug);
}
-Socket new_listener(char *srcaddr, int port, Plug plug, int local_host_only,
- Conf *conf, int addressfamily)
+Socket new_listener(const char *srcaddr, int port, Plug plug,
+ int local_host_only, Conf *conf, int addressfamily)
{
/* TODO: SOCKS (and potentially others) support inbound
* TODO: connections via the proxy. support them.