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

Add Decky Zerotier v0.1.0 #665

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Add Decky Zerotier v0.1.0 #665

wants to merge 2 commits into from

Conversation

hyacz
Copy link

@hyacz hyacz commented Aug 6, 2024

Decky Zerotier

https://github.com/hyacz/decky-zerotier

This plugin is a Zerotier client UI designed for SteamDeck to support the LAN connection function of some games.

Checklist:

Developer Checklist

  • I am the original author or an authorized maintainer of this plugin.
  • I have abided by the licenses of the libraries I am utilizing, including attaching license notices where appropriate.

Plugin Checklist

  • I have verified that my plugin works properly on the Stable and Beta update channels of SteamOS.
  • I have verified my plugin is unique or alternatively provides more/alternative functionality to a similar plugin already on the store.

Plugin Backend Checklist

  • Yes: I am using a custom backend other than Python.
  • Yes: I am using a tool or software from a 3rd party FOSS project that does not have it's dependencies statically linked.
  • No: I am using a custom binary that has all of it's dependencies statically linked.

Testing

  • Tested on SteamOS Preview Update Channel.

@TrainDoctor
Copy link
Member

@hyacz I wanted to go over licenses for ZeroTier since it's BSL licensed and that could effect our ability to distribute the plugin. Specifically, the license states that:

The Licensor hereby grants you the right to copy, modify, create derivative works, redistribute, and make non-production use of the Licensed Work. The Licensor may make an Additional Use Grant, above, permitting limited production use.
...

All code is built by our CI/CD system before it is sent to the store where it can be downloaded by users so the ZeroTier is being built not by the official source but instead by our CI/CD which makes that binary a derived work according to the license. Not to mention, the plugin could already be defined as a "derived work" and the phrase "non-production use" is potentially a problem because if this is deployed to our store we are shipping an interface to an environment that while it may not be paid for, I believe might qualify as production in certain jurisdictions. Have you worked with BSL code before? Do you know how many, if any of these points are of concern for the team?

I'd like to know your thoughts on the above and any information you can provide as this looks like a great idea for a plugin that I'd love to use myself but I need to be confident about keeping ourselves out of harm's way in terms of licenses and so on.

I have other less important concerns about the sizes of the binary used for the backend but those can be addressed later.

@TrainDoctor TrainDoctor added question Further information is requested on-hold This pull request must wait until it can be merged labels Aug 6, 2024
@hyacz
Copy link
Author

hyacz commented Aug 7, 2024

Overall I think this is fine, I have honestly never used BSL code before and I don't want to hurt anyone. I made this just to play LAN games with my friends. I am happy to discuss this with you, and I also hope to avoid potential risks.

I agree with you that plugins distributed from the store may be ”in production use" to some extent, BSL 1.1 allows production use under the scope of the "Additional Use Grant". Here is the definition from Zerotier:

Additional Use Grant: You may make use of the Licensed Work, provided you
                      do not use it in any of the following ways:

                      * Sell hosted ZeroTier services as a "SaaS" Product

                      (1) Operate or sell access to ZeroTier root servers,
                      network controllers, or authorization key or certificate
                      generation components of the Licensed Work as a
                      for-profit service, regardless of whether the use of
                      these components is sold alone or is bundled with other
                      services. Note that this does not apply to the use of
                      ZeroTier behind the scenes to operate a service not
                      related to ZeroTier network administration.

                      * Create Non-Open-Source Commercial Derivative Works

                      (2) Link or directly include the Licensed Work in a
                      commercial or for-profit application or other product
                      not distributed under an Open Source Initiative (OSI)
                      compliant license. See: https://opensource.org/licenses

                      (3) Remove the name, logo, copyright, or other branding
                      material from the Licensed Work to create a "rebranded"
                      or "white labeled" version to distribute as part of
                      any commercial or for-profit product or service.

                      * Certain Government Uses

                      (4) Use or deploy the Licensed Work in a government
                      setting in support of any active government function
                      or operation with the exception of the following:
                      physical or mental health care, family and social
                      services, social welfare, senior care, child care, and
                      the care of persons with disabilities.

I think it does not violate the above prohibitions, so it is OK even if it is defined as "in production use". To put it simply, this plugin only implements the client function of ZeroTier. It cannot even work without the official ZeroTier service. Any user who needs advanced functions (such as larger network capacity) still needs to pay ZeroTier. It does not harm the main interests of ZeroTier.

The binary is 17M, I'm not sure if that meets the requirements for store distribution.

@TrainDoctor TrainDoctor removed question Further information is requested on-hold This pull request must wait until it can be merged labels Aug 7, 2024
@TrainDoctor
Copy link
Member

I appreciate your detailed response, I'd say that we're likely in the clear here and won't have to worry at all. I think we're fine to proceed with the current setup but ideally we'd want to take the binary from a trusted source such as an official download provided by zerotier done as a remote binary. This means our hosting doesn't have to store a new 17 mib file everytime the plugin recieves an update. I'll make sure to have you do so before the plugin goes to production.

Copy link
Member

@TrainDoctor TrainDoctor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Plugin is good for testing after discussion over licenses and review of plugin contents.

@TrainDoctor TrainDoctor requested review from a team August 7, 2024 03:37
@hyacz
Copy link
Author

hyacz commented Aug 7, 2024

Thanks for your review and suggestions, ZeroTier seems to only provide RPM/DEB packages for Linux instead of single binaries. I'll try to find it. Alternatively, try to extract the binary from the RPM/DEB package. If there are other examples of plugins doing this, please let me know, it will be helpful. Testing this plugin requires using the official ZeroTier service, creating a network through the web page, and then joining/leaving this network through the plugin. If testers have questions about this, I'm happy to help.

@aaburri
Copy link

aaburri commented Aug 7, 2024

Thanks for your review and suggestions, ZeroTier seems to only provide RPM/DEB packages for Linux instead of single binaries. I'll try to find it. Alternatively, try to extract the binary from the RPM/DEB package. If there are other examples of plugins doing this, please let me know, it will be helpful. Testing this plugin requires using the official ZeroTier service, creating a network through the web page, and then joining/leaving this network through the plugin. If testers have questions about this, I'm happy to help.

Do we need to build ZeroTier to use this plugin? I'm getting a PluginLoader.import SyntaxError on Stable Decky/Steam OS/Client.

@TrainDoctor
Copy link
Member

Thanks for your review and suggestions, ZeroTier seems to only provide RPM/DEB packages for Linux instead of single binaries. I'll try to find it. Alternatively, try to extract the binary from the RPM/DEB package. If there are other examples of plugins doing this, please let me know, it will be helpful. Testing this plugin requires using the official ZeroTier service, creating a network through the web page, and then joining/leaving this network through the plugin. If testers have questions about this, I'm happy to help.

Do we need to build ZeroTier to use this plugin? I'm getting a PluginLoader.import SyntaxError on Stable Decky/Steam OS/Client.

You do not need to build it yourself, the binary is built automatically and is part of the plugin download. Please collect your plugin logs from the logs folder.

@hyacz
Copy link
Author

hyacz commented Aug 8, 2024

I developed using the new API, so I think there might be some issues with stable Decky? I've only tested it myself on Decky v3.0.0-pre5 + Steam OS/Client.

@aaburri
Copy link

aaburri commented Aug 8, 2024

Thanks for your review and suggestions, ZeroTier seems to only provide RPM/DEB packages for Linux instead of single binaries. I'll try to find it. Alternatively, try to extract the binary from the RPM/DEB package. If there are other examples of plugins doing this, please let me know, it will be helpful. Testing this plugin requires using the official ZeroTier service, creating a network through the web page, and then joining/leaving this network through the plugin. If testers have questions about this, I'm happy to help.

Do we need to build ZeroTier to use this plugin? I'm getting a PluginLoader.import SyntaxError on Stable Decky/Steam OS/Client.

You do not need to build it yourself, the binary is built automatically and is part of the plugin download. Please collect your plugin logs from the logs folder.

Yeah, first place I went to look; /homebrew/logs/decky-zerotier/ folder is empty

@hyacz
Copy link
Author

hyacz commented Aug 8, 2024

Since this plugin uses a new API it is not compatible with Decky Loader v2 and the stable Steam OS/client. It will currently only work with Decky Loader v3 and the Beta version of SteamOS/client. I want to hold the release until the Beta channel hits stable.

@TrainDoctor
Copy link
Member

As plugin is using format that only works with Decky V3, it is exempt from the requirement for plugins to be tested by the end of this month. However once Decky V3 is out in stable it will have a month to receive testing and feedback etc before it falls into the same category.

@CEbbinghaus
Copy link
Contributor

Worked A+. Well done I'll definitely be keeping this one around. Just wish there was an easier way to get text onto the deck without manually entering it. If its ready to be merged I recommend it is

@hyacz
Copy link
Author

hyacz commented Sep 14, 2024

Worked A+. Well done I'll definitely be keeping this one around. Just wish there was an easier way to get text onto the deck without manually entering it. If its ready to be merged I recommend it is

Thank you for appreciating this plugin! While entering a lot of text on the deck can be quite annoying, considering that you typically don’t join too many Zerotier networks, entering a 16-bit network ID when creating a new network seems manageable. Therefore, I decided against building a web interface for remote management via other devices like PCs.

If you need to set up multiple networks, you can switch to desktop mode and connect an external keyboard, or login to the deck via SSH. Then, locate the Zerotier executable file in the plugin’s bin directory and manage your networks using sub-commands such as join and leave. This approach is identical to using Zerotier’s official Linux client.

@CEbbinghaus
Copy link
Contributor

My comment about entering text isn't directed at you. Its a general problem even with the SteamDeck, even Decky has this problem for the plugin download url. My bad if it seemed like it was something directed at you

@hyacz
Copy link
Author

hyacz commented Sep 15, 2024

Don't mind, I know this is a generic problem. I just wanted to give some solutions. in addition, clipboard sharing would be a good idea, KDE Connect should be able to do that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🔖 Ready for review
Development

Successfully merging this pull request may close these issues.

4 participants