oxen-io / lokinet

Lokinet is an anonymous, decentralized and IP based overlay network for the internet.
https://lokinet.org/
GNU General Public License v3.0
1.77k stars 221 forks source link

Lokinet daemon in startup launch list and cannot get killed #1587

Open chimp1984 opened 3 years ago

chimp1984 commented 3 years ago

Describe the bug I wanted to kill he lokinet daemon but it got restarted immediately. Only after removing /Library/LaunchDaemons/network.loki.lokinet.daemon.plist and a restart I got rid of it. I think to add a daemon to LaunchDaemons should be done only if absolutely needed. I have not read all notes at installation if I got asked or informed about that.

Device and Operating system (please complete the following information):

majestrate commented 3 years ago

yeah we're aware we need to totally redo the macos packaging. the current issue tracking this is: https://github.com/oxen-io/loki-network/issues/1528

chimp1984 commented 3 years ago

Ah thanks for the prompt reply. Very promising project!

chimp1984 commented 3 years ago

Sorry to disturb again, but I think there is a really severe issue:

I removed the launch file and restarted my computer (kill still did not work). After that the lokinet daemon is not running but I don't get any network connection! After adding the file again and another restart I get my network connections again. I don't know what low level config lokinet applies but that feels quite scary. I assume its because it operates on layer 3.

If I would not be motivated to further look into the project I would stop here. I think its better to remove the dmg installer until that issue is not solved, it might scare away more people...

So now I only have the choice to de-install all or accept that I have a network daemon running all the time consuming my bandwidth (I have pretty poor bandwidth so I care). I will probably have to move to a dedicated dev machine before engaging more with the project.

majestrate commented 3 years ago

I think its better to remove the dmg installer until that issue is not solved, it might scare away more people...

yeah I've been thinking that too lately.

chimp1984 commented 3 years ago

Another observation: It seems it deactivates the current network interface. Yesterday I had a similar experience that after trying to stop the daemon and a restart my ethernet was not working anymore. I switched to wlan and as that worked I thought my cable is broken. Now I installed while using wlan and wlan did not work anymore (as well as ethernet).

chimp1984 commented 3 years ago

My intent is to use lokinet as forward+reverse proxy for a p2p application in a similar way how tor sock proxy can be used+hidden service. I guess that use case should work well with lokinet, no? I want minimal dependencies, best would be one binary which has a tcp based control protocol to interact with (like torcontrol). If it requires an installer like for lokinet desktop GUI its too much for my use case. How many nodes are active roughly?

majestrate commented 3 years ago

I guess that use case should work well with lokinet, no?

maybe, we operate at layer 3 which may be tricky.

you don't need to run with a gui at all it's just a "nice to have" for many users. in fact the original idea was to run it on a soho router and automagic the LAN over lokinet.

How many nodes are active roughly?

1.6K relays right now, number of active users using it is currently unknown as we dont have a good way to measure that. probably for the best.

jagerman commented 3 years ago

I removed the launch file and restarted my computer (kill still did not work).

When you go to Lokinet -> Stop in the menu it disables the service from starting, and it stays disabled until you go to Start again. Did you try the obvious approach before going nuclear on it?

chimp1984 commented 3 years ago

The Gui app has no menu and also the OS menu bar does no show any items. I am on Big Sur, maybe there is something broken? I would expect that the green button is to turn it on/off but it does nothing. Any right click neither...

Screenshot 2021-04-10 at 18 00 21 Screenshot 2021-04-10 at 18 00 27
chimp1984 commented 3 years ago

we operate at layer 3 which may be tricky.

What was the main motivation to not use the application layer like other onion router networks? I assume performance, but are there further big benefits and is the performance gain that large?

jagerman commented 3 years ago

This may well be something broken in Big Sur; clicking that big green button should stop it and make the service kill itself.

jagerman commented 3 years ago

There should also be a lokinet logo in the bar at the top, near the clock, with Start/Stop options in it even. However if the big green button isn't working those likely won't be working either.

