705NKでgmail app その3
というわけで、詳しいやり方です。
VFWP Webは、http通信ならばUAを見るけど、https通信だと見ないようです。
705patcherのMain.javaの中の以下の部分を書き換えます。
if( cName.equals("javax.microedition.io.Connector") && mName.equals("open") ) { m.replace("{ " + "if( $_ instanceof javax.microedition.io.HttpConnection ) {" + "((javax.microedition.io.HttpConnection)$_).setRequestProperty(\"User-Agent\",\"" + userAgent + "\\n\"); " + "((javax.microedition.io.HttpConnection)$_).setRequestProperty(\"X-WAP-Profile\",\"" + wapProf + "\\n\"); " + "}" + "}"); System.out.println("-> Successfully added User-Agent and X-WAP-Profile Header (HttpConnection only)"); changed.add(true); } else if( cName.equals("javax.microedition.io.HttpConnection") && mName.equals("setRequestProperty") ) { m.replace("{ " + "if ($1.equalsIgnoreCase(\"User-Agent\")) {" + "$1 = \"User-Agent\";" + "$2 = \"" + userAgent + "\";" + "}" + "$_ = $proceed($$);" + "}"); System.out.println("-> Replaced existing User-Agent Header"); changed.add(true); }
という部分を、以下のように書き換えます。
if( cName.equals("javax.microedition.io.Connector") && mName.equals("open") ) { m.replace("{ " + "if ($1.startsWith(\"http:\")) {" + "$1 = \"https:\" + $1.substring(\"http:\".length());" + "}" + "$_ = $proceed($$); " System.out.println("-> Successfully added User-Agent and X-WAP-Profile Header (HttpConnection only)"); changed.add(true); }
するとなぜかつながるようになります。
ただ、SSLのオーバーヘッドのせいか、705NKのJavaが元々もっさりなのかわからないけど、ちょっともっさりとした動作です。
それでも標準のメーラより使いやすいので、私はgmailを常用していますが。