Update index.php

This commit is contained in:
Namhyeon Go 2024-02-27 17:21:27 +09:00 committed by GitHub
parent 4fba972f2a
commit ea5b96d54d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -65,7 +65,7 @@ function read_from_remote_server($remote_address, $remote_port, $scheme, $data =
$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) {
$error = array(
"status" => 502,
@ -156,7 +156,7 @@ function relay_connect($params, $id = '') {
$datetime = $params['datetime']; // format: %Y-%m-%d %H:%M:%S.%f
$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) {
$error = array(
"status" => 502,
@ -316,7 +316,7 @@ function relay_get_geolocation() {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
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);
$response = curl_exec($ch);