mirror of
https://github.com/gnh1201/caterpillar.git
synced 2025-11-27 18:10:40 +00:00
Update index.php
This commit is contained in:
parent
4fba972f2a
commit
ea5b96d54d
|
|
@ -65,7 +65,7 @@ function read_from_remote_server($remote_address, $remote_port, $scheme, $data =
|
||||||
$remote_address = "tls://" . $remote_address;
|
$remote_address = "tls://" . $remote_address;
|
||||||
}
|
}
|
||||||
|
|
||||||
$sock = fsockopen($remote_address, $remote_port, $error_code, $error_message, 30);
|
$sock = fsockopen($remote_address, $remote_port, $error_code, $error_message, 1);
|
||||||
if (!$sock) {
|
if (!$sock) {
|
||||||
$error = array(
|
$error = array(
|
||||||
"status" => 502,
|
"status" => 502,
|
||||||
|
|
@ -156,7 +156,7 @@ function relay_connect($params, $id = '') {
|
||||||
$datetime = $params['datetime']; // format: %Y-%m-%d %H:%M:%S.%f
|
$datetime = $params['datetime']; // format: %Y-%m-%d %H:%M:%S.%f
|
||||||
|
|
||||||
$starttime = microtime(true);
|
$starttime = microtime(true);
|
||||||
$conn = fsockopen($client_address, $client_port, $error_code, $error_message, 30);
|
$conn = fsockopen($client_address, $client_port, $error_code, $error_message, 1);
|
||||||
if (!$conn) {
|
if (!$conn) {
|
||||||
$error = array(
|
$error = array(
|
||||||
"status" => 502,
|
"status" => 502,
|
||||||
|
|
@ -316,7 +316,7 @@ function relay_get_geolocation() {
|
||||||
$ch = curl_init();
|
$ch = curl_init();
|
||||||
curl_setopt($ch, CURLOPT_URL, $url);
|
curl_setopt($ch, CURLOPT_URL, $url);
|
||||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);
|
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 1);
|
||||||
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
|
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
|
||||||
|
|
||||||
$response = curl_exec($ch);
|
$response = curl_exec($ch);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user