|
|
|
@ -72,10 +72,28 @@ class Main
@@ -72,10 +72,28 @@ class Main
|
|
|
|
|
function ($entry) |
|
|
|
|
{ |
|
|
|
|
global $config; |
|
|
|
|
global $memory; |
|
|
|
|
|
|
|
|
|
$this->tray->label->set_text( |
|
|
|
|
sprintf( |
|
|
|
|
'Open %s...', |
|
|
|
|
$entry->get_text() |
|
|
|
|
) |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
$start = microtime(true); |
|
|
|
|
|
|
|
|
|
$host = null; |
|
|
|
|
|
|
|
|
|
if ($config->resolver->enabled) |
|
|
|
|
{ |
|
|
|
|
$address = new \Yggverse\Net\Address( |
|
|
|
|
$entry->get_text() |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
$name = $address->getHost(); |
|
|
|
|
|
|
|
|
|
if (!$host = $memory->get($name)) |
|
|
|
|
{ |
|
|
|
|
$resolve = new \Yggverse\Net\Resolve( |
|
|
|
|
$config->resolver->request->record, |
|
|
|
@ -84,17 +102,19 @@ class Main
@@ -84,17 +102,19 @@ class Main
|
|
|
|
|
$config->resolver->result->shuffle |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
$address = new \Yggverse\Net\Address( |
|
|
|
|
$entry->get_text() |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
$resolved = $resolve->address( |
|
|
|
|
$address |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
if ($resolved) |
|
|
|
|
{ |
|
|
|
|
$host = $resolved->getHost(); // @TODO memory cache |
|
|
|
|
$host = $resolved->getHost(); |
|
|
|
|
|
|
|
|
|
$memory->set( |
|
|
|
|
$name, |
|
|
|
|
$host |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -103,15 +123,6 @@ class Main
@@ -103,15 +123,6 @@ class Main
|
|
|
|
|
$host |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
$this->tray->label->set_text( |
|
|
|
|
sprintf( |
|
|
|
|
'Open %s...', |
|
|
|
|
$entry->get_text() |
|
|
|
|
) |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
$start = microtime(true); |
|
|
|
|
|
|
|
|
|
$raw = $request->getResponse(); |
|
|
|
|
|
|
|
|
|
$end = microtime(true); |
|
|
|
|