Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why does this program wants to use the network ? #456

Closed
spapas opened this issue Aug 31, 2020 · 7 comments
Closed

Why does this program wants to use the network ? #456

spapas opened this issue Aug 31, 2020 · 7 comments
Labels

Comments

@spapas
Copy link

spapas commented Aug 31, 2020

Hello, I tried running lf.exe on my windows machine but it displayed the usual windows firewall popup that it wants to use the network etc (similar to this https://i.stack.imgur.com/a45bg.png - notice this screenshot for a random program). I think that this popup is displayed when a program tries to open a listening network socket so as to act as a server.

Could you please clarify why does lf.exe need be used as a network server?

Thank you

@shabahengam
Copy link

check the FAQ

lf launches a server process in the background when you run it the first time.
Server listens and records file selections so that you can copy files in one instance and paste in another.

@gokcehan
Copy link
Owner

@spapas We are using a server/client architecture to share the copy/cut files between multiple lf instances, and also implement remote commands so you can send commands back to lf in your shell commands. On unix, we are using unix socket files for this interprocess communication. Windows doesn't have an equivalent so we're using TCP sockets. Feel free to have a look at our client.go and server.go code to see what is being done.

I'm not too happy about this either. And it doesn't seem like a good idea to do this on public networks in terms of security, so windows is kind of right to warn you. There are plans to move copy/cut file selection from server to local files as discussed in #177. After this maybe we can add an option to disable server altogether for people who are not interested in multiple client use cases, though this would also mean remote commands will not be available either.

@spapas
Copy link
Author

spapas commented Aug 31, 2020

Thank you very much for the answers, using TCP sockets for IPC makes sense.

However, from a peek at the source code I saw that your listen to all interfaces (bind to 0.0.0.0) unless I am mistaken (I am not familiar with the go programming language but I saw that by default it listens to :12345).

That's probably why the Windows firewall asked me if I wanted to allow connections. Wouldn't it be possible to listen only to 127.0.0.1 to avoid the warning?

@gokcehan
Copy link
Owner

@spapas Oh, that would be great if it works. I had no idea. Thanks for the heads up. I will check this out next time I boot my windows. Marking the issue as a bug to catch my attention.

@gokcehan gokcehan added bug and removed question labels Aug 31, 2020
@spapas
Copy link
Author

spapas commented Sep 1, 2020

Excellent! Let's hope it works :)

gokcehan added a commit that referenced this issue Sep 1, 2020
@gokcehan
Copy link
Owner

gokcehan commented Sep 1, 2020

@spapas This indeed seems to work. I have removed the old permission from the firewall settings, and with this change it doesn't ask for permission anymore. Thanks again for this idea.

@gokcehan gokcehan closed this as completed Sep 1, 2020
@spapas
Copy link
Author

spapas commented Sep 2, 2020

You are welcome I'm glad it works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants