Dropbox 替代品 Syncthing

Syncthing是一个开源的云存储和同步服务工具,支持Mac OS X、Windows、Linux、FreeBSD和Solaris。Syncthing由瑞典开发者Jakob Borg发布的,据称用户的数据将由自己完全控制,所有的通信全都加密,每个访问节点都用加密证书验证。该项目被认为是Dropbox和BitTorrent Sync的开源替代。

SyncThing.jpg

隐私与安全

特性

关于Syncthing的更多资料请查看 这里 。

Syncthing 使用方法

Syncthing 是一款开源工具,堪称 Dropbox 的开源替代品。它的原理是将电脑里的文件夹当作是服务器,对特定的电脑进行同步分享。在 这里 下载解压 Syncthing 后就可以使用了,会打开默认浏览器显示其网页 GUI。

GUI 界面预览

源代码

github 托管的源代码

使用

本次测试以 win7 的 tmp_2 目录同步到 Linux Server 为例进行测试* linux 下载 Syncthing 并启动, 启动后看到如下输出

[12-05 15:56:45 root@ecs /root/jike/soft/syncthing-linux-amd64-v0.10.9]
#./syncthing 
[monitor] 15:56:48 INFO: Starting syncthing
15:56:48 INFO: Generating RSA key and certificate...
[JAFGU] 15:56:58 INFO: syncthing v0.10.9 (go1.3.3 linux-amd64 default) unknown-user@syncthing-builder 2014-11-30 12:45:08 UTC
[JAFGU] 15:56:58 INFO: My ID: JAFGUWW-JW7X7V5-7HMXLLI-CG2CUST-J26NAVM-ZN3C3VO-ZYIGTDQ-HEHR2QD
[JAFGU] 15:56:58 INFO: No config file; starting with empty defaults
[JAFGU] 15:56:58 INFO: Edit /root/.config/syncthing/config.xml to taste or use the GUI
[JAFGU] 15:56:58 INFO: Starting web GUI on http://127.0.0.1:8080/
[JAFGU] 15:56:58 INFO: Loading HTTPS certificate: open /root/.config/syncthing/https-cert.pem: no such file or directory
[JAFGU] 15:56:58 INFO: Creating new HTTPS certificate
[JAFGU] 15:56:58 INFO: Generating RSA key and certificate...
[JAFGU] 15:57:05 INFO: Starting UPnP discovery...
[JAFGU] 15:57:11 INFO: UPnP discovery complete (found 0 devices).
[JAFGU] 15:57:11 INFO: Starting local discovery announcements
[JAFGU] 15:57:11 INFO: Local discovery over IPv6 unavailable
[JAFGU] 15:57:11 INFO: Starting global discovery announcements
[JAFGU] 15:57:11 OK: Ready to synchronize default (read-write)
[JAFGU] 15:57:11 INFO: Device JAFGUWW-JW7X7V5-7HMXLLI-CG2CUST-J26NAVM-ZN3C3VO-ZYIGTDQ-HEHR2QD is "ecs.jike.me" at [dynamic]
[JAFGU] 15:57:11 INFO: Completed initial scan (rw) of folder default
#./syncthing 
[monitor] 15:56:48 INFO: Starting syncthing
15:56:48 INFO: Generating RSA key and certificate...
[JAFGU] 15:56:58 INFO: syncthing v0.10.9 (go1.3.3 linux-amd64 default) unknown-user@syncthing-builder 2014-11-30 12:45:08 UTC
[JAFGU] 15:56:58 INFO: My ID: JAFGUWW-JW7X7V5-7HMXLLI-CG2CUST-J26NAVM-ZN3C3VO-ZYIGTDQ-HEHR2QD
[JAFGU] 15:56:58 INFO: No config file; starting with empty defaults
[JAFGU] 15:56:58 INFO: Edit /root/.config/syncthing/config.xml to taste or use the GUI
[JAFGU] 15:56:58 INFO: Starting web GUI on http://127.0.0.1:8080/
[JAFGU] 15:56:58 INFO: Loading HTTPS certificate: open /root/.config/syncthing/https-cert.pem: no such file or directory
[JAFGU] 15:56:58 INFO: Creating new HTTPS certificate
[JAFGU] 15:56:58 INFO: Generating RSA key and certificate...
[JAFGU] 15:57:05 INFO: Starting UPnP discovery...
[JAFGU] 15:57:11 INFO: UPnP discovery complete (found 0 devices).
[JAFGU] 15:57:11 INFO: Starting local discovery announcements
[JAFGU] 15:57:11 INFO: Local discovery over IPv6 unavailable
[JAFGU] 15:57:11 INFO: Starting global discovery announcements
[JAFGU] 15:57:11 OK: Ready to synchronize default (read-write)
[JAFGU] 15:57:11 INFO: Device JAFGUWW-JW7X7V5-7HMXLLI-CG2CUST-J26NAVM-ZN3C3VO-ZYIGTDQ-HEHR2QD is "ecs.jike.me" at [dynamic]
[JAFGU] 15:57:11 INFO: Completed initial scan (rw) of folder default

