+#define SOCKS_VERSION_5 0x05
+#define SOCKS_AUTH_NONE 0
/* The socks phases */
enum
uint8_t auth_method;
};
-#define BUF_WAIT_FOR_CURL 0
-#define BUF_WAIT_FOR_MHD 1
-
-/* Struct used to store connection
- * information
- */
-struct socks5_bridge
-{
- int fd;
- struct socks5_bridge* remote_end;
- struct sockaddr addr;
- socklen_t addr_len;
- char host[256];
- int status;
-
- /* This is an ssl bridge? */
- int use_ssl;
-
- /* if use_ssl=1 we have a daemon associated */
- struct MHD_Daemon *ssl_daemon;
-
- /* http url + host */
- char* full_url;
-
- /* handle to curl */
- //CURL* curl;
-
- /* is response html? */
- int res_is_html;
-
- /* buffer structures */
- pthread_t thread;
- pthread_mutex_t m_done;
- int is_done;
- pthread_mutex_t m_buf;
- //char MHD_CURL_BUF[CURL_MAX_WRITE_SIZE];
- size_t MHD_CURL_BUF_SIZE;
- int MHD_CURL_BUF_STATUS;
-};
-
/* Server response to client requests */
struct socks5_server_response
{