{"id":2452,"date":"2021-06-27T20:21:26","date_gmt":"2021-06-27T11:21:26","guid":{"rendered":"https:\/\/www.choco.org.uk\/chocodb\/?p=2452"},"modified":"2021-09-10T18:54:50","modified_gmt":"2021-09-10T09:54:50","slug":"nadesiko3%e3%82%b5%e3%83%bc%e3%83%90%e3%83%bc%e3%81%ae%e4%bd%9c%e3%82%8a%e6%96%b9%e3%81%9d%e3%81%ae%ef%bc%97","status":"publish","type":"post","link":"https:\/\/www.choco.org.uk\/chocodb\/?p=2452","title":{"rendered":"Nadesiko3\u30b5\u30fc\u30d0\u30fc\u306e\u4f5c\u308a\u65b9\u305d\u306e\uff17"},"content":{"rendered":"<p><span style=\"color: #ff00ff;\">\u301020210815\u3011\u5927\u5e45\u306b\u4fee\u6b63\u3057\u3066\u304a\u308a\u307e\u3059\u3002<\/span><br \/>\nnodejs\u5358\u4f53\u3067\u4f5c\u6210\u3057\u305f\u7d4c\u9a13\u3092\u6d3b\u304b\u3057\u3066\u3001\u30a2\u30af\u30bb\u30b9\u5148\u3092\u5909\u3048\u3066\u8a66\u9a13\u3092\u884c\u3046\u3002<\/p>\n<p>[root@ik1-403-xxxxx nadesiko]# node .\/node_modules\/.bin\/nako3edit<br \/>\n* [WEB\u30b5\u30fc\u30d0(\u306a\u3067\u3057\u3053+Express)] (debug)<br \/>\n| \u4ee5\u4e0b\u306eURL\u3067\u8d77\u52d5\u3057\u307e\u3057\u305f\u3002<br \/>\n+- [URL] http:\/\/localhost:3030<br \/>\n&gt;&gt;&gt; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\n&gt;&gt;&gt; \u30b5\u30fc\u30d0\u8d77\u52d5\u306b\u6210\u529f\u3057\u307e\u3057\u305f\u3002<br \/>\n&gt;&gt;&gt; nako3edit \u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u306b\u306f\u3001\u4ee5\u4e0b\u306eURL\u306b\u30a2\u30af\u30bb\u30b9\u3057\u307e\u3059<br \/>\n&gt;&gt;&gt; [URL] http:\/\/localhost:3030?appkey=2366_33664_63392<br \/>\n&gt;&gt;&gt;<br \/>\n[static] \/html \/home\/nadesiko\/node_modules\/nadesiko3\/tools\/nako3edit\/html<br \/>\n[static] \/release \/home\/nadesiko\/node_modules\/nadesiko3\/release<br \/>\n[GET] \/<br \/>\n[GET] \/test<br \/>\n[GET] \/files<br \/>\n[GET] \/load<\/p>\n<p>\u4e0a\u8a18\u5185\u5bb9\u304b\u3089\u3053\u3061\u3089\u306b\u30a2\u30af\u30bb\u30b9\u3057\u307e\u3059\u3002<br \/>\nhttp:\/\/nako.tokyo:3030?appkey=2366_33664_63392<\/p>\n<p>\u7121\u4e8bNODEJS\u7248\u306eNadesiko3\u304c\u8868\u793a\u3055\u308c\u307e\u3057\u305f\uff01<\/p>\n<p><a href=\"https:\/\/www.choco.org.uk\/chocodb\/wp-content\/uploads\/nadesiko3nodejs.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-thumbnail wp-image-2605\" src=\"https:\/\/www.choco.org.uk\/chocodb\/wp-content\/uploads\/nadesiko3nodejs-150x150.png\" alt=\"\" width=\"150\" height=\"150\" srcset=\"https:\/\/www.choco.org.uk\/chocodb\/wp-content\/uploads\/nadesiko3nodejs-150x150.png 150w, https:\/\/www.choco.org.uk\/chocodb\/wp-content\/uploads\/nadesiko3nodejs-144x144.png 144w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/><\/a><\/p>\n<p>\u4eca\u5ea6\u306fSSL\u306eURL\u304b\u3089\u63a5\u7d9a\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u305f\u3044\u3067\u3059\u3002<\/p>\n<p>\u9014\u4e2d\u3067\u304a\u304b\u3057\u306a\u30a8\u30e9\u30fc\u304c\u3042\u308a\u307e\u3057\u305f\u3002\uff08nginx\u306e\u30ed\u30b0\u306b\uff09<br \/>\n<span style=\"color: #ff0000;\">1425F102:SSL routines:ssl_choose_client_version:unsupported protocol<\/span><br \/>\n\u3053\u3093\u306a\u30d7\u30ed\u30c8\u30b3\u30eb\u5bfe\u5fdc\u3057\u3066\u3044\u306a\u3044\u3088\u3068\u66f8\u304b\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u21d2\u300cNodeJS v11.4.0\u300d\u304b\u3089tls\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u6700\u5c0f\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u300cTLSv1.2\u300d\u306b\u5909\u308f\u3063\u305f\u4e8b\u304c\u539f\u56e0\u3067\u3057\u305f\u3002<\/p>\n<p>\u89e3\u6c7a\u7b56\u3068\u3057\u3066\u3001TLS1\u3067\u3082\u53d7\u3051\u5165\u308c\u308b\u3088\u3046\u306b\u8d77\u52d5\u6642\u306b\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u3064\u3051\u307e\u3059\u3002<br \/>\n<span style=\"color: #0000ff;\">\uff1enode &#8211;tls-min-v1.0 \/home\/nadesiko\/node_modules\/nadesiko3\/src\/nako3server.js<\/span><\/p>\n<p>CentOS\u5074\u3067\u3082\u540c\u3058\u3088\u3046\u306bTLS\u306e\u898f\u5236\u304c\u53b3\u3057\u3044\u306e\u3067\u3001\u4e0a\u8a18\u5bfe\u7b56\u3067\u3082\u30a8\u30e9\u30fc\u30ed\u30b0\u304c\u6d88\u3048\u306a\u3044\u5834\u5408\u306fOS\u5074\u306b\u30b3\u30de\u30f3\u30c9\u3067\u5bfe\u5fdc\u3057\u307e\u3059\u3002<br \/>\n<span style=\"color: #0000ff;\">\uff1eupdate-crypto-policies &#8211;set LEGACY<\/span><\/p>\n<p><span style=\"color: #ff00ff;\">\u203b\u76ee\u6307\u3059\u306fHTTPS\u3067\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u4e8b\u3067\u3059\u3002<\/span><\/p>\n<p>\u307e\u305a\u306f\u9069\u5f53\u306b\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u3066\u3001SSL\u3067\u78ba\u8a8d\u3057\u3066\u307f\u307e\u3059\u3002<br \/>\n\uff1evi server.js<\/p>\n<p>var https = require(&#8216;https&#8217;);<br \/>\nvar fs = require(&#8216;fs&#8217;);<br \/>\nvar ssl_server_key = &#8216;\/etc\/letsencrypt\/live\/nako.tokyo\/privkey.pem&#8217;;<br \/>\nvar ssl_server_crt = &#8216;\/etc\/letsencrypt\/live\/nako.tokyo\/cert.pem&#8217;;<br \/>\nvar port = 3001;<\/p>\n<p>var options = {<br \/>\nkey: fs.readFileSync(ssl_server_key),<br \/>\ncert: fs.readFileSync(ssl_server_crt)<br \/>\n};<\/p>\n<p>https.createServer(options, function (req,res) {<br \/>\nres.writeHead(200, {<br \/>\n&#8216;Content-Type&#8217;: &#8216;text\/plain&#8217;<br \/>\n});<br \/>\nres.end(&#8220;Hello, world\\n&#8221;);<br \/>\n}).listen(port);<\/p>\n<p>\u30d6\u30e9\u30a6\u30b6\u3067\u78ba\u8a8d\u3057\u307e\u3059\u3002<br \/>\nhttps:\/\/nako.tokyo:3001<br \/>\n\u3053\u308c\u306f\u9806\u5f53\u306b\u78ba\u8a8d\u3067\u304d\u307e\u3057\u305f\u3002<\/p>\n<p>\u4e0a\u8a18\u306e\u7d50\u679c\u304b\u3089\u3001\u5f53\u521d\u306a\u3067\u3057\u3053\uff13\u306eNode\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u89e6\u3089\u305a\u306b\u5b9f\u73fe\u3057\u305f\u304b\u3063\u305f\u306e\u3067\u3059\u304c\u3001\u3069\u3046\u3082\u7121\u7406\u3063\u307d\u3044\u306e\u3067\u8a66\u884c\u3057\u3066\u307f\u307e\u3059\u3002<br \/>\n\uff08nako3edit\u306e\u5185\u90e8\u306bSSL\u8a3c\u660e\u66f8\u306e\u30d5\u30eb\u30d1\u30b9\u3092\u66f8\u304f\u7b49\uff09<\/p>\n<p>nako3edit\u306e\u4e2d\u3092\u78ba\u8a8d\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<p>[root@ik1-403-xxxxx .bin]# cat nako3edit<br \/>\n#!\/usr\/bin\/env node<\/p>\n<p>const spawn = require(&#8216;child_process&#8217;).spawn<br \/>\nconst path = require(&#8216;path&#8217;)<br \/>\nconst nakoHome = path.resolve(path.join(__dirname, &#8216;..\/..\/&#8217;))<br \/>\nconst cnako3 = path.resolve(path.join(nakoHome, &#8216;src\/cnako3.js&#8217;))<br \/>\nconst nako3edit = path.resolve(path.join(__dirname, &#8216;index.nako3&#8217;))<\/p>\n<p>let proc = spawn(&#8216;node&#8217;, [cnako3, nako3edit])<br \/>\nproc.stdout.on(&#8216;data&#8217;, (data) =&gt; {<br \/>\nconsole.log(data.toString())<br \/>\n})<\/p>\n<p>\u6050\u3089\u304f\u3001\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u306b\u5bfe\u3057\u3066SSL\u8a3c\u660e\u66f8\u3092\u8a18\u8ff0\u3059\u308c\u3070\u826f\u3044\u306f\u305a\uff1f<br \/>\n\u3061\u3087\u3063\u3068\u9577\u304f\u306a\u3063\u305f\u306e\u3067\u3001\uff18\u306b\u7d9a\u304d\u307e\u3059\u3002<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u301020210815\u3011\u5927\u5e45\u306b\u4fee\u6b63\u3057\u3066\u304a\u308a\u307e\u3059\u3002 nodejs\u5358\u4f53\u3067\u4f5c\u6210\u3057\u305f\u7d4c\u9a13\u3092\u6d3b\u304b\u3057\u3066\u3001\u30a2\u30af\u30bb\u30b9\u5148\u3092\u5909\u3048\u3066\u8a66\u9a13\u3092\u884c\u3046\u3002 [root@ik1-403-xxxxx nadesiko]# node .\/node_modules [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[103,172,39],"tags":[173,163,167,169],"class_list":["post-2452","post","type-post","status-publish","format-standard","hentry","category-nadesiko3","category-nginx","category-server","tag-centos-stream-8","tag-nginx","tag-sakura-vps","tag-169"],"_links":{"self":[{"href":"https:\/\/www.choco.org.uk\/chocodb\/index.php?rest_route=\/wp\/v2\/posts\/2452","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.choco.org.uk\/chocodb\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.choco.org.uk\/chocodb\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.choco.org.uk\/chocodb\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.choco.org.uk\/chocodb\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2452"}],"version-history":[{"count":18,"href":"https:\/\/www.choco.org.uk\/chocodb\/index.php?rest_route=\/wp\/v2\/posts\/2452\/revisions"}],"predecessor-version":[{"id":2614,"href":"https:\/\/www.choco.org.uk\/chocodb\/index.php?rest_route=\/wp\/v2\/posts\/2452\/revisions\/2614"}],"wp:attachment":[{"href":"https:\/\/www.choco.org.uk\/chocodb\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2452"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.choco.org.uk\/chocodb\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2452"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.choco.org.uk\/chocodb\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2452"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}