{"id":3905,"date":"2013-04-24T22:57:10","date_gmt":"2013-04-24T14:57:10","guid":{"rendered":"https:\/\/www.icocean.com\/wp\/?p=3905"},"modified":"2013-04-25T00:29:28","modified_gmt":"2013-04-24T16:29:28","slug":"%e5%90%8c%e6%ad%a5%e5%b7%a5%e5%85%b7bittorrent-sync%e5%9c%a8ubuntu%e7%b3%bb%e7%bb%9f%e7%9a%84%e5%ae%89%e8%a3%85%e9%85%8d%e7%bd%ae%e5%8f%8a%e4%bd%bf%e7%94%a8","status":"publish","type":"post","link":"https:\/\/www.icocean.com\/blog\/?p=3905","title":{"rendered":"\u540c\u6b65\u5de5\u5177BitTorrent Sync\u7684\u7b80\u4ecb\uff0c\u4ee5\u53ca\u5728ubuntu\u7cfb\u7edf\u7684\u5b89\u88c5\u914d\u7f6e\u548c\u4f7f\u7528"},"content":{"rendered":"<p><strong>\u7b2c\u4e00\u90e8\u5206\uff1aBitTorrent Sync\u7b80\u4ecb<\/strong><br \/>\n<strong>1\uff0c\u4ec0\u4e48\u662fBitTorrent Sync<\/strong><br \/>\n\u7528\u8fc7BT\u4e0b\u8f7d\u7684\u7ae5\u978b\u5e94\u8be5\u90fd\u542c\u8fc7BitTorrent\u8fd9\u4e2a\u8f6f\u4ef6\uff0cBitTorrent Labs\u57282013\u5e744\u670823\u65e5\u53d1\u5e03\u4e86\u5176\u5f00\u53d1\u7684\u4e00\u6b3e\u53bb\u4e2d\u5fc3\u5316\u7684\u540c\u6b65\u5de5\u5177BitTorrent Sync\u3002<\/p>\n<p><strong>2.BitTorrent Sync\u652f\u6301\u7684\u5e73\u53f0<\/strong><br \/>\n\u76ee\u524dBitTorrent Sync\u5df2\u7ecf\u53ef\u4ee5\u5728Windows, Mac and Linux\u7b49\u5e73\u53f0\u4e0b\u5de5\u4f5c\uff0c\u7279\u522b\u662fLinux\u5e73\u53f0\u4e0d\u4f46\u652f\u6301i386\u548cx86_64\uff0c\u8fd8\u652f\u6301ARM\uff0cPowerPC\uff0c\u8fd9\u6837\u5f88\u591a\u7f51\u7edc\u5b58\u50a8\u8bbe\u5907\u4e0a\u4e5f\u53ef\u4ee5\u4f7f\u7528bitTorrent Sync\u4e86\u3002<br \/>\n\u5c06\u6765\u8fd8\u4f1a\u5f00\u53d1\u667a\u80fd\u624b\u673a\u4e0a\u8fd0\u884c\u7684\u7248\u672c\uff0c\u5982\u82f9\u679cIOS\uff0cAndroid\u7b49\u3002<\/p>\n<p>Mac OS X Snow Leopard or later<br \/>\nWindows XP SP3 (32-bit) or newer (32 and 64-bit)<br \/>\nLinux with kernel 2.6.16 (glibc 2.4) or newer on ARM\/PPC\/i386\/x86_64<br \/>\nYou can install our application on Network Attached Storages (NAS) running on Linux with ARM, PowerPC, i386 and x86_64 architecture.<!--more--><\/p>\n<p><strong>3.BitTorrent Sync\u4f7f\u7528\u7684\u534f\u8bae<\/strong><br \/>\n\u6211\u731c\u60a8\u5df2\u7ecf\u60f3\u5230\u4e86\uff0cBitTorrent\u662f\u91c7\u7528\u4e0eBT\u4e0b\u8f7d\u7c7b\u4f3c\u7684P2P\u534f\u8bae\uff0c\u5e76\u7279\u522b\u9488\u5bf9\u5927\u6587\u4ef6\u7684\u4f20\u8f93\u505a\u4e86\u4f18\u5316\uff0c\u6240\u4ee5\u60a8\u5c3d\u53ef\u5927\u80c6\u653e\u5fc3\u5730\u4f20\u8f93\u4e2a\u5934\u8f83\u5927\u7684\u672a\u7ecf\u538b\u7f29\u7684\u539f\u59cb\u6863\u6848\u8d44\u6599\u3002<\/p>\n<p><strong>4.BitTorrent Sync\u7684\u5b89\u5168\u6027<\/strong><br \/>\nBitTorrent Sync\u5728\u8bbe\u8ba1\u4e4b\u521d\u5c31\u4f18\u5148\u8003\u8651\u4e86\u5b89\u5168\u6027\uff0c\u5df2\u786e\u4fdd\u5171\u4eab\u7684\u8d44\u6599\u4e0d\u4f1a\u88ab\u672a\u7ecf\u6388\u6743\u7684\u7528\u6237\u8bbf\u95ee\u5230\uff0c\u56e0\u6b64\uff0c\u5e76\u672a\u5f15\u5165\u7b2c\u4e09\u65b9\u7684\u670d\u52a1\u5668\u6765\u53c2\u4e0e\u6574\u4e2a\u540c\u6b65\u5171\u4eab\u7684\u8fc7\u7a0b\uff0c\u6240\u6709\u7684\u4f20\u8f93\u90fd\u662f\u5728\u7528\u6237\u53ef\u4fe1\u7684\u8bbe\u5907\u4e4b\u95f4\u76f4\u63a5\u4f20\u8f93\u7684\u3002<\/p>\n<p>\u6bcf\u4e2a\u5171\u4eab\u6587\u4ef6\u5939\u7684\u4f20\u8f93\u8fc7\u7a0b\uff0c\u90fd\u4f7f\u7528256\u4f4d\u7684\u5bc6\u94a5\u5e76\u7ecfAES\u7b97\u6cd5\u52a0\u5bc6\uff0c\u6ca1\u6709\u5bc6\u94a5\u662f\u65e0\u6cd5\u89e3\u5bc6\u4f20\u8f93\u7684\u6570\u636e\u7684\u3002<\/p>\n<p><strong>5.\u5404\u540c\u6b65\u8282\u70b9\u7684\u901a\u8baf\u53d1\u73b0\u673a\u5236<\/strong><br \/>\n\u6bcf\u6dfb\u52a0\u4e00\u4e2a\u5171\u4eab\u7684\u6587\u4ef6\u5939\uff0c\u5c31\u4f1a\u4ea7\u751f\u552f\u4e00\u7684key\uff0c\u4e0e\u5176\u4ed6\u670b\u53cb\u6216\u8282\u70b9\u5171\u4eab\u65f6\uff0c\u544a\u8bc9\u4ed6\u8fd9\u4e2akey\u5c31\u53ef\u4ee5\u4e86\u3002<\/p>\n<p>\u5982\u679c\u4e00\u4e2akey\u88ab2\u4e2a\u8282\u70b9\u77e5\u9053\uff0c\u5c31\u662f\u4e92\u76f8\u540c\u6b65\uff0c\u88ab\u591a\u4e2a\u8282\u70b9\u5171\u4eab\uff0c\u5c31\u662f\u5927\u89c4\u6a21\u7684p2p\u540c\u6b65\u5171\u4eab\u4e86\u3002\u6bd4\u8f83\u9002\u5408\u4e0d\u540c\u89c4\u6a21\u7684\u7fa4\u4f53\u6765\u5206\u4eab\u8d44\u6e90\u3002<\/p>\n<p>\u9488\u5bf9\u6bcf\u4e2a\u5171\u4eab\u6587\u4ef6\u5939\u7684key\uff0cBitTorrent\u901a\u8fc7\u4ee5\u4e0b\u51e0\u79cd\u673a\u5236\u6765\u53d1\u73b0\u548c\u4ea4\u6362\u8fd9\u4e2akey\uff0c\u4e5f\u5373\u627e\u5230\u5bf9\u5e94\u7684\u6587\u4ef6\u3002<\/p>\n<p>(1)Local peer discovery. \u6240\u6709\u5185\u7f51\u4e2d\u7684\u8282\u70b9\u4f1a\u53d1\u9001\u81ea\u8eab\u8981\u540c\u6b65\u6587\u4ef6\u7684\u5bc6\u94a5\u7684\u5e7f\u64ad\u5305\uff0c\u5982\u679c\u67d0\u4e2a\u8282\u70b9\u6536\u5230\u8be5\u5bc6\u94a5\u540e\uff0c\u53d1\u73b0\u4e0e\u81ea\u5df1\u914d\u7f6e\u91cc\u7684\u5bc6\u94a5\u4e00\u81f4\uff0c\u5219\u5c31\u4f1a\u505a\u51fa\u5e94\u7b54\u3002<br \/>\n\u4e3e\u4f8b\uff1a\u4e00\u4e2a\u5c4b\u5b50\u91cc100\u591a\u4e2a\u5c0f\u5b69\uff0c\u5c0f\u738b\u8d70\u8fdb\u6765\u60f3\u627e\u4ed6\u5f1f\u5f1f\uff0c\u8ddf\u4ed6\u5f1f\u5f1f\u4f20\u8fbe\u7236\u4eb2\u8001\u738b\u7684\u8bdd\uff0c<br \/>\n\u5c0f\u738b\u5c31\u8bf4\uff0c\u563f\uff0c\u8c01\u662f\u8001\u738b\u5bb6\u7684\u5b69\u5b50\u554a\uff0c<br \/>\n\u5c0f\u738b\u4ed6\u5f1f\u5f1f\u542c\u5230\u4e86\uff0c\u5c31\u8bf4\uff0c\u6211\u662f\uff0c\u6211\u5c31\u662f\u8001\u738b\u5bb6\u5b69\u5b50\u554a \u54e5\uff0c<\/p>\n<p>\u8fd9\u91cc\u201c\u8001\u738b\u201d\u5c31\u662f\u6587\u4ef6\u7684\u5bc6\u94a5\uff0c\u201c\u8001\u738b\u7684\u8bdd\u201d\u5c31\u662f\u5bf9\u4e8e\u6587\u4ef6\u7684\u5185\u5bb9\u3002<\/p>\n<p>(2)Peer exchange (PEX).<br \/>\n\u5f53\u4e24\u4e2a\u8282\u70b9\u76f8\u8fde\u65f6\uff0c\u4f1a\u76f8\u4e92\u4ea4\u6362\u4ed6\u4eec\u81ea\u5df1\u77e5\u9053\u7684\u5176\u4ed6\u8282\u70b9\u7684\u4fe1\u606f\uff0c\u8fd9\u4e2a\u8ddfBT\u662f\u4e00\u6837\u4e00\u6837\u7684\u3002<\/p>\n<p>(3)Known hosts (folder settings).<br \/>\n\u5982\u679c\u5df2\u77e5\u4e00\u4e2a\u8282\u70b9\u7684ip\u548c\u7aef\u53e3\uff0c\u5219\u53ef\u4ee5\u76f4\u63a5\u5728BitTorrent\u5ba2\u6237\u7aef\u91cc\u914d\u7f6e\u8fd9\u4e2a\u8282\u70b9\uff0c\u5c11\u8d70\u70b9\u5f2f\u8def\u3002<\/p>\n<p>(4)DHT. \u8fd9\u4e2a\u4e5f\u662fBT\u91cc\u7528\u5230\u7684\uff0c\u4e5f\u4e0d\u8bf4\u4e86\uff0c\u81ea\u5df1\u770b\u82f1\u6587\u3002<br \/>\nSync uses DHT to distribute information about itself and obtain the information about other peers with this secret. Sync sends SHA2(Secret):ip:port to DHT to announce itself and will get a list of peers by asking DHT for the following key SHA2(Secret)<\/p>\n<p>(5)BitTorrent tracker. \u8fd9\u4e2a\u4e5f\u662fBT\u91cc\u7528\u5230\u7684\u79cd\u5b50\u670d\u52a1\u5668\uff0c\u4e5f\u4e0d\u8bf4\u4e86\uff0c\u81ea\u5df1\u770b\u82f1\u6587\u3002<br \/>\nBitTorrent Sync can use a specific tracker server to facilitate peer discovery. The tracker server sees the combination of SHA2(secret):ip:port and helps peers connect directly. The BitTorrent Sync tracker also acts like a STUN server and can help do a NAT traversal for peers so that they can establish a direct connection even behind a NAT.<\/p>\n<p>\u5f53\u7136\u4e86BitTorrent\u662f\u63a8\u8350\u5927\u5bb6\u4f7f\u7528tracker\u670d\u52a1\u5668\u7684\uff0c\u56e0\u4e3a\u83b7\u53d6\u8282\u70b9\u7684\u901f\u5ea6\u6bd4DHT\u6162\u6162\u4ea4\u6362\u8981\u5feb\u554a\u3002<\/p>\n<p><strong>6.\u6d41\u91cf\u4e2d\u7ee7Traffic Relay<\/strong><br \/>\n\u8ddftor\u7c7b\u4f3c\uff0cBitTorrent Sync\u4e5f\u5f15\u5165\u4e86\u6d41\u91cf\u4e2d\u7ee7\u7684\u6982\u5ff5\uff0c\u4ee5\u5e2e\u52a9\u5904\u5728\u529e\u516c\u5ba4\u5185\u7f51\u5e76\u88ab\u9632\u706b\u5899\u4e25\u91cd\u9694\u79bb\u7684\u8282\u70b9\u4e4b\u95f4\u8fdb\u884c\u6570\u636e\u4f20\u8f93\u3002\u4e00\u822c\u60c5\u51b5\u4e0b\u5173\u95ed\u5b83\u5373\u53ef\uff0c\u53ea\u6709\u5728\u4f60\u7684\u4e24\u4e2a\u8bbe\u5907\u95f4\u56e0\u9632\u706b\u5899\u95ee\u9898\u65e0\u6cd5\u901a\u8baf\u65f6\uff0c\u53ef\u4ee5\u8bd5\u8bd5\u3002<\/p>\n<p>\u5f53\u7136\uff0c\u8fd9\u4e2a\u6d41\u91cf\u4e2d\u7ee7\u4e5f\u662f\u65e0\u6cd5\u5bdf\u770b\u5230\u4f60\u7684\u6570\u636e\u7684\uff0c\u56e0\u4e3a\u4f60\u7684\u6570\u636e\u662f\u7ecf\u8fc7AES\u52a0\u5bc6\u8fc7\u7684\uff0c\u6ca1\u6709\u4f60\u7684\u5bc6\u94a5\u4e00\u5207\u90fd\u662f\u79d8\u5bc6\u3002<\/p>\n<p><strong>\u7b2c\u4e8c\u90e8\u5206\uff1aUbuntu\u4e0b\u7684\u5b89\u88c5\u914d\u7f6e\u53ca\u4f7f\u7528<\/strong><\/p>\n<p><strong>7.\u4e0b\u8f7dBitTorrent<\/strong><br \/>\n\u6253\u5f00http:\/\/labs.bittorrent.com\/experiments\/sync.html\uff0c\u9875\u9762\u4e2d\u95f4\u6709\u4e2a\u5927\u5927\u7684\u7ea2\u8272Download\uff0c<br \/>\n\u70b9\u51fb\u5b83http:\/\/labs.bittorrent.com\/experiments\/sync.html#downloadpop<\/p>\n<p>\u7136\u540e\u9009\u62e9\u7cfb\u7edf\uff0c\u6211\u4eec\u9009Linux<br \/>\nLinux ARM: http:\/\/btsync.s3-website-us-east-1.amazonaws.com\/btsync_arm.tar.gz<br \/>\nLinux PowerPC: http:\/\/btsync.s3-website-us-east-1.amazonaws.com\/btsync_powerpc.tar.gz<br \/>\nLinux i386\uff1a http:\/\/btsync.s3-website-us-east-1.amazonaws.com\/btsync_i386.tar.gz<br \/>\nLinux x64: http:\/\/btsync.s3-website-us-east-1.amazonaws.com\/btsync_x64.tar.gz<br \/>\nLinux_i386 (glibc 2.3): http:\/\/btsync.s3-website-us-east-1.amazonaws.com\/btsync_glibc23_i386.tar.gz<br \/>\nLinux_x64 (glibc 2.3): http:\/\/btsync.s3-website-us-east-1.amazonaws.com\/btsync_glibc23_x64.tar.gz<br \/>\nLinux PPC QorIQ: http:\/\/btsync.s3-website-us-east-1.amazonaws.com\/btsync_ppc_quoriq.tar.gz<\/p>\n<p>\u6839\u636ecpu\u9009\u62e9\u4e0d\u540c\u7684\u8f6f\u4ef6\u5305\uff0c\u6211\u7684\u662fi386\uff0c\u5c31\u9009\u7b2c3\u4e2aLinux i386,\u4e0b\u8f7d\u540e\u4fdd\u5b58\u5230\u4f60\u5e0c\u671b\u7684\u8def\u5f84\uff0c\u6bd4\u5982\u6211\u5c31\u4fdd\u5b58\u5728~\/download\/btrsync\/ \u76ee\u5f55\u4e0b\uff0c\u5f97\u5230\u7684\u6587\u4ef6\u662fbtsync_i386.tar.gz<\/p>\n<p><strong>8.\u5b89\u88c5BitTorrent Sync<\/strong><br \/>\n\u5c06\u4e0b\u8f7d\u5230\u7684btsync_i386.tar.gz\u89e3\u538b\u7f29\uff0c\u5f97\u5230\u4e00\u4e2abtsync\u7684\u53ef\u6267\u884c\u6587\u4ef6\u3002<br \/>\n\u7136\u540e\u5728\u547d\u4ee4\u884c\u7ec8\u7aef\u4e86\uff0c\u8fdb\u5165\u5230 ~\/download\/btsync\/\u76ee\u5f55\uff0c\u76f4\u63a5\u8fd0\u884c .\/btsync \u5c31\u53ef\u4ee5\u8fd0\u884cBitTorrent Sync\u4e86\u3002\u5176\u5b9e\u90fd\u6ca1\u6709\u5b89\u88c5\uff0c\u76f8\u5f53\u4e8ewindows\u91cc\u7684\u7eff\u8272\u8f6f\u4ef6\uff0c\u76f4\u63a5\u8fd0\u884c\u4e86\u3002<\/p>\n<p><strong>9.\u4f7f\u7528\u53ca\u5171\u4eab\u540c\u6b65\u6587\u4ef6\u5939\u914d\u7f6e<\/strong><br \/>\n\u8fd0\u884c.\/btsync \u540e\uff0c\u5728\u6d4f\u89c8\u5668\u91cc\u8bbf\u95ee http:\/\/localhost:8888\/gui\/ \u6216\u8005 http:\/\/127.0.0.1:8888\/gui\/ \u5c31\u53ef\u4ee5\u770b\u5230\u7ba1\u7406\u754c\u9762\u4e86\u3002<br \/>\n\u770b\u5230\u4e86\u7ba1\u7406\u754c\u9762\uff0c\u5c31\u4e00\u76ee\u4e86\u7136\uff0c\u4e0d\u7528\u518d\u8bf4\u4ec0\u4e48\u4e86\u5427\uff1f \u8d76\u7d27\u5171\u4eab\u540c\u6b65\u5427\u3002\u3002\u3002\u3002\u3002\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7b2c\u4e00\u90e8\u5206\uff1aBitTorrent Sync\u7b80\u4ecb 1\uff0c\u4ec0\u4e48\u662fBitTorrent Sync \u7528\u8fc7BT\u4e0b\u8f7d\u7684\u7ae5\u978b\u5e94\u8be5 <a href='https:\/\/www.icocean.com\/blog\/?p=3905' class='excerpt-more'>[&#8230;]<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[3835,471,3836,595,3837,541,436],"class_list":["post-3905","post","type-post","status-publish","format-standard","hentry","category-4","tag-bittorrent","tag-p2p","tag-sync","tag-ubuntu","tag-3837","tag-541","tag-436","category-4-id","post-seq-1","post-parity-odd","meta-position-corners","fix"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.icocean.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3905","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.icocean.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.icocean.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.icocean.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.icocean.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3905"}],"version-history":[{"count":13,"href":"https:\/\/www.icocean.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3905\/revisions"}],"predecessor-version":[{"id":3918,"href":"https:\/\/www.icocean.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3905\/revisions\/3918"}],"wp:attachment":[{"href":"https:\/\/www.icocean.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3905"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.icocean.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3905"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.icocean.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3905"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}