Automatic Coding

Members
  • Posts

    218
  • Joined

  • Last visited

  • Days Won

    8

Posts posted by Automatic Coding

  1. Questions about the encrypted client:-

    1. Does it encrypt the file names too? Or just the data?

    2. Does it keep the directory structure the same? Or, is it completely incoherent data to anyone looking at it?

     

    Questions about the protocol:-
    I read that (Quote below) all non-encrypted clients now need to do everything twice as to have two copies, one for 'encrypted' nodes and one for 'normal' nodes, wouldn't it just be more logical to do it all once, then, at the receiving end of any 'normal' nodes just decrypt it? I presume you're already encrypting once for network transmissions, and, then, once for the encrypted nodes.

     

    Quote:-

    Explanation how this works.

     

    1. You add the folder and generate RW/RO and backup key;

    2. New RO key will have a special key to decrypt data (this is why the new RO key is longer)

    3. Since RO and RW nodes needs to encrypt data for backup node - there will be two indexing data sets for RO and backup nodes. On ARM devices (NAS) and phones it could 2-3x slow down indexing. 

     

     

     

    Questions about the API:-

    Is API access a 'rare' thing? I'd love to get access, however, it seems to be a manual thing. Is it something that 'everyone is accepted to'? Or, just the 'elite few'?

     

    Thanks,

    Automatic.

  2. Obviously mobile phones don't have the kind of hard-drive space that full fledged PCs have, which is why I'm asking if there's a way to ask BTSync to delete files that haven't been accessed in so X much time, to save disk space.

    By delete, I mean locally, not on all clients. Currently the only way I can think of doing it is using one of the servers to 'move' the file away, then back in, if it knows the android has that file downloaded, but, it seems excessive.

  3. I host quite a few programs on my host, and, as switching from one (That has SSL) to BTSync, I noticed it does have SSL, however, it's an invalid SSL cert (self-signed) for my host. I looked through the --dump-sample-config and couldn't find anything, nor searching "ssl certificate" on this forum. Does anyone know where I can locate/modify said cert/key?

    The one it's currently issuing me:-

    ysZo3RD.png

  4. 1. SHA2(Secret) on tracker, is used to connect peers. This information is not stored;

    2. No

    3. Yes, to understand usage of Sync.

    4. IP address of client without any port information. We don't use it, but see it as a part of HTTP request.

    I'm more questioning what you receive, more than what you store. What if you were hacked, or, you're just untruthful, it would be very easy to change "receiving" to "storing" (Open a file hook, write to file, close file. Three more lines of code?).

    As for 2, yes. Apparently it's encrypted, but, still, with the SHA2($secret) you could easily do a mass bruteforce on all the secrets you receive from the tracker and just decrypt the majority that you manage to acquire the original.

  5. Probably easier to throw together some bash/batch script to use curl to add each one.

    Something like:-

    for [file in /tmp]; do
    $secret=$(dd if=/dev/urandom bs=1 count=128 | md5sum) #I think by default bittorrent sync uses md5sums? Or, atleast something that [b]could[/b] be a MD5sum. You might want to change it to base64/sha512/256/128.
    curl 127.0.0.1:8888 --data "whateverPostDataIsRequired&folder=$file&secret=$secret"
    done

    Obviously the above won't work for more than one reason (Curl is incorrect, for loop is incorrect, secret would probably fall below a secure measure, etc...), but, it gives you the idea.

  6. BitTorrent Sync doesn't use usernames & passwords!

    Are you trying to access and add a remote folder directly into BitTorrent Sync? If so, you don't need to do this - you should only add local folders to BitTorrent Sync on each device. Trying to add a folder from another computer to BitTorrent Sync is probably why you're seeing a Windows prompt asking you for your Windows login credentials for the other computer you're trying to add a folder from.

    I'm taking a guess and assuming it's his UAC settings.

  7. It's used to transfer the real key over an encrypted channel, I believe. Useful for if you want to give someone you trust full access, but, you don't trust you means of the connection between you two.

    Basically, you give them a one time key, they connect to you, the channel is encrypted, then BTSync transfers the real key, then the OTK is marked as invalid, then they reconnect using the real key.

  8. I'm just going to post this because I'm still wondering how this is going to work, but, here's my idea once again, but, more thought out:-

    Connection to tracker to find IPs, application is marked with an A, bitSync (On the clients) is marked with a B and the tracker is marked with a T. This is English, but, obviously could be turned into more network I/O effective terms:-

    //Application opens a connection with the tracker

    A:- Hi, I'm looking for all users who have this share:- sha512/256/whatever($share)

    T:- Here you go:- {["127.0.0.1", 80], ["192.168.0.1", 54434], ["10.0.0.1", 48929]}

    //Tracker closes connection, assuming it's TCP, which I recommend

    //Application runs
    for(int i = 0; i < hosts.length; i++) {
    //hosts in the above array returned from the tracker, the object would obviously be turned into a keypair.
    Socket mySocket = new Socket(hosts.key, hosts.value);
    try {
    mySocket.connect();
    } catch (Exception e) {
    //Host doesn't like me
    continue; //hop onto the next client
    }
    //At this point we're connected
    talkToHost();
    }

    Then, the talkToHost function would run something like (Using the same intentifiers as above):-

    A:- Hi, this is my handshake. I'm now going to encrypt everything with some kind of encryption (SSL/etc) that's come from the secret, so, assuming we are both using the same secret, we can talk
    //Encryption
    A:- Ping //If the btsync client doesn't understand this, it'll disconnect here
    B:- Pong //If the application doesn't understand this, it'll disconnect here
    //At this point both BTSync and the application agree they're using the same secret, however, for security sake they'll continue to run under this handshake

    //BTSync at this point will just idle, with a timeout of ~ an hour. Each thirty minutes the BTSync client will submit a random 10 character string like following:-
    PING:- TenCharsxx
    //Then the application will reply back with a 24 bit proof of work using the hashcash method which much match the random 10 characters that the server just sent. If the application doesn't reply with ~ 5 minutes, the BTSync client should DC
    PONG:- 1:24:130503:tencharsxx::uRDE5YjYAgOyl0lr:00000003e7B
    //In case you don't know what hashcash is, if you sha1 the above statement it'll start with at-least 24 bits that are 0 (or 6 (24/8(bits per byte)*2(Characters required to represent a byte in hexadecimal) hexadecimal 0s):-
    //000000e0cd0c26f841b975cd6808803ad2916a17
    //You'll also notice that the random 10 characters are located inside the text, along with the date, and some more random characters
    //The above 24 bit proof of work took under a second to generate on my laptop, [b]any[/b] PC will be able to generate it extremely quickly.

    //The application can also issue requests from here, each request must follow the following syntax:-
    //COMMAND($nulLCharacter (0x00))arguments($nullCharacter (0x00))split($nullCharacter (0x00))by($nullCharacter (0x00))by($nullCharacter (0x00))0x00($nullCharacter(0x00))COMMANDIDENTIFIER
    //The command will then run, and, any returns/errors/status/callbacks will use the command identifier as the last object (split by 0x00) so that an application can run multiple commands at a time and be able to identify which returns are coming from which commands. For example:-

    0x01|0x00|sha512(THISISMYSECRET)|0x00|APPLESAUCE

    //Obviously it wouldn't have the pipe characters, but, this would me:-
    //0x01 (Command identifier, in this case "Folder status request")
    //0x00 (Split this with the next argument)
    //The argument for the command, in this case the secret
    //0x00 (Split this wiuth the next argument)
    //No more arguments, so, the last one will be the command identifier "APPLESAUCE"

    The BTSync application will then reply:-
    0x01|0x00|APPLESAUCE
    //0x01 being the status (or 0x01, for "All nodes in sync", 0x02 for "misisng folder", 0x03 for "downloading", 0x04 for "Uploading", etc...
    //0x00 splits it
    //No more reports, so, the command identifier, "APPLESAUCE"

    Anyway, in a rush, I can't proof read at the moment and my spelling without spell check is terrible, and, I typed this out in gedit (E.G. no spell check). Sorry, gotta go, bye.

  9. Without a service that uses UDP that I can send over the VPN I cannot do that... I already said aside from the VPN and BTSync I have nothing that uses UDP...

    And I've already stated that I'm not asking you if anything else using UDP (Although, because nothing does, you'd have no idea if UDP works or not).

    As for a service, I thought a computer technician would know this stuff, run:-

    nc -ul 7654

    On one computer, then run (use the VPN's IP, not the real IP for the machine on the VPN):-

    echo "Hi" | nc -u $otherComputersIP 7654

    On the other. Post what the first one outputs, then, do the exact same test but which each computer's roles reversed.

  10. Odd, my pid file has the right date/time.

    So is mine, laptop:-

    automatic@automatic-G74Sx:~/.sync$ stat sync.pid
    File: `sync.pid'
    Size: 6 Blocks: 8 IO Block: 4096 regular file
    Device: 801h/2049d Inode: 24642094 Links: 1
    Access: (0644/-rw-r--r--) Uid: ( 1000/automatic) Gid: ( 128/vboxusers)
    Access: 2013-05-03 12:32:48.866240525 -0400
    Modify: 2013-05-03 12:34:13.493228209 -0400
    Change: 2013-05-03 12:34:13.493228209 -0400
    Birth: -

    Server 1 (No idea why the access time is so long ago, server uptime is only 2 days, so, technically btsync was last started 2 days ago):-

    root@Tower:/mnt/user/Appdata/bitTorrentSync# stat sync.pid
    File: `sync.pid'
    Size: 6 Blocks: 8 IO Block: 131072 regular file
    Device: dh/13d Inode: 4295070889 Links: 1
    Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
    Access: 2013-04-23 20:17:39.000000000 -0400
    Modify: 2013-05-01 08:03:37.000000000 -0400
    Change: 2013-05-01 08:03:37.000000000 -0400

    Due to issues with port forwarding, I can't supply a stat for my other server at this point in time (Using a temporary router, very poor support for port forwarding, hopefully replacing the hardware with a new router in ~ 2 weeks)

  11. When you have an ISP like mine who like to spy on its customers... It is more secure to exit on to the internet from somewhere else. I know how VPN's work I am PC technician. I have the ports forwarded through an SSH tunnel. I have had some software act weird when I am behind the VPN, which is why I mentioned it here while this thing is still in development.

    1. May I ask what country & ISP you use? Also, how you can be sure they spy on you? Majority of companies they're breaking the law, depending on how much they spy on you.

    2. You didn't supply what I ask

  12. No, but I didn't realize that btsync uses 4MB windows. I would have invalided several of those 4MB windows, so btsync would have had to retransfer a large portion of the file. rsync uses 16K windows, so obtains a much larger speedup for small changes, at the cost of being less efficient elsewhere.

    Request in the wishlist for modifiable sizes, personally, 4MB seems like a good size, although if you have files that you know only a few bits/bytes will be changed, a modifiable size would be useful.

  13. Well, the Linux port uses it's own built-in webserver to mange secrets and folders; creating the folder might be a problem, but perhaps not?

    I'm confused what you mean by "creating the folder might be a problem"?

    Make the directory, if there's an error, return it, else, return a success.