delegatevoid

Members
  • Posts

    65
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by delegatevoid

  1. When you try to request the following resource (using your browser for example): http://127.0.0.1:8888/api?method=get_version This is assuming you are testing on the localhost, otherwise modify the address You may also have to modify the port, check your config file for details. Do you get valid JSON data or not? If not, the configuration file may be invalid.
  2. 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 systemI added the sync folder on the other system (using the key provided by the first)Seconds later the devices started syncingThis 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?
  3. I'll take a look at it asap, probably will not be today though as I'll be out of the office
  4. 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 requiredUse tracker serverSearch DHT networkIf 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: 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.
  5. Someone seriously needs to update and revise the API documentation. Fix documentation errors as described in this post That and mobile API support is on the top of my wishlist.
  6. Ok, apparently they changed the parameter from "encryption" to "encrypted". And yet I'm not getting the encrypted key: http://localhost:8888/api?method=get_secrets&secret=AAAAAAAAAAAAAAAAAAAAAAAA&type=encryptedReturns: { "read_only": "AAAAAAAAAAAAAAAAAA", "read_write": "BBBBBBBBBBBBBB" }Note that I did replace the actual key values before posting here. The API documentation specifies: http://[address]:[port]/api?method=get_secrets[&secret=(secret)&type=encryption]Yet the following line on the same page specifies: secret (required) - must specify folder secrettype (optional) - if type=encrypted, generate secret with support of encrypted peerPlease note the colour coded parameter and how two different versions are used: encrypted vs encryption Neither values return the encrypted key for me. (v1.3.94)
  7. Really? Damn'it the "update" feature of the client always says it's up to date... Will check for a manual update.
  8. Hi, Sorry it took me a while to get back to you. Apparently I am no longer receiving notifications from this forum. As you pointed out you see the backup machine in the devices tab of the other computer. When you look at the "transfers" tab, do you ever see any activity there? Timothy
  9. Hi, While the API does expose some extra features, most of what you need can be configured with the default client. Seems like you have a number of issues: High CPU usage of the BTSync application This might be due to a bug in the application, probably something the Bittorrent devs should take a look at I have noticed similar spikes in CPU usage on Windows but not to the extend where it hinders mouse movements. What are the specs of the machine you are experiencing this on?Not syncing Can you verify that the other system is visible in the Devices tab? If the backup machine has a static IP, you may want to modify the properties of the sync folder on the source machine to "Use predefined hosts" and add the static IP of the backup machine (+ port). You will also have to configure the firewall to expose the port on which BTSync is listening (on the backup machine). At that point you can disable "use tracker server" and "use relay server". This usually fixes syncing issues for us.Timothy
  10. According to the documentation: http://[address]:[port]/api?method=get_secrets[&secret=(secret)&type=encryption] When "type" is set to "encryption" the response should also contain the encryption key This worked with version 1.2.82 but as of version 1.2.91 it no longer returns the encryption key. Side note: The API docs need version markers and be more consistent.
  11. Hey, That seems to be correct, although the last part should be the name of the folder, rather than the full path. What issue are you having exactly?
  12. Aside from whether or not the API key should be removed completely, until that day comes it's still not clear to me: 1) Do we as developer distribute the key with our software, essentially making it very easy for users to 'fetch' and abuse them or 2) Will every user have to request their own API key... which will be a disaster...
  13. I was trying to reply to this blog entry: http://blog.bittorrent.com/2014/02/04/sync-hacks-how-to-set-up-bittorrent-sync-on-a-synology-nas/ But apparently the comment system doesn't seem to work properly. So I'll just put up a quick note here. While the blog entry goes in-depth on how to set things up manually, for those that just want to get up and running in no time and keep everything up to date automatically, the easier solution is to add the SynoCommunity repository to the package manager in DSM http://www.synocommunity.com/packages Once it's added, use the packet manager to install BTSync and everything else will be set up for you.
  14. You can simply copy the btsync executable anywhere you want and set "storage_path" : "./"This will create the storage path in the same folder as the btsync executable, wherever on your system you have placed it. This is what I use to 'embed' btsync in my own application in order to provide a custom UI. If you are going to build anything on top of btsync you don't want to hardcode the path anyway
  15. You can distribute the btsync executable with your own application and have your own application start it with the proper configuration parameters. There's no need for a "real" install on the target machine. If that's what you mean. If you meant "using the btsync executable as an embedded library" then I'm afraid that won't work (yet?)
  16. Hi, Is there a way to interact with BTSync on Android? Aside from installing the normal BTSync on Android as described here https://matt.bionicmessage.net/blog/2013/04/27/Running%20BitTorrent%20Sync%20on%20your%20(rooted)%20Android%20device I'd like to be able to add new keys from within another application. Update: Sorry, just remembered I had already asked this, and there is no way to delete the old post. Anyway, never got an answer so...
  17. I'm wondering if it is possible (or will be) to control BTSync running on Android from other applications running on the same machine. Now this might sound weird if you're thinking of Android as a pure mobile OS, but we actually use Android as embedded device solutions (as opposed to using Linux based solutions on top of a Raspberry for example). If we have a few hundred devices in a network running one of our applications we could then have the central server tell that application to let btsync register a new secret key. So basically configure content distribution remotely.
  18. Hi, I've no idea about error 103, but I've found a few others and noted them here: http://forum.bittorrent.com/topic/24975-addfolder-response-does-not-correspond-with-current-docs/ If you figure out what 103 means, could you add it?
  19. Hi, For those who are interested, I just published a C# implementation of the API on Bitbucket. It's an early draft and the tests need some restructuring, will do that asap. If anybody is interesting in helping, you know what to do. The repository can be found here: https://bitbucket.org/timothyp/arendee-btsynclib
  20. In all methods except for GetPreferences and SetPreferences 0 and 1 are used to represent boolean values while in those two the values true and false are used. It gets worse though, because in the Get/Set Preferences method there is one parameter that is using 0 and 1 to represent boolean values: use_upnp You guys should pick on or the other. Update: This is actually another error in the documentation and the returned json does use 1 and 0 to represent true or false
  21. While the API currently allows to add and overwrite existing hosts, there is no way to delete hosts. This should be added.
  22. As indicated here http://forum.bittorrent.com/topic/24794-no-encrypted-secret-on-existing-folder-secrets/ The correct value for the type parameter is encryption
  23. This indicates the 'secret' parameter is optional, however at the end of this section in the docs: In reality the parameter is in fact optional, not specifying a secret simply generates random keys.
  24. The SetFilePreferences method should return an indication of whether or not an error occured. For example, is an invalid secret key is specified or if the specified file does not exist. Currently there is no such feedback. This adds to my previous post about the AddFolder method. All methods should use the same field name to return errors and the value of the error code should be a unified list for the entire API, these are just API basics.