How to make them sync direct when they go for the cloud?


Raccoon

Recommended Posts

There is a little cloud icon next to the device name when transferring, so i guess it means the connection is not direct but via relay?

However, it's turtle slow.

With newbie words, when it goes direct and when via relay?

How to make it go direct?

In this particular case, both computers are behind the same router but on VPNs.

Even if i disconnect the VPN of one of them it still goes via relay.

The corporate policy doesn't allow me to disable the VPN of the other one though.

Link to comment
Share on other sites

If they are both connected via VPN, and that VPN is acting as the default gateway then they're not really on the same network.

Having said that, I would expect that btsync should send broadcast packets to the local network(s) and they should still discover each other (assuming "Search LAN" is enabled on both ends).

Have you added predefined hosts to the shares, using the LAN address of each computer?

Link to comment
Share on other sites

no, but that's actually great idea! :)

p.s.

i know that with one computer being on vpn, it acts like they are on completely different networks, but even then, shouldn't be possible direct sync between those computers instead of relayed one?

(i understand that the cloud icon means that the sync is relayed?)

Link to comment
Share on other sites

i know that with one computer being on vpn, it acts like they are on completely different networks, but even then, shouldn't be possible direct sync between those computers instead of relayed one?

In theory yes, but I don't know enough about your network, the hosts, or the internals of btsync to promise anything ;)

(i understand that the cloud icon means that the sync is relayed?)

Yes :)

Link to comment
Share on other sites

  • 4 weeks later...

So I just check "Use predefined hosts" and add the internal IP of the second device? (192.168.1.something)

Even if one or both devices use vpn they still might find each other and transfer locally right?

 

I got them to have the arrows icons (which i suppose means peer to peer transfer) but the speed is about the same no matter if i add the IP or remove it to predefined hosts.

So I suppose it doesn't go locally.

 

1. How to check if it goes locally or over the internet.

2. do i put something for the port field in when adding predefined host.

3. the router gives different ip in the 192.168.1.100-255 range everytime a device connects, so is there a way to make it try a local range first and then go over the internet?

Link to comment
Share on other sites

I've found the transfer speeds shown in the webui are rarely if ever accurate. Use your system's resource monitor to see the actual network speeds of the interface to get a better idea.

 

To confirm it's going over the local LAN, the only way I know of is to do a traffic dump of network traffic (using tcpdump/Wireshark) and examine that.

Link to comment
Share on other sites

  • 3 weeks later...

i unchecked

- use relay server when required

- use tracker server

 

and left checked

- search lan

- use predefined hosts

 

 

that i did on both computers

 

i set each others internal network IPs and listening port under predefined hosts

and the transfer started just fine ant almost 1MB/s

 

just to make sure it wasn't over the internet i disconnected the internet cable going to the router, leaving just the internal network working

well the second i did that the transfer stopped.

 

GIven the settings it should be impossible it was going over the internet, unless it's a bug right?

Link to comment
Share on other sites

  • 1 month later...

Hi Racconn, I was doing your same tests and the conclusions are the same:

  1. devices are not aware of each other without a tracker server.
    (I thought that "Search LAN" was making the device discover each other by some broadcast or something).
    Note: using "predefined hosts" you can achive that but App with android and iPhone/iPad you can't choose a listening port, so you can't add them as predefined host.
  2. Peers anyway do not sync directly from each other.
    Well, in my apartament, with my pc and Android phone, it's working.
    In the office I'm working I'm trying to sync 2 iPad but it seems they download by the Relay Proxy.
    Tomorrow I'll try to uncheck "Use relay server when required".

So I think that "Search LAN" is meaningless without the tracker.

 

Note: I tried to remove the gateway to my phone.

This way it's conneted to the LAN but not Internet (so it can't contact the tracker).

My laptop is still connected at Internet and I add a big file to the folder I'm syncing.

The sync starts and it's using the LAN (by wifi).

I undertand that by the sync speed and also because I disabled the relay proxy option.

 

I tried then to remove "Search LAN" form btsync and restart it (laptop).

I was expecting it not not be able to connect to my phone because the phone is not connected at Internet (so ignored by the tracker), and btsync should anyway ignore it because it it's in my lan and the option is not set.

But it's still able to connect to my phone.

Or there's a chache in the tracker, or I'm getting lost.

It's funny when the thing works but they shuold not :-)

 

Anyway, to force your devices to sync by lan/wifi, try to disable "Use relay server when required" and restart btsync.

Leave the tracker and search LAN options.

 

Let me know!

Link to comment
Share on other sites

yeah the relay server is always disabled with me, it's too slow anyway

 

so far seems we have to leave it to use the tracker to find each other, and i would prefer to eliminate that touch point to the outside as well

 

to do that, you have to use predefined hosts and they don't work with android for the reasons you mention

so pretty much i confirm everything you said

 

i guess it needs some more time to iron those things out

 

still the best tool out there though :)

Link to comment
Share on other sites

I think I must contradict my self.

I've done another test in my office with 2 pc in my office (twice).

I disabled proxy, tracker and search lan and restarted btsync both sides.

They were not connecting to each other as expected.

As soon as I enable "search LAN" on one of the two peer, they connect and sync!

No need to add a predefined host!

To be extra sure they are not contacting se tracker I should remove the gateway but I can't do it right now.

Also my android mobile connects to both pc(s).

Link to comment
Share on other sites

I repeated the test at home (only 'search lan' enabled) and the wifi was isolated from Internet (so my 2 laptops and Android phone), and it worked!

 

I may be wrong but they need to have the same gateway to discover each other, even it this gateway is not connected to Internet,

 

Raccoon, could you also make this test:

2 pc in the same lan, with the same gw (e.g. your home router): should work also if not connected ad internet.

2 pc in the same lan, without gw. It probably wont work.

 

PS:

Think that in sync.log I saw some UPnP requests form my collegue pc but he had no torrent software...but he had a malware!

Link to comment
Share on other sites

the problem with me is that one of the PC is always on VPN

and i'm trying to make it use not the VPN network but the local one, it seems like sometimes it works, sometimes it doesn.t  (will have to test more when have time)

 

the gateway is always the same for all the devices

 

also seems like i have problems syncing to the android device as well, but that might be unreated

anyway, more tests are due when time is available :)

Link to comment
Share on other sites

the problem with me is that one of the PC is always on VPN...the gateway is always the same for all the devices

You are probably wrong here.

I'm not a super expert in vpn but, if you have a LAN to LAN with openvpn, the requests for a host on the other side of the vpn are not managed by you gw!

You gw will forward the requests to the gw on the other side of the vpn (because it's aware of that ip class).

So, if it's lika suspect (the gateway is important for lan discovery), it will fail in a vpn envirorment.

It may work with "predefined hosts".

Link to comment
Share on other sites

well i have 2 networks the local one which is on the same gateway as the other devices and the vpn one

the trick is to make sure it uses the local network

 

i test that by giving it large file to transfer and watch the network utilization of each network, sometimes te usage goes over just the local one, sometimes it utilizes both

Link to comment
Share on other sites

Confimed: peers need to have the same gateway.

If you have 2 peers in the same network but a gateway is not set, they are not going to discover each other.

If I set no gateway but I add a predefined host, then peers are able to sync.

 

Raccoon, I think you should also disable search LAN.

You have only two computers so you can set on both the respective predefined host.

Link to comment
Share on other sites

well can the device have internet at all if there is no gateway?

my devices are set to discover the settings on auto

 

 

yes it works with predefined hosts, but they sometimes change, or one wants to add devices without extra configuration and would be nice to have a way to do that auto as well

Link to comment
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.