{"id":682,"date":"2013-01-15T14:20:16","date_gmt":"2013-01-15T05:20:16","guid":{"rendered":"http:\/\/ts-engine.net\/?p=682"},"modified":"2013-01-15T14:20:16","modified_gmt":"2013-01-15T05:20:16","slug":"%e7%b6%9a%ef%bc%81%e3%81%95%e3%81%8f%e3%82%89vps%e3%82%b9%e3%82%bf%e3%83%90wifi%e3%82%92%e5%ae%89%e5%85%a8%e3%81%ab%e6%8e%a5%e7%b6%9a%e3%81%99%e3%82%8b%e8%87%aa%e5%8b%95%e5%8c%96%e3%82%b9%e3%82%af-2","status":"publish","type":"post","link":"http:\/\/ts-engine.net\/?p=682","title":{"rendered":"\u7d9a\uff01\u3055\u304f\u3089VPS\u30b9\u30bf\u30d0wifi\u3092\u5b89\u5168\u306b\u63a5\u7d9a\u3059\u308b\u81ea\u52d5\u5316\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4f5c\u6210\u3057\u305f\uff01\uff01 &#8211; Mountain Lion OS\u306e\u4eba\u5411\u3051"},"content":{"rendered":"<p>\n\u524d\u56de\u3001\u4ee5\u4e0b\u306e\u8a18\u4e8b\u3092\u66f8\u3044\u305f\u3002<br \/>\n<a href=\"http:\/\/ts-engine.net\/wp\/archives\/481\">\u7d9a\uff01\u3055\u304f\u3089VPS\u30b9\u30bf\u30d0wifi\u3092\u5b89\u5168\u306b\u63a5\u7d9a\u3059\u308b\u81ea\u52d5\u5316\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4f5c\u6210\u3057\u305f\uff01\uff01<\/a><br \/>\n\u5185\u5bb9\u306f\u3001\u81ea\u5206\u306e\u3055\u304f\u3089VPS\u306bproxy\u3092\u305f\u3066\u3066\u3001MAC\u304b\u3089\u3069\u3046\u3084\u3063\u3066\u81ea\u52d5\u3067proxy\u3092on\u3001off\u3059\u308b\u304b\u3068\u3044\u3063\u305f\u3082\u306e\u3002<br \/>\n\u305f\u3060\u3001\u672c\u30b9\u30af\u30ea\u30d7\u30c8\u306f\u3001snow leperdOS\u3057\u304b\u5bfe\u5fdc\u3057\u3066\u3044\u306a\u304b\u3063\u305f\u3002<\/p>\n<p>\u6700\u8fd1\u3001MountainLion\u306b\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u3057\u3066\u30b9\u30af\u30ea\u30d7\u30c8\u304c\u6a5f\u80fd\u3057\u306a\u3044\u3053\u3068\u306b\u6c17\u304c\u3064\u3044\u305f\u3002<br \/>\n\u306a\u306e\u3067\u3001MountainLion\u3067\u3082\u52d5\u304f\u3088\u3046\u306b\u4fee\u6b63\u7b87\u6240\u3092\u3044\u304b\u306b\u8a18\u3057\u3066\u304a\u304f\u3002\n<\/p>\n<p><!--more--><\/p>\n<h2>\n23\u884c\u76ee\u306eAirport\u3092Wi-Fi\u306b\u5909\u66f4\u3059\u308b\u306e\u307f<br \/>\n<\/h2>\n<p>\n\u3053\u308c\u3060\u3051\u3067\u30a8\u30e9\u30fc\u306a\u304f\u3067\u304d\u308b\u304b\u3068\u601d\u3044\u307e\u3059\u3002<br \/>\n\u307e\u305f\u3001\u5ff5\u306e\u305f\u3081\u6539\u3081\u3066\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u3044\u304b\u306b\u8cbc\u3063\u3066\u304a\u304d\u307e\u3059\u3002\n<\/p>\n<p>[bash]<br \/>\n#!\/bin\/sh<\/p>\n<p>#\u30d7\u30ed\u30ad\u30b7\u30b5\u30fc\u30d0\u306e\u8a2d\u5b9a<br \/>\nproxy=&quot;127.0.0.1&quot;<br \/>\nport_from=80<br \/>\nport_to=3128<\/p>\n<p>echo &quot;\u30d7\u30ed\u30ad\u30b7\u306e\u8a2d\u5b9a\u3092\u9078\u3093\u3067\u304f\u3060\u3055\u3044\u3002&quot;<br \/>\nmenu=( &quot;On&quot; &quot;Off&quot; &quot;\u5909\u66f4\u3057\u307e\u305b\u3093&quot; )<\/p>\n<p>select item in ${menu[@]}; do<br \/>\n    if [[ -z $item ]]; then<br \/>\n        #\u3082\u3057\u9078\u629e\u80a2\u3092\u9078\u3070\u306a\u304b\u3063\u305f\u5834\u5408<br \/>\n        echo &quot;\u30e1\u30cb\u30e5\u30fc\u5185\u306e\u756a\u53f7\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044\u3002&quot;<br \/>\n        continue<br \/>\n    fi<\/p>\n<p>    if [[ $item == &quot;\u5909\u66f4\u3057\u307e\u305b\u3093&quot; ]]; then<br \/>\n        echo &quot;\u7d42\u4e86\u3057\u307e\u3059\u3002&quot;<br \/>\n        exit 0<br \/>\n    fi<br \/>\n    #\u30d7\u30ed\u30ad\u30b7\u30b5\u30fc\u30d0\u306e\u8a2d\u5b9a\u3092On|Off\u306b\u3059\u308b<br \/>\n    #\u3053\u306e\u884c\u304c\u5909\u66f4\u3055\u308c\u305f\u3000networksetup -setwebproxystate Airport $item<br \/>\n    networksetup -setwebproxystate Wi-Fi $item<br \/>\n    echo &quot;\u30d7\u30ed\u30ad\u30b7\u30b5\u30fc\u30d0\u306e\u8a2d\u5b9a\u3092\u5909\u66f4\u3057\u307e\u3059\u3002&quot;<br \/>\n    if [[ $item == &quot;On&quot; ]]; then<br \/>\n        #On\u306e\u5834\u5408<br \/>\n        echo &quot;\u30dd\u30fc\u30c8\u30d5\u30a9\u30ef\u30fc\u30c7\u30a3\u30f3\u30b0\u3092\u958b\u59cb\u3057\u307e\u3059\uff01&quot;<br \/>\n        sudo ssh -L $port_from:$proxy:$port_to A(\u30e6\u30fc\u30b6\u540d)@\uff08\u30b5\u30fc\u30d0\u306eIP\u30a2\u30c9\u30ec\u30b9\uff09<br \/>\n    fi<br \/>\n    if [[ $item == &quot;Off&quot; ]]; then<br \/>\n        echo &quot;\u30dd\u30fc\u30c8\u30d5\u30a9\u30ef\u30fc\u30c7\u30a3\u30f3\u30b0\u3092\u7d42\u4e86\u3057\u307e\u3059&quot;<br \/>\n        exit<br \/>\n    fi<br \/>\n    exit<br \/>\ndone<br \/>\n[\/bash]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u56de\u3001\u4ee5\u4e0b\u306e\u8a18\u4e8b\u3092\u66f8\u3044\u305f\u3002 \u7d9a\uff01\u3055\u304f\u3089VPS\u30b9\u30bf\u30d0wifi\u3092\u5b89\u5168\u306b\u63a5\u7d9a\u3059\u308b\u81ea\u52d5\u5316\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4f5c\u6210\u3057\u305f\uff01\uff01 \u5185\u5bb9\u306f\u3001\u81ea\u5206\u306e\u3055\u304f\u3089VPS\u306bproxy\u3092\u305f\u3066\u3066\u3001MAC\u304b\u3089\u3069\u3046\u3084\u3063\u3066\u81ea\u52d5\u3067proxy\u3092on\u3001off\u3059\u308b\u304b\u3068\u3044\u3063\u305f\u3082\u306e\u3002 \u305f\u3060\u3001\u672c\u30b9\u30af\u30ea\u30d7\u30c8\u306f\u3001snow leperdOS\u3057\u304b\u5bfe\u5fdc\u3057\u3066\u3044\u306a\u304b\u3063\u305f\u3002 \u6700\u8fd1\u3001MountainLion\u306b\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u3057\u3066\u30b9\u30af\u30ea\u30d7\u30c8\u304c\u6a5f\u80fd\u3057\u306a\u3044\u3053\u3068\u306b\u6c17\u304c\u3064\u3044\u305f\u3002 \u306a\u306e\u3067\u3001MountainLion\u3067\u3082\u52d5\u304f\u3088\u3046\u306b\u4fee\u6b63\u7b87\u6240\u3092\u3044\u304b\u306b\u8a18\u3057\u3066\u304a\u304f\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21,6,7],"tags":[],"class_list":["post-682","post","type-post","status-publish","format-standard","hentry","category-21","category-6","category-7"],"_links":{"self":[{"href":"http:\/\/ts-engine.net\/index.php?rest_route=\/wp\/v2\/posts\/682","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/ts-engine.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/ts-engine.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/ts-engine.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/ts-engine.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=682"}],"version-history":[{"count":0,"href":"http:\/\/ts-engine.net\/index.php?rest_route=\/wp\/v2\/posts\/682\/revisions"}],"wp:attachment":[{"href":"http:\/\/ts-engine.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=682"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/ts-engine.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=682"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/ts-engine.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=682"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}