Coder Social home page Coder Social logo

mgholam / torpedosync Goto Github PK

View Code? Open in Web Editor NEW
61.0 12.0 18.0 860 KB

LAN based file synchronization between machines.

Home Page: https://www.codeproject.com/Articles/1224849/TorpedoSync

License: Apache License 2.0

C# 87.19% HTML 0.13% Batchfile 0.04% CSS 0.29% JavaScript 1.26% Svelte 11.09%
lan sync synchronization csharp

torpedosync's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

torpedosync's Issues

Empty folders and files does not sync

I have problem with empty files and folders, they just don't sync. Also emptying file will delete it on other computers.
Don't know if it's on purpose, if so then option to change this behavior would be great.

Example on two computers [A] and [B].
Creating empty folder on [A] will not sync it to [B].
Creating empty text file on [A] will not sync it to [B].
Modifying the file (adding text) on [A] will sync that file to [B].
Modifying the file (deleting all text) on [A] will delete file on [B].

Environment variables not supported and cause sync to error

Hi, thanks for the great software first of all.

I created a test setup where I wanted to 2-way sync files between 2 Windows 10 VMs.

On the "server"-VM (Name in screenshot: win10) I created a share:

Unique Name: torpedo-share
Local Path: C:\torpedo-share

On the Client-VM (Name in screenshot: second win10), I created a connection:

Token: [RW-Token]
Local Path: %USERPROFILE%\torpedoshare-sync

The connection worked, however:

  1. Instead of creating a folder C:\Users\username\torpedoshare-sync on the client-vm, it created a folder literally called %USERPROFILE% inside the torpedoshare program directory (so it treated it like a relative path)
  2. A file then successfully synced from the server to the client into the literal C:\Users\username\Downloads\TorpedoSync_exe.v.1.7.0\%USERPROFILE%\torpedoshare-sync directory
  3. After changing that file on the client side and waiting for the changes to sync to the server-side,
    I saw errors appear in the console on the server side and the change(s) would never sync to it

My bug report boils down to the following:

Please support the use of environment variables in the "Local Path" entries, by use of Environment.ExpandEnvironmentVariables()

Thanks!

EDIT: Forgot my screenshot, oops:
Screenshot from 2020-02-13 22 26 47

partially connected?

since one of the last windowsupdates some of the torpedo clients are not connected and the sync process do not start

i tried to figure out which windows updated is causing the problem. the clients nearly the same, based on .net Patches.
the Master with ip X.28 is starting without problems. Also no errors in the log.

client x.75 find the master, but did not start. see errors below

client x.32 has similar problems, but he has 3 IP Adressen (2 of them internaly)

Error Client-x75

-----------------------------------------------------
 ______                     __     ____
/_  __/__  _______  ___ ___/ /__  / __/_ _____  ____
 / / / _ \/ __/ _ \/ -_) _  / _ \_\ \/ // / _ \/ __/
/_/  \___/_/ / .__/\__/\_,_/\___/___/\_, /_//_/\__/
            /_/                     /___/
-----------------------------------------------------
TorpedoSync - Folder Sync Application
Version      : 1.7.5.0
File Version : 1.7.6.676
-----------------------------------------------------
11:23:56|DEBUG| Starting Server...
11:23:56|DEBUG| UDP server on port = 21000
11:23:56|DEBUG| TCP server on port = 21001
11:23:56|DEBUG| WEB server on port = 88
11:23:56|DEBUG| my ip = 192.168.178.75
System.Net.Sockets.SocketException (0x80004005): Ein Verbindungsversuch ist fehlgeschlagen, da die Gegenstelle nach einer bestimmten Zeitspanne nicht richtig reagiert hat, oder die hergestellte Verbindung war fehlerhaft, da der verbundene Host nicht reagiert hat
   bei System.Net.Sockets.Socket.ReceiveFrom(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags, EndPoint& remoteEP)
   bei System.Net.Sockets.UdpClient.Receive(IPEndPoint& remoteEP)
   bei TorpedoSync.UDP.searchIP(Int32 port, IPAddress ip, List`1 list)
11:23:58|INFO| List of currently connected machines :
11:23:58|INFO|   Connected to : 192.168.178.28
11:23:58|ERROR| System.Exception: Could not find token at index 0
   bei fastJSON.JsonParser.NextTokenCore(Char* p)
   bei fastJSON.JsonParser.LookAhead(Char* p)
   bei fastJSON.JsonParser.ParseValue(Char* p, Boolean val)
   bei fastJSON.JsonParser.Decode()
   bei fastJSON.deserializer.ToObject(String json, Type type)
   bei fastJSON.deserializer.ToObject[T](String json)
   bei TorpedoSync.TorpedoSyncServer.ReadCompShares()
   bei TorpedoSync.TorpedoSyncServer.StartQueueProcessors()
   bei TorpedoS
D:\TSYNC>

error Client-x32

-----------------------------------------------------
 ______                     __     ____
/_  __/__  _______  ___ ___/ /__  / __/_ _____  ____
 / / / _ \/ __/ _ \/ -_) _  / _ \_\ \/ // / _ \/ __/
/_/  \___/_/ / .__/\__/\_,_/\___/___/\_, /_//_/\__/
            /_/                     /___/
-----------------------------------------------------
TorpedoSync - Folder Sync Application
Version      : 1.7.5.0
File Version : 1.7.6.676
-----------------------------------------------------
11:30:38|DEBUG| Starting Server...
11:30:38|DEBUG| UDP server on port = 21000
11:30:38|DEBUG| TCP server on port = 21001
11:30:38|DEBUG| WEB server on port = 88
11:30:38|DEBUG| my ip = 192.168.31.1
11:30:38|DEBUG| my ip = 192.168.178.32
11:30:38|DEBUG| my ip = 192.168.88.1
System.Net.Sockets.SocketException (0x80004005): Ein Verbindungsversuch ist fehlgeschlagen, da die Gegenstelle nach einer bestimmten Zeitspanne nicht richtig reagiert hat, oder die hergestellte Verbindung war fehlerhaft, da der verbundene Host nicht reagiert hat
   bei System.Net.Sockets.Socket.ReceiveFrom(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags, EndPoint& remoteEP)
   bei System.Net.Sockets.UdpClient.Receive(IPEndPoint& remoteEP)
   bei TorpedoSync.UDP.searchIP(Int32 port, IPAddress ip, List`1 list)
