Sign in to follow this  
shandor0

Sync Api Question About Internet Connection

Recommended Posts

Hi,

 

We are considering using Bitorrent Sync API in our code but most of our customers are using our product on intranet only and do not necessarily have an internet connection.

 

1) Is Internet connection required for the API to work ?

2) Is it possible that sync api will be de-activated one day via a remote call  ?

 

Thanks

Adi

 

 

 

Share this post


Link to post
Share on other sites

Hi,

 

An internet connection is not required for the API to work

and unless you expose the port on which the web service is running to

the outside world by using NAPT mappings there is no way to access

the web service from outside your local network.

 

So, long story short: By default the API is intended to be used in an LAN environment,

which means it is no problem for you or your customers to implement it.

 

As far as syncing is concerned, devices on the same LAN will normally

sync directly witch each other without connecting to anything else.

 

If you want to lock it down 100%, simply disable the following features for the sync folder:

 

  • Use relay server when required
  • Use tracker server
  • Search DHT network

If you want to sync across devices on different networks,

you can still disable all of the above, but you'll have to expose the port which BTSync

uses to the outside network (this is not the same as the port on which the web service / api is running)

and then add a predefined host to the "clients" sync folder configuration.

 

The sync API cannot be de-activated using a remote call, since the API service is not exposed

to the internet. And even if you do expose it to the internet (do so with care), de-activation would

only be possible if that was build into the btsync application.

 

There is a lot of controversy concerning the API key required to enable the API features,

perhaps the developers did not think it through, or they wanted a way to limit the number of 

people fiddling around with it until there is a "stable" release, who's to say, but given

the nature of btsync I do not think it is the intention of the Bittorrent company to "control" how we use btsync.

 

Just for reference, here's a quick example network:

 

examplebtsyncnetwork.png

 

If you look at both local area networks (two intranets if you will) then, by default, the API exposed

by your BTSync instances will only be available for devices within the same LAN.

No internet connection required.

 

If you have more than one LAN connected into one VPN, the API will, by default,

be availablefor devices within the entire VPN.

Share this post


Link to post
Share on other sites

Hi Delegatevoid, and thanks for the elaborate answer.

I ran a test on my LAN by disconnecting the WAN at the modem level... and the BTSync clients ( 2 pcs) stopped synching. I reconnected to the internet (plugging the modem back in ) and synching started. I know very little about the bitorrent protocol but I guess that even machines on my LAN need to download a tracker from a server somewhere on the internet.

Can you confirm or refute the results of my test ?

 

Thanks

Share this post


Link to post
Share on other sites

Hi,

So here's what I did just to verify what we already know.

 

  • I set up a second LAN that is not connected to the internet in anyway.
  • I added two systems to that LAN and installed BTSync on them.
  • I created a sync folder on one system
  • I added the sync folder on the other system (using the key provided by the first)
  • Seconds later the devices started syncing

This is the expected behavior, the systems discover each other directly

without the need for an internet connection.

 

Let's say that for some reason your systems had to use an external tracker

or relay host to find each other or to sync data,

 

then there's probably something else at play here. Perhaps firewall rules somewhere? 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this