Opera Mini 5 beta for WM 国际版中转
*现有更好的使Opera Mini for WM穿越的方法,请移步至此处:https://docs.google.com/View?id=dgbsbz6v_5cdsq33mz1.下载Opera Mini 5 beta for Windows Mobile(可能需要翻墙),传入手机安装
2.制作Opera Mini中转
*参考 http://www.kenengba.com/post/2021.html http://code.google.com/p/opm-server-mirror/<?php
if ($_SERVER['REQUEST_METHOD'] == 'GET') {
if (function_exists("curl_init")) {
if (!$_GET["test"] != null) {
header( "HTTP/1.1 301 Moved Permanently" );
header( "Location: http://www.google.com/ncr" );
} else {
echo 'Hello Opera Mini Server! Fuck GFW!';
}
} else {
echo 'cURL is not enabled.';
}
} else {
$curlInterface = curl_init();
$headers[] = 'Connection: Keep-Alive';
$headers[] = 'content-type: application/xml';
$headers[] = 'User-Agent: Java0';
curl_setopt_array($curlInterface, array(
CURLOPT_URL => 'http://server4.operamini.com',
CURLOPT_HTTPHEADER => $headers,
CURLOPT_POST => 1,
CURLOPT_POSTFIELDS => @file_get_contents('php://input'))
);
$result = curl_exec($curlInterface);
curl_close($curlInterface);
header('Content-Type: application/octet-stream');
header('Cache-Control: priavte, no-cache');
echo $result;
}
3.修改OperaMini5-WM-armv4i.exe
解压mini5wm.cab(7zip,winrar等应该都可以),用16进制编辑器(本人所用16进制编辑器在此处下载,是一免费软件)打开“NATIVE~1.009”文件,
搜索“server4”字符,第二次搜索到的就是Opera Mini所用的代理服务器(server4.operamini.com:80),
4.打开Opera Mini 5 beta for WM,点右下角扳手按钮,依次选择Settings,Advanced,Protocol,HTTP即可
if ($_SERVER['REQUEST_METHOD'] == 'GET') {
if (function_exists("curl_init")) {
if (!$_GET["test"] != null) {
header( "HTTP/1.1 301 Moved Permanently" );
header( "Location: http://www.google.com/ncr" );
} else {
echo 'Hello Opera Mini Server! Fuck GFW!';
}
} else {
echo 'cURL is not enabled.';
}
} else {
$ch = curl_init();
$get_headers = apache_request_headers(); //apache_request_headers() 在特定情况下无效,详见php手册
foreach ($get_headers as $header => $value) {
$headers[] = "$header: $value";
}
curl_setopt_array($ch, array(
CURLOPT_URL => 'http://server4.operamini.com/',
CURLOPT_HTTPHEADER => $headers,
CURLOPT_FRESH_CONNECT => true,
CURLOPT_FORBID_REUSE => true,
CURLOPT_COOKIESESSION => true,
//CURLOPT_BINARYTRANSFER => true,
//CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => @file_get_contents('php://input'))
);
$result = curl_exec($ch);
curl_close($ch);
//header('Content-Type: application/octet-stream');
//header('Cache-Control: priavte, no-cache'); 不去掉这两行会得到 PHP Warning: Cannot modify header information - headers already sent 的报错
echo $result;
}
?>
没有评论:
发表评论