System.Net.Sockets.SocketException (0x80004005): Ein Verbindungsversuch ist fehlgeschlagen, da die Gegenstelle nach einer bestimmten Zeitspanne nicht richtig reagiert hat, oder die hergestellte Verbindung war fehlerhaft, da der verbundene Host nicht reagiert hat
   bei System.Net.Sockets.Socket.ReceiveFrom(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags, EndPoint& remoteEP)
   bei System.Net.Sockets.UdpClient.Receive(IPEndPoint& remoteEP)
   bei TorpedoSync.UDP.searchIP(Int32 port, IPAddress ip, List`1 list)
System.Net.Sockets.SocketException (0x80004005): Ein Verbindungsversuch ist fehlgeschlagen, da die Gegenstelle nach einer bestimmten Zeitspanne nicht richtig reagiert hat, oder die hergestellte Verbindung war fehlerhaft, da der verbundene Host nicht reagiert hat
   bei System.Net.Sockets.Socket.ReceiveFrom(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags, EndPoint& remoteEP)
   bei System.Net.Sockets.UdpClient.Receive(IPEndPoint& remoteEP)
   bei TorpedoSync.UDP.searchIP(Int32 port, IPAddress ip, List`1 list)
11:30:40|INFO| List of currently connected machines :
11:30:40|INFO|   Connected to : 192.168.178.28
11:30:40|INFO|   Connected to : 192.168.178.28


Press 'q' to exit...
11:30:40|ERROR| System.Net.HttpListenerException (0x80004005): Zugriff verweigert
   bei System.Net.HttpListener.AddAllPrefixes()
   bei System.Net.HttpListener.Start()
   bei TorpedoSync.CoreWebServer.Start()
11:30:45|DEBUG| Shutting down.

Option to delete files older then x

Hi!

great piece of code! I was going to start something like this myself (until i found yours). I need to sync files to a central server because some workstations have got limited harddrive space. An option to delete files locally when they are older then x days would be a nice feature also (if they have been synced to the server of course).

Regards,

Per

File Size is Limited to 2 GB?

It seems that you cannot transfer files larger than 2 GB.
In this case the log shows this message

07:30:25|INFO| null data : [FILENAME]!torpedosync
07:30:25|INFO| original data size : 10.327
07:30:25|INFO| compressed size : 686
07:30:32|INFO| List of currently connected machines :
07:30:32|INFO|   Connected to : 192.xxxxxxxx
07:31:10|INFO| GC.......
07:31:10|INFO|   GC Collection 0 = 747
07:31:10|INFO|   GC Collection 1 = 684
07:31:10|INFO|   GC Collection 2 = 672

After that the client is dead. It still shows the connected clients, but does not accept any data.
After a restart of the service, the download of the data starts again.

" Token not found on connected machine"

I currently have the problem that I can not create a new connection.
The error is always " Token not found on connected machine".

Setup
192.168.178.75
192.168.178.28

i want to copy data from x.75 to x.28
On .x.75 I have created a "Share" and want to include in x.25 under Connections.

In the log of 192.168.178.75
07:40:16|DEBUG| my ip = 192.168.178.75
07:40:18|INFO| List of currently connected machines :
07:40:18|INFO| Connected to : 192.168.178.28

In the log of 192.168.178.28
I do not find any info

I have already deleted the complete configuration (on all machines) and tried again. Still the same

releases

would be great if you'd use github releases to upload builds of each version.

torpedoSync.ClientCommands.SyncMeReadonly(State mystate, Connection share)

Hi,
since a few days i got this error. To get rid off i updated the code to the last version (1.7.7) But still the same.

19:52:05|INFO| syncing readonly : SamTheEagle WebDev neard
19:52:09|INFO| GetCurrentState total secs = 3,8540109
19:52:30|ERROR| System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.

   bei TorpedoSync.ClientCommands.SyncMeReadonly(State mystate, Connection share)
19:52:30|INFO| syncread null
19:52:44|INFO| GC.......
19:52:44|INFO|   GC Collection 0 = 856
19:52:44|INFO|   GC Collection 1 = 199
19:52:44|INFO|   GC Collection 2 = 10

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.