mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Enable proxy support in TCP_connection.
This commit is contained in:
parent
863b6d6f4c
commit
0886b4f7b8
|
@ -978,7 +978,7 @@ unsigned int tcp_copy_connected_relays(TCP_Connections *tcp_c, Node_format *tcp_
|
|||
return copied;
|
||||
}
|
||||
|
||||
TCP_Connections *new_tcp_connections(DHT *dht)
|
||||
TCP_Connections *new_tcp_connections(DHT *dht, TCP_Proxy_Info *proxy_info)
|
||||
{
|
||||
if (dht == NULL)
|
||||
return NULL;
|
||||
|
@ -989,6 +989,8 @@ TCP_Connections *new_tcp_connections(DHT *dht)
|
|||
return NULL;
|
||||
|
||||
temp->dht = dht;
|
||||
temp->proxy_info = *proxy_info;
|
||||
|
||||
return temp;
|
||||
}
|
||||
|
||||
|
|
|
@ -185,7 +185,7 @@ int add_tcp_relay_global(TCP_Connections *tcp_c, IP_Port ip_port, const uint8_t
|
|||
*/
|
||||
unsigned int tcp_copy_connected_relays(TCP_Connections *tcp_c, Node_format *tcp_relays, uint16_t max_num);
|
||||
|
||||
TCP_Connections *new_tcp_connections(DHT *dht);
|
||||
TCP_Connections *new_tcp_connections(DHT *dht, TCP_Proxy_Info *proxy_info);
|
||||
void do_tcp_connections(TCP_Connections *tcp_c);
|
||||
void kill_tcp_connections(TCP_Connections *tcp_c);
|
||||
|
||||
|
|
|
@ -2346,7 +2346,7 @@ Net_Crypto *new_net_crypto(DHT *dht, TCP_Proxy_Info *proxy_info)
|
|||
if (temp == NULL)
|
||||
return NULL;
|
||||
|
||||
temp->tcp_c = new_tcp_connections(dht);
|
||||
temp->tcp_c = new_tcp_connections(dht, proxy_info);
|
||||
|
||||
if (temp->tcp_c == NULL) {
|
||||
free(temp);
|
||||
|
@ -2377,8 +2377,6 @@ Net_Crypto *new_net_crypto(DHT *dht, TCP_Proxy_Info *proxy_info)
|
|||
|
||||
bs_list_init(&temp->ip_port_list, sizeof(IP_Port), 8);
|
||||
|
||||
temp->proxy_info = *proxy_info;
|
||||
|
||||
return temp;
|
||||
}
|
||||
|
||||
|
|
|
@ -200,8 +200,6 @@ typedef struct {
|
|||
uint32_t current_sleep_time;
|
||||
|
||||
BS_LIST ip_port_list;
|
||||
|
||||
TCP_Proxy_Info proxy_info;
|
||||
} Net_Crypto;
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user