Lines Matching defs:hostport
84 get_valid_hostport (const char *hostport, char *out, size_t len)
87 const char *end = hostport + strlen (hostport);
91 if (!isalnum (*hostport))
96 *out++ = *hostport;
97 for (c = hostport + 1; c < end && len > 0; ++c, ++out, --len)
136 char hostport[6 + 255 + 2];
149 if (!get_valid_hostport (space + 1, hostport, sizeof (hostport)))
157 copied = snprintf (proxy_url, len, "http://%s", hostport);
161 copied = snprintf (proxy_url, len, "socks4://%s", hostport);
165 copied = snprintf (proxy_url, len, "socks5://%s", hostport);
169 copied = snprintf (proxy_url, len, "https://%s", hostport);