Skip to content

Commit

Permalink
using first detected socks5 proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
naxuroqa committed Aug 17, 2014
1 parent 3542664 commit f98ffc9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/core/ToxSession.vala
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,11 @@ namespace Venom {
if(proxy_regex != null && proxy_regex.match(proxy, 0, out info)) {
string proxy_host = info.fetch_named("host");
string proxy_port = info.fetch_named("port");
Logger.log(LogLevel.DEBUG, "parsed host: " + proxy_host + " port: " + proxy_port);
//FIXME currently commented out since it crashes the core
//options.proxy_enabled = 1;
//Memory.copy(options.proxy_address, proxy_host.data, int.min(proxy_host.length, options.proxy_address.length));
//options.proxy_port = (uint16)int.parse(proxy_port);
options.proxy_enabled = 1;
options.udp_disabled = 1;
Memory.copy(*(&options.proxy_address), proxy_host.data, int.min(proxy_host.length, options.proxy_address.length));
options.proxy_port = (uint16)int.parse(proxy_port);
break;
} else {
Logger.log(LogLevel.INFO, "socks5 proxy does not match regex");
}
Expand Down

0 comments on commit f98ffc9

Please sign in to comment.