From 86c7eb23fe4023b28be0966b3af4d83e44c0469a Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Tue, 18 Oct 2011 01:12:35 +0300 Subject: =?UTF-8?q?=D0=BA=D0=BE=D0=BD=D1=84=D0=B8=D0=B3=D0=B8...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/server/config.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'server') diff --git a/server/server/config.cpp b/server/server/config.cpp index 1917a13..2cea241 100644 --- a/server/server/config.cpp +++ b/server/server/config.cpp @@ -94,6 +94,21 @@ void config::load_proxy_list(char *pth) } else { + lp2 = line.find(':'); + host = line.substr(lp1, lp2-lp1); + lp1 = lp2+1; + lp2 = line.find("\x20"); + port = atoi(line.substr(lp1, lp2-lp1).c_str()); + lp1 = lp2+2; + lp2 = line.find('"'); + country = line.substr(lp1, lp2-lp1).c_str(); + lp1 = lp2+3; + lp2 = line.find('"'); + state = line.substr(lp1, lp2-lp1).c_str(); + lp1 = lp2+3; + lp2 = line.find('"'); + city = line.substr(lp1, lp2-lp1).c_str(); + proxy_list.push_back(proxy_entry(login, password, host, port, country, state, city)); } } } -- cgit v1.2.3