I do not want syncthing making any internet connections , I use it only on my local LAN , how can I turn this off? I never saw this before this latest version
@calmh what is the default for this setting? checked?
I’m just asking because I had already unchecked “Enable NAT traversal”, “Local Discovery”, “Global Discovery”, “Enable Relaying” in the normal options (before upgrading to v0.14.40) and in advanced options “NAT Enabled” was already unchecked.
No, it’s not a bug, just me not remembering what settings are what and it not being super clear to begin with.
NAT support (in our code) is about using NAT traversal protocols to set up port mappings in routers.
STUN is about figuring out the NAT type and external address when lacking port mappings, so explicitly for the situation where NAT port mappings don’t work or aren’t enabled.
I think due to popular demand and consistency with existing options, it would make sense to have a checkbox to disable STUN/kcp similar to global discovery. I assume there is no meaningful information “given” to the external STUN server, but the fact it comes up is probably enough for some people to dislike it. And at lest to me it is not obvious that you need to modify the listen address to disable STUN. Or go full crowd pleasing by having a checkbox expressing the “I don’t want Syncthing to talk to anything unless I agreed to” sentiment, which disables relays, global discovery and STUN
If we’re trying to make settings more user friendly we should also take a long hard look at the magic “default” listen address that is completely inscrutable.
We could divide things into sections, maybe.
TCP Connections:
[X] Outgoing connections
[X] Incoming listen addresses: [:22000 ]
[X] Attempt NAT (UPnP/PMP) Port Mappings
...
KCP Connections:
[X] Outgoing connections
[X] Incoming listen addresses: [:220whatever]
[X] Use STUN Port Detection
...
Relay connections:
[X] Outgoing connections
[X] Listen on public relays
[ ] Listen on custom relays: [ ]
...
This would make it easier to, for example, not listen on or announce relays and KCP, but still use it for outgoing connections for others who do, and so on. Or make devices that don’t listen on anything but only connect outwards, or vice versa.
If i don’t use syncthing in wan why that name resolution is happening?
When that ip will ever be used if i use syncthing only in lan?
That’s nice but is not intuitive at all.
I don’t believe this is an advanced feature, we should have a check in settings since most people that disable wan discovery and things like that are not expecting that nat traversal with an ip resolution.
It’s kinda an hidden feature right now and there is no way it should be.
We have an option “NAT Traversal” right? Isn’t that feature about NAT traversing? Then why if i disable this i still get that?
If it’s not a bug is a weird behaviour.
You are entitled to your opinion of course, but Jakob’s explanation above is why NAT traversal is separate for Syncthing - arguing about that is moot. If you care to actually read what was written before, you have seen that I proposed a simpler way to deactivate STUN, Audrius agreed (mostly ) and finallly Jakob proposed an even simpler and better scheme. So both lead devs (one of which is the author of the KCP feature) already agree with you, that this could/should be optimized - no need to antagonize people with being argumentative. This is open source, so if you want that badly right now, your best bet is to contribute - otherwise you can just wait and hope someone else will do it.
So I agree that we should make it easier to disable, yet I disagree that STUN counts as NAT traversal therefore it should fall under the same option. STUN is just a way to figure out your external address and port. STUN by itself does not traverse anything.
It’s like saying discovery is NAT traversal.