majestrate commented 3 years ago

we operate at layer 3 which may be tricky.

What was the main motivation to not use the application layer like other onion router networks? I assume performance, but are there further big benefits and is the performance gain that large?

mainly because having to write code shims to opt into an anonymity network stunts adoption. no one should ever need to port their code to an anon network it should "just work". we speak dns not because it's "good" but because every application in the modern age can speak dns. we speak IP not because it's "good" but because everything can be shoved into an IP packet or already works atop IP already.

chimp1984 commented 3 years ago

There should also be a lokinet logo in the bar at the top, near the clock, with Start/Stop options in it even. However if the big green button isn't working those likely won't be working either.

Ah yes I see that now. But clicking stop there does not do anything. Exit closed the GUI app but not the daemon.

chimp1984 commented 3 years ago

we operate at layer 3 which may be tricky.

What was the main motivation to not use the application layer like other onion router networks? I assume performance, but are there further big benefits and is the performance gain that large?

mainly because having to write code shims to opt into an anonymity network stunts adoption. no one should ever need to port their code to an anon network it should "just work". we speak dns not because it's "good" but because every application in the modern age can speak dns. we speak IP not because it's "good" but because everything can be shoved into an IP packet or already works atop IP already.

Yes agree, would be great to get privacy by default. Also to have it inside the router sounds like an interesting approach. But I fear the extra overhead for onion routing will not be accepted by all users and use cases.

I think a main hurdle for adoption is requirement for more "intrusive" setup. Requireing root access might be for many users aleady the point to stop, specially if used in a crytpocurrency context where money is at risk and lot of scam is happening.

I don't know any details of the project yet, so excuse my maybe silly questions... Would it be feasible to have 2 versions: One as it is now as layer 3 based and one on the application layer where its easy to embed into other application? I would love to have an easy to use API where the client app just operates with sockets APIs and it can be deployed with the app as additional binary without any further installation or root permission requirements. Or to use the sytem wide running like it is when using Tor.

chimp1984 commented 3 years ago

So now I am in real trouble. My system is totally screwed up, no network most apps hang even the finder is unusable... No idea what lokinet is doing to be able to cause that.

What happened? I had reinstalled lokinet and all worked. I use Little Snitch - a firewall for OSX. I thought I can "trick" it by disallowing any traffic via Little Snitch. But then all other apps also lost network connection. I was not aware that lokinet hooks in the network layer that way. I think that should be clearly communicated to a user, its alerting to say the least. Ok, I reenabled network trafic for lokinet again in the firewall, but that did not recover it. Tried a restart. Deinstall. Reinstall - now lokinet did not launch anymore. Also there is left a .lokinet folder under the user dir which did not got removed at deinstall. I removed that but also no change. Deactivated and reactivated my ethernet and wlan, also no effect. Luckily I have a second computer otherwise I would be cut off.... Any advice how I can get my system fixed again? Its later here so will be back in 8 hours or so...

chimp1984 commented 3 years ago

Finally got back all after switching to admin user and uninstalling lokinet again.

Damn that was not a great experience.

I think you really should remove the installers until those issues are resolved. Also you should make it more visible and clear to users what happens if lokinet gets installed. I still don't know but its something I would not have gave permission likely. If you have any doc where its explained please point me to it or maybe you can give a high level description.

And finally I think that approach to operate on layer 3 might be problematic and a hurdle for adoption. I use Little Snitch firewall which uses a similar approach (layer 3 based) but its a very useful tool so I get clear benefits for the risk and its a well known company with good reputation.

majestrate commented 3 years ago

I think you really should remove the installers until those issues are resolved.

I agree and I'll bring this up to the rest of the team.

And finally I think that approach to operate on layer 3 might be problematic and a hurdle for adoption.

strongly disagree with this one, most application developers will not write shims to support every network layer under the sun, tor and i2p have proven this in spades.