通过 [JAFGU] 15:56:58 INFO: My ID: JAFGUWW-JW7X7V5-7HMXLLI-CG2CUST-J26NAVM-ZN3C3VO-ZYIGTDQ-HEHR2QD 一行可知 JAFGUWW-JW7X7V5-7HMXLLI-CG2CUST-J26NAVM-ZN3C3VO-ZYIGTDQ-HEHR2QD 是 Linux 段的 ID

添加 ID

add_dir

<configuration version="6">
  <folder id="tmp_1" path="/root/Sync" ro="false" rescanIntervalS="60" ignorePerms="false">
    <device id="JAFGUWW-JW7X7V5-7HMXLLI-CG2CUST-J26NAVM-ZN3C3VO-ZYIGTDQ-HEHR2QD"></device>
    <device id="P2JSG4H-SIKJAOQ-2QEX737-YSAAJJ7-WLWHWTJ-AC73BMA-K4JV4A5-CV6FCQB" name="pc" introducer="false"> </device>
    <versioning></versioning>
    <lenientMtimes>false</lenientMtimes>
    <copiers>0</copiers>
    <pullers>0</pullers>
    <finishers>0</finishers>
  </folder>
  <device id="JAFGUWW-JW7X7V5-7HMXLLI-CG2CUST-J26NAVM-ZN3C3VO-ZYIGTDQ-HEHR2QD" name="ecs.jike.me" compression="false" introducer="false">
    <address>dynamic</address>
  </device>
  <device id="P2JSG4H-SIKJAOQ-2QEX737-YSAAJJ7-WLWHWTJ-AC73BMA-K4JV4A5-CV6FCQB" name="pc" introducer="false"> </device>
  <gui enabled="true" tls="false">
    <address>127.0.0.1:8080</address>
  </gui>
  <options>
    <listenAddress>0.0.0.0:22000</listenAddress>
    <globalAnnounceServer>announce.syncthing.net:22026</globalAnnounceServer>
    <globalAnnounceEnabled>true</globalAnnounceEnabled>
    <localAnnounceEnabled>true</localAnnounceEnabled>
    <localAnnouncePort>21025</localAnnouncePort>
    <localAnnounceMCAddr>[ff32::5222]:21026</localAnnounceMCAddr>
    <maxSendKbps>0</maxSendKbps>
    <maxRecvKbps>0</maxRecvKbps>
    <reconnectionIntervalS>60</reconnectionIntervalS>
    <startBrowser>true</startBrowser>
    <upnpEnabled>true</upnpEnabled>
    <upnpLeaseMinutes>0</upnpLeaseMinutes>
    <upnpRenewalMinutes>30</upnpRenewalMinutes>
    <urAccepted>0</urAccepted>
    <urUniqueID></urUniqueID>
    <restartOnWakeup>true</restartOnWakeup>
    <autoUpgradeIntervalH>12</autoUpgradeIntervalH>
    <keepTemporariesH>24</keepTemporariesH>
    <cacheIgnoredFiles>true</cacheIgnoredFiles>
    <progressUpdateIntervalS>5</progressUpdateIntervalS>
  </options>
</configuration>