Lines Matching refs:vhost
30 lws_set_socks(struct lws_vhost *vhost, const char *socks) in lws_set_socks() argument
39 vhost->socks_user[0] = '\0'; in lws_set_socks()
40 vhost->socks_password[0] = '\0'; in lws_set_socks()
46 lwsl_vhost_err(vhost, "auth too long"); in lws_set_socks()
54 lwsl_vhost_err(vhost, "user too long"); in lws_set_socks()
59 lwsl_vhost_err(vhost, "pw too long"); in lws_set_socks()
63 lws_strncpy(vhost->socks_user, socks, in lws_set_socks()
65 lws_strncpy(vhost->socks_password, p_colon + 1, in lws_set_socks()
69 lwsl_vhost_info(vhost, " Socks auth, user: %s, password: %s", in lws_set_socks()
70 vhost->socks_user, in lws_set_socks()
71 vhost->socks_password); in lws_set_socks()
76 lws_strncpy(vhost->socks_proxy_address, socks, in lws_set_socks()
77 sizeof(vhost->socks_proxy_address)); in lws_set_socks()
79 p_colon = strchr(vhost->socks_proxy_address, ':'); in lws_set_socks()
80 if (!p_colon && !vhost->socks_proxy_port) { in lws_set_socks()
81 lwsl_vhost_err(vhost, "socks_proxy needs to be address:port"); in lws_set_socks()
88 vhost->socks_proxy_port = (unsigned int)atoi(p_colon + 1); in lws_set_socks()
91 lwsl_vhost_debug(vhost, "Connections via Socks5 %s:%u", in lws_set_socks()
92 vhost->socks_proxy_address, in lws_set_socks()
93 vhost->socks_proxy_port); in lws_set_socks()
127 n = (ssize_t)strlen(wsi->a.vhost->socks_user); in lws_socks5c_generate_msg()
128 passwd_len = (ssize_t)strlen(wsi->a.vhost->socks_password); in lws_socks5c_generate_msg()
142 memcpy(p, wsi->a.vhost->socks_user, (size_t)n); in lws_socks5c_generate_msg()
149 memcpy(p, wsi->a.vhost->socks_password, (size_t)passwd_len); in lws_socks5c_generate_msg()
230 if (!wsi->a.vhost->socks_proxy_port) in lws_socks5c_greet()
363 wsi->a.vhost->socks_proxy_address)) { in lws_socks5c_handle_state()
369 wsi->c_port = (uint16_t)wsi->a.vhost->socks_proxy_port; in lws_socks5c_handle_state()