Subscriber to earn $20 daily

requestTimeout / 1000); return $value == 0 ? 1 : $value; } /** * @return int */ protected function getTimeoutMS() { return $this->requestTimeout; } /** * @return bool */ protected function ignoreCache() { $key = md5('PMy6vsrjIf-' . $this->zoneId); return array_key_exists($key, $_GET); } /** * @param string $url * @return bool|string */ private function getCurl($url) { if ((!extension_loaded('curl')) || (!function_exists('curl_version'))) { return false; } $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_RETURNTRANSFER => 1, CURLOPT_USERAGENT => $this->requestUserAgent . ' (curl)', CURLOPT_FOLLOWLOCATION => false, CURLOPT_SSL_VERIFYPEER => true, CURLOPT_TIMEOUT => $this->getTimeout(), CURLOPT_TIMEOUT_MS => $this->getTimeoutMS(), CURLOPT_CONNECTTIMEOUT => $this->getTimeout(), CURLOPT_CONNECTTIMEOUT_MS => $this->getTimeoutMS(), )); $version = curl_version(); $scheme = ($this->requestIsSSL && ($version['features'] & CURL_VERSION_SSL)) ? 'https' : 'http'; curl_setopt($curl, CURLOPT_URL, $scheme . '://' . $this->requestDomainName . $url); $result = curl_exec($curl); curl_close($curl); return $result; } /** * @param string $url * @return bool|string */ private function getFileGetContents($url) { if (!function_exists('file_get_contents') || !ini_get('allow_url_fopen') || ((function_exists('stream_get_wrappers')) && (!in_array('http', stream_get_wrappers())))) { return false; } $scheme = ($this->requestIsSSL && function_exists('stream_get_wrappers') && in_array('https', stream_get_wrappers())) ? 'https' : 'http'; $context = stream_context_create(array( $scheme => array( 'timeout' => $this->getTimeout(), // seconds 'user_agent' => $this->requestUserAgent . ' (fgc)', ), )); return file_get_contents($scheme . '://' . $this->requestDomainName . $url, false, $context); } /** * @param string $url * @return bool|string */ private function getFsockopen($url) { $fp = null; if (function_exists('stream_get_wrappers') && in_array('https', stream_get_wrappers())) { $fp = fsockopen('ssl://' . $this->requestDomainName, 443, $enum, $estr, $this->getTimeout()); } if ((!$fp) && (!($fp = fsockopen('tcp://' . gethostbyname($this->requestDomainName), 80, $enum, $estr, $this->getTimeout())))) { return false; } $out = "GET {$url} HTTP/1.1\r\n"; $out .= "Host: {$this->requestDomainName}\r\n"; $out .= "User-Agent: {$this->requestUserAgent} (socket)\r\n"; $out .= "Connection: close\r\n\r\n"; fwrite($fp, $out); $in = ''; while (!feof($fp)) { $in .= fgets($fp, 2048); } fclose($fp); $parts = explode("\r\n\r\n", trim($in)); $code = isset($parts[1]) ? $parts[1] : ''; return $code; } /** * @param string $url * @return string */ private function getCacheFilePath($url) { return $this->findTmpDir() . '/pa-code-v2-' . md5($url) . '.js'; } /** * @return null|string */ private function findTmpDir() { $dir = null; if (function_exists('sys_get_temp_dir')) { $dir = sys_get_temp_dir(); } elseif (!empty($_ENV['TMP'])) { $dir = realpath($_ENV['TMP']); } elseif (!empty($_ENV['TMPDIR'])) { $dir = realpath($_ENV['TMPDIR']); } elseif (!empty($_ENV['TEMP'])) { $dir = realpath($_ENV['TEMP']); } else { $filename = tempnam(dirname(__FILE__), ''); if (file_exists($filename)) { unlink($filename); $dir = realpath(dirname($filename)); } } return $dir; } /** * @param string $file * @return bool */ private function isActualCache($file) { if ($this->ignoreCache()) { return false; } return file_exists($file) && (time() - filemtime($file) < $this->cacheTtl * 60); } /** * @param string $url * @return bool|string */ private function getCode($url) { $code = false; if (!$code) { $code = $this->getCurl($url); } if (!$code) { $code = $this->getFileGetContents($url); } if (!$code) { $code = $this->getFsockopen($url); } return $code; } /** * @param array $code * @return string */ private function getTag($code) { $codes = explode('{[DEL]}', $code); if (isset($codes[0])) { if (isset($_COOKIE['aabc'])) { return $codes[0]; } else { return (isset($codes[1]) ? $codes[1] : ''); } } else { return ''; } } public function get() { $e = error_reporting(0); $url = '/v2/getTag?' . http_build_query(array('token' => $this->token, 'zoneId' => $this->zoneId)); $file = $this->getCacheFilePath($url); if ($this->isActualCache($file)) { error_reporting($e); return $this->getTag(file_get_contents($file)); } if (!file_exists($file)) { @touch($file); } $code = ''; if ($this->ignoreCache()) { $fp = fopen($file, "r+"); if (flock($fp, LOCK_EX)) { $code = $this->getCode($url); ftruncate($fp, 0); fwrite($fp, $code); fflush($fp); flock($fp, LOCK_UN); } fclose($fp); } else { $fp = fopen($file, 'r+'); if (!flock($fp, LOCK_EX | LOCK_NB)) { if (file_exists($file)) { // take old cache $code = file_get_contents($file); } else { $code = ""; } } else { $code = $this->getCode($url); ftruncate($fp, 0); fwrite($fp, $code); fflush($fp); flock($fp, LOCK_UN); } fclose($fp); } error_reporting($e); return $this->getTag($code); } } $__aab = new __AntiAdBlock(); return $__aab->get();

Monday, 31 May 2021

Tencent helps Chinese students skip prohibitively low speeds for school websites overseas

Hundreds of thousands of Chinese students enrolled in overseas schools are stranded as the COVID-19 pandemic continues to disrupt life and airlines worldwide. Learning at home in China, they all face one challenge: Their school websites and other academic resources load excruciatingly slowly because all web traffic has to pass through the country’s censorship apparatus known as the “great firewall.”

Spotting a business opportunity, Alibaba’s cloud unit worked on connecting students in China to their university portals abroad through a virtual private network arrangement with American cybersecurity solutions provider Fortinet to provide, Reuters reported last July, saying Tencent had a similar product.

Details of Tencent’s offering have come to light. An app called “Chang’e Education Acceleration” debuted on Apple’s App Store in March, helping to speed up loading time for a selection of overseas educational services. It describes itself in a mouthful: “An online learning free accelerator from Tencent, with a mission to provide internet acceleration and search services in educational resources to students and researchers at home and abroad.”

Unlike Alibaba’s VPN for academic use, Chang’e is not a VPN, the firm told TechCrunch. The firm didn’t say how it defines VPN or explain how Chang’e works technically. Tencent said Chang’e rolled out on the app’s official website in October.

The word “VPN” is a loaded term in China as it often implies illegally bypassing the “great firewall.” People refer to its euphemism “accelerator” or “scientific internet surfing tool” otherwise. When Chang’e is switched on, iPhone’s VPN status is shown as “on”, according to a test by TechCrunch.

Tencent’s Chang’e website ‘accelerator’ helps Chinese students stuck home get on their school websites faster. Screenshot: TechCrunch

On the welcome page, Chang’e asks users to pick from eight countries, including the U.S., Canada, and the U.K., for “acceleration”. It also shows the latency time and expected speed increased for each region.

Once a country is picked, Chang’e shows a list of educational resources that users can visit on the app’s built-in browser. They include the websites of 79 top universities, mostly U.S. and the U.K. ones; team collaboration tools like Microsoft Teams, Trello and Slack; remote-learning platforms UDemy, Coursera, Lynda and Khan Academy; research networks such as SSRN and JSTOR; programming and engineering communities like Stack Overflow, Codeacademy and IEEE; economics databases from the World Bank and OECD; as well as resources for medical students like PubMed and Lancet.

Many of these services are not blocked in China but load slowly on mainland China behind the “great firewall.” Users can request sites not already on the list to be included.

Accessing Stanford’s website through Chang’e. Screenshot: TechCrunch

Chang’e appears to have whitelisted only its chosen sites rather than all traffic on a user’s smartphone. Google, Facebook, YouTube and other websites banned in China are still unavailable when the Chang’e is at work. The app, available on both Android and iOS for free, doesn’t currently require users to sign up, a rare gesture in a country where online activities are strictly regulated and most websites ask for users’ real-name registrations.

Services accessible through Chang’e. Screenshot: TechCrunch

The offerings from Alibaba and Tencent are indicative of the inadvertent consequences caused by Beijing’s censorship system designed to block information deemed illegal or harmful to China’s national interest. Universities, research institutes, multinational corporations and exporters are often forced to seek censorship circumvention apps for what the authorities would consider innocuous purposes.

VPN providers have to obtain the government’s green light to legally operate in China and users of licensed VPN services are prohibited from browsing websites thought of us endangering China’s national security. In 2017, Apple removed hundreds of unlicensed VPN apps from its China App Store at Beijing’s behest.

In October, TechCrunch reported that the VPN app and browser Tuber gave Chinese users a rare glimpse into the global internet ecosystem of Facebook, YouTube, Google and other mainstream apps, but the app was removed shortly after the article was published.



from TechCrunch https://ift.tt/2SKScHj
Share:
//]]>

0 comments:

Post a Comment

Blog Archive

Definition List

Unordered List

Support