Monthly Archives: December 2013

Using Windows Vault To Store TortoiseHg (Mercurial) Passwords

Written by William Roush on December 17, 2013 at 7:34 pm

Mercurial has a built-in method for storing passwords, but it stores them plaintext in your settings file. For those of us bound by various compliance regulations, or just those of us that care about security, this is a huge no-no.

First you’ll want to clear your password from TortoiseHg’s authentication section for your repository if you haven’t already (this will remove your credentials from your “.hg\hgrc” settings file in the repo, you may want to manually confirm this).

Mercurial-Auth

Next you need to enable the Mercurial Keyring extension by pasting the text below into your mercurial.ini file (can be accessed via File > Settings > Edit File), which is bundled with TortoiseHg, so a path is not required:

[extensions]
mercurial_keyring=

On the next push it’ll ask for your password, put it in and it should never ask again.

To confirm/update your password was saved in the Windows Vault, go to your Control Panel > User Accounts > Manage your credentials

Mercurial-Windows-Vault>

Bittorrent Sync – Decentralized Cloud File Sharing

Written by William Roush on December 2, 2013 at 8:25 pm

BitTorrent Sync

What Is BitTorrent Sync?

BitTorrent Sync is one of the latest public offerings from BitTorrent Labs. BitTorrent Sync provides the ability for you to share folders between multiple machines, including your mobie devices using the same peer-to-peer technology that has been used for the popular file sharing protocol, BitTorrent. It’s almost exactly like a dropbox like offering, without the centralized authority that has access to your data.

How Does It Stack Against Dropbox Like Offerings?

While BitTorrent Sync doesn’t offer any kind of online presence, it does offer a fairly feature-complete desktop and mobile solution. You have the ability to provide read-only share access, and also have the ability to share multiple folders. You also have the ability to generate one-time use secrets that can only be consumed once so that someone that you give your secret to can’t continue to give it out to people they know.

Wait BitTorrent? Isn’t That Open File Sharing? Are My Files Secure?

Yes they are secure! All files shared between machines are encrypted using your share key. Of course anyone with your share key will have access to your data, but you keep that to yourself and only those that you want to have access to that data.

Getting Started

A new BitTorrent Sync Install

A new BitTorrent Sync Install

BitTorrent’s installer will run you right through the process without much interaction needed. After you’re inside of the main application you’re ready to go. Add a new folder, right click on it and click “Connect to mobile device”, scan the QR code into a phone that you’ve already installed BitTorrent Sync on and you’ve got two devices syncing.

Adding to mobile is a snap!

Adding to mobile is a snap!

Adding my Nexus to BitTorrent Sync.

Adding my Nexus to BitTorrent Sync.

Syncing Mobile Devices

BitTorrent on Android

BitTorrent on Android

Syncing works a bit better than Owncloud does on my Android device (Owncloud requires manual “refreshing” of folders). Additionally the device-to-device file transfer is very nice… assuming you’re transferring with someone that already has BitTorrent Sync, but this really only makes sense with sensitive or large files where the security of BitTorrent Sync is mandatory, otherwise I’d just send e-mail attachments.

Sending files between mobile devices is easy, just scan the QR code at the end of this wizard.

Sending files between mobile devices is easy, just scan the QR code at the end of this wizard.

Configuration

We’re going to crawl a little bit more into the internal settings of BitTorrent Sync, most people wont ever need to touch these, and I’ll touch into how these settings work under the technology dive (next section).

Folder settings

Folder settings

Right clicking a folder and clicking “Show folder preferences” will show a window with two tabs, we’re interested in the the properties right now. Here we see these options:

Use relay server when required Will leverage BitTorrent’s relay servers when sync devices cannot communicate directly over the internet.
Use tracker server Uses BitTorrent’s tracker servers to seek out BitTorrent Sync clients that match your secret.
Search LAN Searches the local area network for BitTorrent Sync clients that match your secret.
Search DHT network Searches the distributed hash table (DHT) network for BitTorrent Sync clients that match your secret.
Store deleted files in SyncArchive SyncArchive is a hidden folder that will temporarily store deleted files (30 days by default). You can access it by right clicking on a folder and select “Open SyncArchive”.
Use predefined hosts Manually add the addresses of your various BitTorrent Sync machines.

Technology

Peering

Peer-to-peer networking

BitTorrent has been around for over 12 years now, it allows multiple machines to share data between each other instead of getting it from a central server, this is known as peer-to-peer and commonly referred to as “P2P”. Many games such as the popular MMORPG World Of Warcraft use a similar technology to share patches among their customers, reducing the server load and improving the end user experience by reducing download times.

Trackers

Trackers in BitTorrent are servers that keep track of peers, this allows BitTorrent Sync to easily find all machines that share a common key and provides them with the information required to talk to each other. The upside of the tracker is it provides a centralized authority to quickly determine who to peer with, the downside is that you depend on this tracker for your peering information.

Trackers however are not required, if you’re syncing with your home network, you can disable all trackers and enable LAN-only sync, at this point BitTorrent has none of your information on it’s tracker servers, and every time you bring any two devices together on the same network, they’ll sync up.

Relays

Relay servers are used when your device cannot properly punch the holes required for communication (usually done automatically by BitTorrent Sync via UPnP), in this case BitTorrent Sync will use one of BitTorrent’s servers to relay data back and forth.

Would I Use It?

I’m still heavily inclined to stick with OwnCloud. The web interface is useful and I don’t have to rely on a 3rd party tracker. I’d possibly consider BitTorrent Sync if they had the option of me configuring and running my own tracker and transfer relay (allowing me to run without the need of BitTorrent Lab’s servers). While settings.dat in your profile show the trackers set as “udp://tracker.openbittorrent.com:80/announce” and “udp://tracker.publicbt.com:80/announce”, there is no way to change this in the UI and I haven’t seen any discussion on support for your own tracker. Additionally I don’t see any configuration for running your own relay servers.