{"id":481,"date":"2012-07-14T18:04:14","date_gmt":"2012-07-14T09:04:14","guid":{"rendered":"http:\/\/ts-engine.net\/wp\/?p=481"},"modified":"2012-07-14T18:04:14","modified_gmt":"2012-07-14T09:04:14","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","status":"publish","type":"post","link":"http:\/\/ts-engine.net\/?p=481","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"},"content":{"rendered":"<p>\u5148\u65e5\u3001\u3055\u304f\u3089VPS\u3092\u4f7f\u3063\u3066\u3001\u300c\u5b89\u5168\u306b\u300d\u30b9\u30bf\u30d0\u306ewifi\u3092\u697d\u3057\u3080\u65b9\u6cd5\u3092\u7d39\u4ecb\u3057\u305f\uff01<br \/>\n\u8a73\u3057\u304f\u306f\u3053\u3061\u3089\u2193\u2193\u2193<br \/>\n<a href=\"http:\/\/ts-engine.net\/wp\/?p=463\">\u3055\u304f\u3089VPS\u3092\u4f7f\u3063\u3066\u30b9\u30bf\u30d0\u306e\u7121\u6599wifi\u3067\u5b89\u5168\u306bweb\u3092\u697d\u3057\u3080\u65b9\u6cd5\uff08MAC\u5229\u7528\u8005\uff09<\/a>\n<\/p>\n<p>\u3061\u306a\u307f\u306b\u3055\u304f\u3089VPS\u306b\u3064\u3044\u3066\u306f\u3053\u3061\u3089\u2193\u2193\u2193<\/p>\n<p><a href=\"http:\/\/px.a8.net\/svt\/ejp?a8mat=1ZTB41+2P1ODU+D8Y+C3BAP\" target=\"_blank\" rel=\"noopener\"><br \/>\n<img loading=\"lazy\" decoding=\"async\" border=\"0\" width=\"300\" height=\"300\" alt=\"\" src=\"http:\/\/www20.a8.net\/svt\/bgt?aid=120620161163&#038;wid=001&#038;eno=01&#038;mid=s00000001717002031000&#038;mc=1\"><\/a><br \/>\n<img loading=\"lazy\" decoding=\"async\" border=\"0\" width=\"1\" height=\"1\" src=\"http:\/\/www10.a8.net\/0.gif?a8mat=1ZTB41+2P1ODU+D8Y+C3BAP\" alt=\"\"><\/p>\n<h2>\u4e0a\u8a18\u65b9\u6cd5\u306f\u4f55\u304b\u3068\u9762\u5012\u306a\u306e\u3067\u3001\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u81ea\u52d5\u5316\u3055\u305b\u3066\u307f\u307e\u3057\u305f\uff01\uff01<\/h2>\n<p><!--more--><\/p>\n<p>\u79c1\u304c\u8aac\u660e\u3057\u305f\u3001\u4e0a\u8a18\u65b9\u6cd5\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u3067\u901a\u4fe1\u304c\u6697\u53f7\u5316\u3055\u308c\u308b\u305f\u3081\u3001\u5b89\u5168\u306bweb\u3092\u697d\u3057\u3080\u3053\u3068\u304c\u3067\u304d\u308b\u3002<\/p>\n<p>\u305f\u3060\u3001\u30b9\u30bf\u30d0\u306b\u6765\u308b\u305f\u3073\u306b\u3001\u30d7\u30ed\u30ad\u30b7\u306e\u8a2d\u5b9a\u3092On\u306b\u3059\u308b\u3002\u30b9\u30bf\u30d0\u304b\u3089\u5e30\u308b\u3068\u304d\u306b\u306f\u3001\u30d7\u30ed\u30ad\u30b7\u306e\u8a2d\u5b9a\u3092off\u306b\u3059\u308b\u306e\u306f\u3001\u9762\u5012\u3002<\/p>\n<p>\u3063\u3066\u3044\u3046\u3053\u3068\u3067\u3001\u3053\u306e\u81ea\u52d5\u5316\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4f5c\u3063\u3066\u307f\u307e\u3057\u305f\u3002<br \/>\n\u30b9\u30af\u30ea\u30d7\u30c8\u306f\u4ee5\u4e0b\u306e\u3068\u304a\u308a\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\tif [[ -z $item ]]; then<br \/>\n\t\t#\u3082\u3057\u9078\u629e\u80a2\u3092\u9078\u3070\u306a\u304b\u3063\u305f\u5834\u5408<br \/>\n\t\techo &quot;\u30e1\u30cb\u30e5\u30fc\u5185\u306e\u756a\u53f7\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044\u3002&quot;<br \/>\n\t\tcontinue<br \/>\n\tfi<\/p>\n<p>\tif [[ $item == &quot;\u5909\u66f4\u3057\u307e\u305b\u3093&quot; ]]; then<br \/>\n\t\techo &quot;\u7d42\u4e86\u3057\u307e\u3059\u3002&quot;<br \/>\n\t\texit 0<br \/>\n\tfi<br \/>\n\t#\u30d7\u30ed\u30ad\u30b7\u30b5\u30fc\u30d0\u306e\u8a2d\u5b9a\u3092On|Off\u306b\u3059\u308b<br \/>\n\tnetworksetup -setwebproxystate Airport $item<br \/>\n\techo &quot;\u30d7\u30ed\u30ad\u30b7\u30b5\u30fc\u30d0\u306e\u8a2d\u5b9a\u3092\u5909\u66f4\u3057\u307e\u3059\u3002&quot;<br \/>\n\tif [[ $item == &quot;On&quot; ]]; then<br \/>\n\t\t#On\u306e\u5834\u5408<br \/>\n\t\techo &quot;\u30dd\u30fc\u30c8\u30d5\u30a9\u30ef\u30fc\u30c7\u30a3\u30f3\u30b0\u3092\u958b\u59cb\u3057\u307e\u3059\uff01&quot;<br \/>\n\t\tsudo ssh -L $port_from:$proxy:$port_to A@B<br \/>\n\tfi<br \/>\n\tif [[ $item == &quot;Off&quot; ]]; then<br \/>\n\t\techo &quot;\u30dd\u30fc\u30c8\u30d5\u30a9\u30ef\u30fc\u30c7\u30a3\u30f3\u30b0\u3092\u7d42\u4e86\u3057\u307e\u3059&quot;<br \/>\n\t\texit<br \/>\n\tfi<br \/>\n\texit<br \/>\ndone<\/p>\n<p>[\/bash]<\/p>\n<p>\n<b><br \/>\nA\u21d2\u3055\u304f\u3089VPS\u306e\u30e6\u30fc\u30b6\u30a2\u30ab\u30a6\u30f3\u30c8<br \/>\nB\u21d2\u3055\u304f\u3089VPS\u306eIP\u30a2\u30c9\u30ec\u30b9\u3092\u8a18\u5165\u3057\u3066\u4e0b\u3055\u3044<br \/>\n<\/b><\/p>\n<p>\u3053\u308c\u3092\u9069\u5f53\u306b\u300cproxy.sh\u300d\u3068\u3057\u3066\u4fdd\u5b58\u3057\u3066\u3001\u4ee5\u4e0b\u306e\u3068\u304a\u308a\u3001mac\u306e\u30bf\u30fc\u30df\u30ca\u30eb\u304b\u3089\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n<p>[bash]<br \/>\nbash-3.2$ .\/proxy.sh<br \/>\n[\/bash]<\/p>\n<p>\n\u3059\u308b\u3068\u4ee5\u4e0b\u306e\u3068\u304a\u308a\u8868\u793a\u3055\u308c\u307e\u3059\u306e\u3067\u3001\u958b\u59cb\u3059\u308b\u5834\u5408\u306b\u306f\u3001\u300c\uff11\u300d\u3092\u9078\u629e\u3002<br \/>\n\u7d42\u4e86\u306e\u5834\u5408\u306f\u300c\uff12\u300d\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\n\uff08\u305f\u3060\u3057\u3001\u300c\uff12\u300d\u3092\u9078\u629e\u3059\u308b\u5834\u5408\u306f\u3001\u624b\u52d5\u3067\u3001\u30bf\u30fc\u30df\u30ca\u30eb\u3092\u7d42\u4e86\u3055\u305b\u3066\u304f\u3060\u3055\u3044\u3002\uff09<\/p>\n<p>\u8aa4\u3063\u3066\u3001\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u8d77\u52d5\u3057\u305f\u3068\u304d\u306f\u3001\u300c\uff13\u300d\u3092\u9078\u629e\u3057\u3066\u4e0b\u3055\u3044\u3002<br \/>\n\u30d7\u30ed\u30ad\u30b7\u306e\u8a2d\u5b9a\u3092\u9078\u3093\u3067\u304f\u3060\u3055\u3044\u3002<br \/>\n&#8212;<br \/>\n1) On<br \/>\n2) Off<br \/>\n3) \u5909\u66f4\u3057\u307e\u305b\u3093<br \/>\n#?<br \/>\n&#8212;<\/p>\n<p>\u3064\u307e\u308a\u3001\u3053\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u5b9f\u884c\u3059\u308c\u3070\u3001<br \/>\n\u4e0a\u8a18\u306e\u9078\u629e\u80a2\u3092\u9078\u629e\u3059\u308b\u306e\u307f\u3067\u3001\u81ea\u52d5\u3067\u30bb\u30ad\u30e5\u30a2\u306a\u901a\u4fe1\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n\uff08\u3082\u3061\u308d\u3093\u524d\u63d0\u306f\u3001\u3055\u304f\u3089VPS\u3092\u6240\u6709\u3001mac\u30e6\u30fc\u30b6\u9650\u5b9a\u3067\u3059\u304c\u3002\uff09\n<\/p>\n<h2>\n\u4f59\u8ac7<br \/>\n<\/h2>\n<p>\n\u3053\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4f5c\u6210\u306b\u3042\u305f\u308a\u3001\u300cmac\u306e\u30d7\u30ed\u30ad\u30b7\u3092CLI\u3067\u3069\u3046\u5909\u66f4\u3059\u308b\u304b\u300d\u3092\u898b\u3064\u3051\u308b\u3053\u3068\u306b\u3068\u3066\u3082\u82e6\u52b4\u3057\u305f\u3002<br \/>\n\u6b63\u89e3\u306f\u3001\u300cnetworksetup -setwebproxystate Airport On|Off\u300d\u3060\u3063\u305f\u304c\u3001<br \/>\n\u82f1\u8a9e\u570f\u306e\u30b5\u30a4\u30c8\u3067\u3057\u304b\u898b\u3064\u304b\u3089\u306a\u304b\u3063\u305f\u3002\n<\/p>\n<h2>\n\u8ffd\u8a18<br \/>\n<\/h2>\n<p>\n\u4e0a\u8a18\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u306fmac\u3067\u30d7\u30ed\u30ad\u30b7\u3092\u3042\u3089\u304b\u3058\u3081\u8a2d\u5b9a\u3057\u3066\u3044\u308b\u4eba\u306b\u6709\u52b9\u306e\u305f\u3081\u3001<br \/>\n\u3044\u307e\u307e\u3067\u3001\u30d7\u30ed\u30ad\u30b7\u3092\u8a2d\u5b9a\u3057\u305f\u3053\u3068\u304c\u306a\u3044\u4eba\u306f\u3001\u4e00\u5ea6\u30d7\u30ed\u30ad\u30b7\u3092\u8a2d\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u306a\u304a\u3001\u30d7\u30ed\u30ad\u30b7\u306e\u8a2d\u5b9a\u65b9\u6cd5\u306f\u3001\u3053\u3061\u3089\u306e\u8a18\u4e8b\u3092\u53c2\u8003\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\n<a href=\"http:\/\/ts-engine.net\/wp\/?p=463\">\u3055\u304f\u3089VPS\u3092\u4f7f\u3063\u3066\u30b9\u30bf\u30d0\u306e\u7121\u6599wifi\u3067\u5b89\u5168\u306bweb\u3092\u697d\u3057\u3080\u65b9\u6cd5\uff08MAC\u5229\u7528\u8005\uff09<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5148\u65e5\u3001\u3055\u304f\u3089VPS\u3092\u4f7f\u3063\u3066\u3001\u300c\u5b89\u5168\u306b\u300d\u30b9\u30bf\u30d0\u306ewifi\u3092\u697d\u3057\u3080\u65b9\u6cd5\u3092\u7d39\u4ecb\u3057\u305f\uff01 \u8a73\u3057\u304f\u306f\u3053\u3061\u3089\u2193\u2193\u2193 \u3055\u304f\u3089VPS\u3092\u4f7f\u3063\u3066\u30b9\u30bf\u30d0\u306e\u7121\u6599wifi\u3067\u5b89\u5168\u306bweb\u3092\u697d\u3057\u3080\u65b9\u6cd5\uff08MAC\u5229\u7528\u8005\uff09 \u3061\u306a\u307f\u306b\u3055\u304f\u3089VPS\u306b\u3064\u3044\u3066\u306f\u3053\u3061\u3089\u2193\u2193\u2193 \u4e0a\u8a18\u65b9\u6cd5\u306f\u4f55\u304b\u3068\u9762\u5012\u306a\u306e\u3067\u3001\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u81ea\u52d5\u5316\u3055\u305b\u3066\u307f\u307e\u3057\u305f\uff01\uff01<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20,21,7],"tags":[],"class_list":["post-481","post","type-post","status-publish","format-standard","hentry","category-20","category-21","category-7"],"_links":{"self":[{"href":"http:\/\/ts-engine.net\/index.php?rest_route=\/wp\/v2\/posts\/481","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=481"}],"version-history":[{"count":0,"href":"http:\/\/ts-engine.net\/index.php?rest_route=\/wp\/v2\/posts\/481\/revisions"}],"wp:attachment":[{"href":"http:\/\/ts-engine.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=481"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/ts-engine.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=481"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/ts-engine.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=481"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}