iPod touchã使ã£ã¦ãããå¯ããªããWebãµã¼ãã£ã³(æ»èª)ãã¦ãããã§ãããæºå¸¯ã«æé©åããã¦ããªãWebãã¼ã¸ãè¦ãã¨ãçµæ§å¾
ãããããã§ããã
ãããã3ãã¤ã³æ§é ã«ãªã£ã¦ããã®ãå¤ãã¦ããºã¼ã ã¤ã³ã»ãºã¼ã ã¢ã¦ããç¹°ãè¿ãã®ãã¢ããããã
æºå¸¯(ã¬ã©ã±ã¼)ã®Webã¢ã¯ã»ã¹æ©è½ã¯ãã¢ã¯ã»ã¹é度ããé ããã®ã®ãå°ãã§ãã¢ã¯ã»ã¹é度ãä¸ãããããæºå¸¯ã®ãã£ãªã¢å´ã®ãµã¼ãã¼ã§æ¬æ¥ã®HTMLãå¤æãã¦æé©åãã¦è¡¨ç¤ºãã¦ãããã®ã§ãå°ããç»é¢ã§ãè¦ãããããææ ¢ãªããã»ã©è¡¨ç¤ºãé ã訳ã§ãç¡ãã
2ã¤ã®è¯ãæã¨æªãæãé ã®ä¸ã§ãã·ã§ã¤ã¯ãã¦ããå ããµã¨æã£ã訳ã§ãã
iPod touch(iPhoneã§ãå¯)ã§ãæºå¸¯åãã«HTMLãæé©åããHTTPãããã·ãµã¼ãã¼ãä»ãã¦Webã¢ã¯ã»ã¹ããã°ããµã¯ãµã¯Webãµã¼ãã£ã³ã§ããããããï¼
æ å ±åé
ãã®ãã®ãºããªãªãæºå¸¯åãæé©åç¨HTTPãããã·ãµã¼ãã¼ããæä¾ãã¦ããæã¯ãã±ã£ã¨èª¿ã¹ãéãè¦ã¤ããã¾ããã§ããã
å¤åã調ã¹æ¹ãæªããã§ãããã(誰ãæãã¦ã)
代ããã«ããããã·ã®ä»£æ¿ã«ãªããããªããã¼ã¸ãå¤æãã¦ãããWebãµã¼ãã¹ãæä¾ãã¦ããã¦ããæãè¦ã¤ããã¾ããã
- iPhoneã®Safariããµã¯ãµã¯ã«ããç¾å®çãª3ã¤ã®æ¹æ³âãã®1 - builder by ZDNet Japan
http://builder.japan.zdnet.com/sp/iphone-3g-2008/story/0,3800087831,20383504,00.htm - Google Wireless Transcoder ãã°ã¼ã°ã«ã®æºå¸¯é»è©±ç¨ãã¼ã¸å¤æã
http://lhsp.s206.xrea.com/misc/google-gwt.html
ã¾ããããã ãã§ãOKããªï¼ã¨ãä¸ç¬æã£ãã®ã§ãããä¸ã
è¦ãããã¼ã¸ã®URLãå
¥åããã®ãé¢åãªãã§ããã
(ããã¯ãã¼ã¯ã¬ãããç´¹ä»ããã¦ãããã©ãçµå±ããã¯ãã¼ã¯ãéãæä½ãå
¥ããã)
ã§ãæãã¤ããã®ãã
ãé©å½ãªèªä½ãããã·ãµã¼ãã¼ãä½ããiPod touchã¯ããã®ãããã·ãµã¼ãã¼ã«ã¢ã¯ã»ã¹ãããããããã·ãµã¼ãã¼ã¯ãéããã¦ããURLããä¸è¨ã®ãGoogle Mobile Proxyãã«è»¢éãã¦ãæºå¸¯åãWebãã¼ã¸ã«å¤æããã¦ãã¾ãã
ã¨ãããã®ã§ãã
èªä½ãããã·ãä½ã£ã¦ã¿ã
Pythonãªã諸å
輩æ¹ããä½ããµã³ãã«ã³ã¼ããä½ã£ã¦ããã ããã¨æã£ã¦æ¤ç´¢ããããçµæ§å¼ã£ãããã¾ããã
æ¥æ¬èªç³»ã ã¨ãBaseHTTPServerã¯ã©ã¹ã使ããã®ã¨Twistedã使ããã®ã«ã大ä½2åããããã§ãã
- å£èª¿å¤æãããã· - yattã®æ¥è¨
http://d.hatena.ne.jp/yatt/20080804/1217850128 - Twistedã§è¶
ç°¡åãªHTTPãããã·ãµã¼ããæ¸ãã®ãµ - HDEã©ã
http://lab.hde.co.jp/2009/05/twistedhttp.html - Tiny HTTP Proxy in Python
http://www.oki-osk.jp/esc/python/proxy/ - WSGIã§ä½ãç°¡åãã¼ã«ã«HTTP Proxyãµã¼ã - ãããããã¯
http://d.hatena.ne.jp/nozom/20080320/1206034869 - ãã¼ã«ã«ãããã·ã¹ã¯ãªãã - veryberry_cafeã®æ¥è¨
http://d.hatena.ne.jp/veryberry_cafe/20061024/1161721619 - A database of open-source HTTP proxies written in python.
http://proxies.xhaus.com/python/
ã¨ãã訳ã§ãä»åã¯id:yattããã®å£èª¿å¤æãããã·ããURLã®è»¢éã®å®ä¾ã«ä½¿ããããªã®ã§ãã¡ã¨æåãã¦æ¹é ãã¦ã¿ã¾ããã
以ä¸ã«ãæ©éã³ã¼ãã示ãã¾ãã
#! /bin/env python # -*- coding: utf-8 -*- import sys import BaseHTTPServer import urllib import urllib2 import urlparse import re TMPL = """<html> <body> <h1>Proxy Server Error</h1> <div>response error to '%(path)s'</div> <div>ERROR: <b>%(error)s</b></div> </body> </html> """ #urllib.FancyURLopener.version = "Mozilla/4.0" # ç´ ã®ã¾ã¾ã ã¨googleãwikipediaã«å¼¾ããã #urllib.FancyURLopener.version = "transApp" # ç´ ã®ã¾ã¾ã ã¨googleãwikipediaã«å¼¾ããã class ProxyHandler(BaseHTTPServer.BaseHTTPRequestHandler): def error(self, e): return TMPL % dict([("path",self.path), ("error",e)]) def do_GET(self): KEY_URL = "http://www.google.co.jp/gwt/" print "request:",self.path try: url = self.path if url.find("/gwt/") > 0: url = KEY_URL + url[url.find("/gwt/") + 5:] print " change url:", url elif url.find(KEY_URL) < 0: url = KEY_URL + "n?u=" + url print " make url:", url pipe = urllib.urlopen(url) content = pipe.read() except Exception, e: content = self.error(e) self.wfile.write(content) def do_POST(self): BaseHTTPRequestHandler.do_POST() if __name__ == '__main__': serv_addr = ("", 8080) print "server address:", serv_addr httpd = BaseHTTPServer.HTTPServer(serv_addr, ProxyHandler) try: httpd.serve_forever() except KeyboardInterrupt: pass
æ©é試ãã¦ã¿ã¾ãããã
ä½æ¥ã®æµãã¯ã以ä¸ã®ãããªãã®ã§ãã
- ã¹ã¯ãªãããåããWindows PC(ããã§ã¯ãæ®éã«Webãè¦ãããç°å¢ã«ããã¾ã)ã®ãIPã¢ãã¬ã¹ã調ã¹ã¦ããã¾ãã
ãipconfig
ããã³ãã³ãã©ã¤ã³ã§æã¡è¾¼ãã°IPã¢ãã¬ã¹ã¯ãããã¾ãã - ä¸è¨ã®ã³ã¼ãã¹ã¯ãªããããPCä¸ã§åããã¾ãã
ä¾ãã°ããpython proxy.py
ãã¨ãã風ã«ã - iPod touchã®è¨å®ã§ããããã·ã®IPã¢ãã¬ã¹ã¨ãã¼ãæ¬ã«ãPCã®(1.ã§èª¿ã¹ã)IPã¢ãã¬ã¹ã¨8080çªãã¼ãã«è¨å®ãã¾ãã
- iPod touchã®Mobile Safariãèµ·åããhttp://www.yahoo.co.jp ã«ã¢ã¯ã»ã¹ãã¾ãã
ããã¨ã以ä¸ã®ç»é¢ãåºã¦ãã¾ããã
2 posted by (C)wacky
ã¡ãªã¿ã«ãiPod touchã§ããããã·ã®è¨å®ãããã«ã¯ã以ä¸ã®Web siteã®èª¬æãåèã«ãªãã§ãããã
(å®ã¯åãæ¿ããé¢åãªã®ã§ãPixyã¨ããã½ãããçªã£è¾¼ãã§ã¿ããã ãããã¾ãåããªãã£ãã§ããä½ã§ã§ããããã誰ãæãã¦ï¼)
- ãããã·ãè¨å®ã§ãã: å¥å
¨ãªiPhoneããã°
http://iphone3gblog.seesaa.net/article/111802224.html
ä½è«ï¼urllib.FancyURLopener.versionã®è¨å®ã«ããæåã®å·®
åãåºããå¾ãæ®éã«Webãã©ã¦ã¶ãã表示ããå ´åã¨ãç»é¢ã®è¡¨ç¤ºã®ä»æ¹ãéãäºã«æ°ã¥ãã¾ããã
âPCã®Webãã©ã¦ã¶ãã表示ã
1 posted by (C)wacky
âiPod touchããèªä½ãããã·ãä»ãã¦è¡¨ç¤ºã
2 posted by (C)wacky
ä¸çªä¸ã«è¡¨ç¤ºãããã¡ãã»ã¼ã¸ãè±èªã ã£ãããç»åãåºã¦ããªãã£ããã§ããã
ä½ã§ã ãããªãï¼ã¨æã£ã¦ãå
ã®ã³ã¼ããè¦ã¦ãããããurllib.FancyURLopener.version
ãã®è¨å®å¤ã®æã§ããç´ ã®ã¾ã¾ã ã¨googleãwikipediaã«å¼¾ããããã¨ãã£ãã®ã§ããã
ãã®ãurllib.FancyURLopener.version ã£ã¦ä½ã®è¨å®ãããªï¼ã¨æã£ã¦èª¿ã¹ããããUser-Agentãã®è¨å®å¤ãããã
ãããããã¨ãã訳ã§ã試ãã«IEãªã©ã§ä½¿ããããMozilla/4.0ããè¨å®ãã¦ã¿ã¾ããã
transAppãæå® | Mozilla/4.0ãæå® |
---|---|
ããã表示ãããå
容ã«å¤åãç¾ãã¾ããã
ãã ãYahooã®ãã¼ã¸ã«é¢ãã¦è¨ãã°ãurllib.FancyURLopener.version ã®è¨å®å¤ã¯ããMozilla/4.0ãã«ããªãæ¹ãè¯ãã§ãã
ãã¹ãã¼ãããªã©ã®ãã¼ã¸ã«ã¸ã£ã³ããããã¨ããã¨ã転éãã¼ã¸ã«é£ã°ããã¦ãçµå±ã¸ã£ã³ãã§ãã¾ããã§ããã
ãããã·ã®ã¹ã¯ãªããã³ã¼ãã®æ¹åãå¿
è¦ã¨ããäºã§ãããã
åèï¼é度æ¯è¼
ä½ã¡ãã£ã¦ã§ãããèªä½ãããã·ãä»ããäºã«ãããã©ããããæ©ããªãã®ããå¹¾ã¤ã試ãã¦ã¿ã¾ããã
Webãã¼ã¸ | ç´æ¥ | èªä½ãããã· |
---|---|---|
Yahoo! | 7ç§ | 3ç§ |
6ç§ | 2ç§ | |
楽ç»åå | 35ç§ | 3ç§ |
ã¾ãããã¼æ¨é²å§å¡ä¼ | 14ç§ | 3ç§ |
æºå¸¯ã«æé©åãã¦ããªãï¼ç»åãä¸æ¯ã®ãµã¤ãã»ã©ãããªãã®å¹æãè¦è¾¼ããäºãå¤ãã¾ãã
ã¾ããããããããã¹ããã©ã¦ã¶ã§é²è¦§ãããããªãã®ã§ããããã(ä¸é¨ç»åãä»ãã¾ãã)
ä½è«ï¼ãããã·ã®ãã¹ãä¸ã«
ä½è«ã§ãããèªä½ãããã·ãå°å ¥ãã¦ãã¹ãä¸ãiPod touchãã¹ã¿ã³ãã¤ã«ãã¦æ«ãæ¾ç½®ãã¦ãããã以ä¸ã®ã¡ãã»ã¼ã¸ãã°ãã
192.x.x.x - - [03/Jan/2011 22:00:40] code 501, message Unsupported method ('C ONNECT') 192.x.x.x - - [03/Jan/2011 22:00:44] "CONNECT m.google.com:443 HTTP/1.1" 501 - 192.x.x.x - - [03/Jan/2011 22:01:52] code 501, message Unsupported method ('C ONNECT')
Wi-Fiãæå¹ã«ãã¦ããã¨ã¹ã¿ã³ãã¤ã«ãã¦ããçµæ§ããããªãæ¶è²»ããã®ã§ãä½ã§ã ããï¼ã¨æã£ã¦ãããã§ããããªãã»ã©ãæ°åããã«åãã¦ãã訳ã§ããã
ããããããããªãæ¶è²»ãããã
ã¾ã¨ã
ã¨ãã訳ã§ãæä¾ã®ã¾ã¨ã ã¨ãããææ³ã
- æºå¸¯ç¨ã«HTMLãã¼ã¿ãå å·¥ãããäºã§ãWebãµã¼ãã£ã³(æ»èª)ã¯ãæ´ã«ãµã¯ãµã¯ã«ãªãã¾ãã
- ä½ã¡ãã£ã¦èªä½ãããã·ãµã¼ãã¼ã§ãããã®å¹æã¯å¾ããã¾ãã
ã¨ããããiPod touchã®ã¢ããªã§ãæºå¸¯åãã«HTMLãã¼ã¿ãå å·¥ãããã¼ã«ã«é¯ã¢ããªãæä¾ãã¦ãããªãã§ãããã
Safariã®ãããã·è¨å®ãlocalhostã«è¨å®ãã¦ãã¢ããªããããã·å¦çãããã®ã
ç¾ç¶ã ã¨ãJailbreakããªãã¨åºæ¥ããããªãã§ããªãã
(Webãµã¼ãã¹ã§ãªããæ¬å½ã®ãããã·ãµã¼ãã¼ã§ãè¯ããã§ããã©ãä¸é¨åºåãå
¥ãããããªãææ
¢ãããã ãã©â¦)
2011/1/4追è¨ï¼
å¾ã§æ°ä»ãããã§ãããOpera Mini Web Browserã®ãæºå¸¯åã表示ã¢ã¼ãã£ã¦ãä»åã®ãããã·çãªåä½ãè¡ã£ã¦ããããããªãããªã
- Opera Mini & Opera Mobile ãã©ã¦ã¶
http://www.opera.com/mobile/specs/
æè¡ä»æ§ã®ãã¼ã¸ã§ãOpera's compression serversãçµç±ãã¦ã¤ã³ã¿ã¼ãããã«ã¢ã¯ã»ã¹ã£ã¦ãå³ãæ¸ãã¦ãããã
åºãå½æãã¢ã¯ã»ã¹é度ã3åéã¨ãè©å¤ã«ãªã£ã¦ããã©ãä»åã®ãããã·çãªå¦çãæ½ãäºã§å®ç¾ãã¦ããã£ã¦äºãªãã§ããããã
â¦ã ã¨ããã¨ãããã¡ãã£ã¨ä»ã§ããµã¼ãã¹å®ç¾ãã¦ãããã¨ããã®ã«ãã¶ã¡ã¶ã¡ã