Home | History | Annotate | Download | only in x11vnc

Lines Matching defs:host

183 		p = tmp_host = strdup(cl->host);
325 if (!strcmp(rstr, cl->host)) {
474 addr = client->host;
478 addr = "unknown-host";
878 addr = client->host;
884 rfbLog("client_gone: using cmd: %s\n", client->host);
964 rfbLog("check_access: denying empty host IP address string.\n");
1100 rfbLog("check_access: client %s " "matches host %s=%s\n", addr, chk, p);
1102 rfbLog("check_access: client %s " "matches host %s\n", addr, chk);
1576 char *addr = client->host;
1584 addr = "unknown-host";
1796 if (cl->host) {
1797 free(cl->host);
1799 cl->host = name;
1895 if (cl->host) {
1896 free(cl->host);
1898 cl->host = name;
1910 char line[VNC_CONNECT_MAX], host[VNC_CONNECT_MAX];
1957 if (sscanf(line, "%s", host) == 1) {
1958 if (strlen(host) > 0) {
1959 char *str = strdup(host);
1992 static int socks5_proxy(char *host, int port, int sock) {
2024 buf[4] = (unsigned char) strlen(host);
2025 strcat((char *) buf+5, host);
2027 len = 5 + strlen(host);
2074 rfbLog("SOCKS5 connect OK to %s:%d sock=%d\n", host, port, sock);
2077 rfbLog("SOCKS5 error to %s:%d sock=%d\n", host, port, sock);
2083 static int socks_proxy(char *host, int port, int sock) {
2096 if (strlen(host) > 256) {
2097 rfbLog("socks_proxy: hostname too long: %s\n", host);
2102 if (!strcmp(host, "localhost") || !strcmp(host, "127.0.0.1")) {
2107 } else if (sscanf(host, "%d.%d.%d.%d", &d1, &d2, &d3, &d4) == 4) {
2125 strcat((char *) buf+8+strlen("nobody") + 1, host);
2126 len += strlen(host) + 1;
2162 rfbLog("SOCKS4a connect OK to %s:%d sock=%d\n", host, port, sock);
2164 rfbLog("SOCKS4 connect OK to %s:%d sock=%d\n", host, port, sock);
2169 rfbLog("SOCKS4a error to %s:%d sock=%d\n", host, port, sock);
2171 rfbLog("SOCKS4 error to %s:%d sock=%d\n", host, port, sock);
2187 static int pconnect(int psock, char *host, int port, int type, char *http_path, char *gethost, int getport) {
2195 return socks_proxy(host, port, psock);
2198 return socks5_proxy(host, port, psock);
2204 len = strlen("CONNECT ") + strlen(host);
2207 len += strlen("host=") + 1 + strlen("port=") + 1 + 1;
2224 sprintf(req, "GET %shost=%s&port=%d HTTP/1.1\r\n", http_path, host, port);
2227 sprintf(req, "CONNECT %s:%d HTTP/1.1\r\n", host, port);
2238 sprintf(req, "Host: %s:%d\r\n", gethost, getport);
2240 sprintf(req, "Host: %s:%d\r\n\r\n", gethost, getport);
2242 sprintf(req, "Host: %s:%d\r\n", host, port);
2244 sprintf(req, "Host: %s:%d\r\n\r\n", host, port);
2283 char *t2 = strstr(reply, "VNC-Host-Port: ");
2296 t2 += strlen("VNC-Host-Port: ");
2314 static int proxy_connect(char *host, int port) {
2445 len = 200 + strlen(ssh) + strlen(pxy_h[0]) + strlen(host);
2449 sprintf(cmd, "%s -f -L '%d:%s:%d' '%s' 'sleep 20'", ssh, sport, host, port, pxy_h[0]);
2451 sprintf(cmd, "%s -f -p %d -L '%d:%s:%d' '%s' 'sleep 20'", ssh, pxy_p[0], sport, host, port, pxy_h[0]);
2499 if (! pconnect(psock, host, port, pxy[2], pxy_g[2], pxy_h[2], pxy_p[2])) {
2505 if (! pconnect(psock, host, port, pxy[1], pxy_g[1], pxy_h[1], pxy_p[1])) {
2511 if (! pconnect(psock, host, port, pxy[0], pxy_g[0], pxy_h[0], pxy_p[0])) {
2623 * Do a reverse connect for a single "host" or "host:port"
2628 char *host, *p, *str = str_in, *s = NULL;
2653 /* repeater://host:port+string */
2654 /* repeater=string+host:port */
2665 /* copy in to host */
2666 host = (char *) malloc(len+1);
2667 if (! host) {
2671 strncpy(host, str, len);
2672 host[len] = '\0';
2675 if ((p = strrchr(host, ':')) != NULL) {
2693 vncsock = proxy_connect(host, rport);
2695 vncsock = connect_tcp(host, rport);
2724 free(host);
2729 if(strcmp(host, "localhost") && strcmp(host, "127.0.0.1")) {
2731 rfbLog("reverse_connect: error host not localhost in -stunnel mode.\n");
2740 if(!strcmp(host, "localhost") || !strcmp(host, "127.0.0.1")) {
2768 int sock = proxy_connect(host, rport);
2780 int sock = connect_tcp(host, rport);
2790 cl = rfbReverseConnection(screen, host, rport);
2792 int sock = connect_tcp(host, rport);
2804 free(host);
2819 rfbLog("reverse_connect: %s/%s OK\n", str, cl->host);
2823 cl->host);
3857 if (!cl->host) {
3858 rfbLog("empty cl->host during chat_helper login\n");
3861 if (strcmp(cl->host, "127.0.0.1")) {
3862 rfbLog("invalid cl->host during chat_helper login: %s\n", cl->host);
3897 cd->hostname = ip2host(client->host);
3898 rfbLog("client_set_net: %s %.4f\n", client->host, dnow() - dt);
3929 " yet.\n", client->host);
3936 client->host);
3944 client->host, get_remote_port(client->sock));
3952 rfbLog("renaming client->host from '%s' to '%s'\n",
3953 client->host ? client->host : "", ipv6_client_ip_str);
3954 if (client->host) {
3955 free(client->host);
3957 client->host = strdup(ipv6_client_ip_str);
3960 if (! check_access(client->host)) {
3961 rfbLog("denying client: %s does not match %s\n", client->host,
3987 client->host);
4057 client->host, get_remote_port(client->sock), client->sock);
4131 client->host);
4148 char *host = NULL, *cookie = NULL, *p;
4172 host = strdup(p);
4183 if (db) fprintf(stderr, "%s/%d/%s next=%d\n", host, port, cookie, next);
4185 if (host && port && cookie) {
4186 if (*host == '\0') {
4187 free(host);
4188 host = strdup("localhost");
4190 sock = connect_tcp(host, port);
4193 sock = connect_tcp(host, port);
4210 rfbLog("client_info_sock to: %s:%d\n", host, port);
4212 rfbLog("failed client_info_sock: %s:%d\n", host, port);
4218 if (host) free(host);