rotate ips on url resolution

This commit is contained in:
lolcat committed 2026-10-30 00:18:06 -04:00
1 parent d91834f86f
commit 9f0437d949
3 files changed
+4 -3

No files matched your search

+1
View File
@@ -168,6 +168,7 @@ class config{
const PROXY_YAHOO_JAPAN = false;
const PROXY_BRAVE = false;
const PROXY_GOOGLE = false;
const PROXY_GOOGLE_ALT = false; // alt proxies for url resolution
const PROXY_GOOGLE_API = false;
const PROXY_GOOGLE_CSE = false;
const PROXY_STARTPAGE = false;
+2 -2
View File
@@ -12,9 +12,9 @@ class backend{
/*
Proxy stuff
*/
public function get_ip($proxy_index_raw = null){
public function get_ip($proxy_index_raw = null, $use_alt_list = false){
$pool = constant("config::PROXY_" . strtoupper($this->scraper));
$pool = constant("config::PROXY_" . strtoupper($this->scraper) . ($use_alt_list ? "_ALT" : ""));
if($pool === false){
// we don't want a proxy, fuck off!
+1 -1
View File
@@ -658,7 +658,7 @@ class google{
curl_setopt($curlproc, CURLOPT_CONNECTTIMEOUT, 30);
curl_setopt($curlproc, CURLOPT_TIMEOUT, 30);
//$this->backend->assign_proxy($curlproc, $proxy);
$this->backend->assign_proxy($curlproc, $this->backend->get_ip(null, true));
curl_multi_add_handle($this->proc, $curlproc);
$this->handles[] = [